13140 lines
3.3 MiB
13140 lines
3.3 MiB
var gn=Object.defineProperty;var xn=(E,y,n)=>y in E?gn(E,y,{enumerable:!0,configurable:!0,writable:!0,value:n}):E[y]=n;var $=(E,y,n)=>xn(E,typeof y!="symbol"?y+"":y,n);(function(){const y=document.createElement("link").relList;if(y&&y.supports&&y.supports("modulepreload"))return;for(const S of document.querySelectorAll('link[rel="modulepreload"]'))m(S);new MutationObserver(S=>{for(const x of S)if(x.type==="childList")for(const h of x.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&m(h)}).observe(document,{childList:!0,subtree:!0});function n(S){const x={};return S.integrity&&(x.integrity=S.integrity),S.referrerPolicy&&(x.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?x.credentials="include":S.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function m(S){if(S.ep)return;S.ep=!0;const x=n(S);fetch(S.href,x)}})();var yn={50792:E=>{var y=Object.prototype.hasOwnProperty,n="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(n=!1));function S(t,e,l){this.fn=t,this.context=e,this.once=l||!1}function x(t,e,l,i,s){if(typeof l!="function")throw new TypeError("The listener must be a function");var r=new S(l,i||t,s),o=n?n+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],r]:t._events[o].push(r):(t._events[o]=r,t._eventsCount++),t}function h(t,e){--t._eventsCount===0?t._events=new m:delete t._events[e]}function d(){this._events=new m,this._eventsCount=0}d.prototype.eventNames=function(){var e=[],l,i;if(this._eventsCount===0)return e;for(i in l=this._events)y.call(l,i)&&e.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(l)):e},d.prototype.listeners=function(e){var l=n?n+e:e,i=this._events[l];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,r=i.length,o=new Array(r);s<r;s++)o[s]=i[s].fn;return o},d.prototype.listenerCount=function(e){var l=n?n+e:e,i=this._events[l];return i?i.fn?1:i.length:0},d.prototype.emit=function(e,l,i,s,r,o){var a=n?n+e:e;if(!this._events[a])return!1;var u=this._events[a],f=arguments.length,v,c;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),f){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,l),!0;case 3:return u.fn.call(u.context,l,i),!0;case 4:return u.fn.call(u.context,l,i,s),!0;case 5:return u.fn.call(u.context,l,i,s,r),!0;case 6:return u.fn.call(u.context,l,i,s,r,o),!0}for(c=1,v=new Array(f-1);c<f;c++)v[c-1]=arguments[c];u.fn.apply(u.context,v)}else{var g=u.length,p;for(c=0;c<g;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),f){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,l);break;case 3:u[c].fn.call(u[c].context,l,i);break;case 4:u[c].fn.call(u[c].context,l,i,s);break;default:if(!v)for(p=1,v=new Array(f-1);p<f;p++)v[p-1]=arguments[p];u[c].fn.apply(u[c].context,v)}}return!0},d.prototype.on=function(e,l,i){return x(this,e,l,i,!1)},d.prototype.once=function(e,l,i){return x(this,e,l,i,!0)},d.prototype.removeListener=function(e,l,i,s){var r=n?n+e:e;if(!this._events[r])return this;if(!l)return h(this,r),this;var o=this._events[r];if(o.fn)o.fn===l&&(!s||o.once)&&(!i||o.context===i)&&h(this,r);else{for(var a=0,u=[],f=o.length;a<f;a++)(o[a].fn!==l||s&&!o[a].once||i&&o[a].context!==i)&&u.push(o[a]);u.length?this._events[r]=u.length===1?u[0]:u:h(this,r)}return this},d.prototype.removeAllListeners=function(e){var l;return e?(l=n?n+e:e,this._events[l]&&h(this,l)):(this._events=new m,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=n,d.EventEmitter=d,E.exports=d},11517:(E,y,n)=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(38829),S=function(x,h,d,t){for(var e=x[0],l=1;l<x.length;l++){var i=x[l];m(i,e,h,d,t),e=i}return x};E.exports=S},80318:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e){return m(x,"angle",h,d,t,e)};E.exports=S},60757:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){for(var x=0;x<n.length;x++){var h=n[x];m.call(S,h)}return n};E.exports=y},69927:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){S===void 0&&(S=0);for(var x=S;x<n.length;x++){var h=n[x],d=!0;for(var t in m)h[t]!==m[t]&&(d=!1);if(d)return h}return null};E.exports=y},32265:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){S===void 0&&(S=0);for(var x=n.length-1;x>=S;x--){var h=n[x],d=!0;for(var t in m)h[t]!==m[t]&&(d=!1);if(d)return h}return null};E.exports=y},94420:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(11879),S=n(60461),x=n(95540),h=n(29747),d=n(41481),t=new d({sys:{queueDepthSort:h,events:{once:h}}},0,0,1,1).setOrigin(0,0),e=function(l,i){i===void 0&&(i={});var s=i.hasOwnProperty("width"),r=i.hasOwnProperty("height"),o=x(i,"width",-1),a=x(i,"height",-1),u=x(i,"cellWidth",1),f=x(i,"cellHeight",u),v=x(i,"position",S.TOP_LEFT),c=x(i,"x",0),g=x(i,"y",0),p=0,T=0,C=o*u,M=a*f;t.setPosition(c,g),t.setSize(u,f);for(var A=0;A<l.length;A++)if(m(l[A],t,v),s&&o===-1)t.x+=u;else if(r&&a===-1)t.y+=f;else if(r&&!s){if(T+=f,t.y+=f,T===M&&(T=0,p+=u,t.y=g,t.x+=u,p===C))break}else if(p+=u,t.x+=u,p===C&&(p=0,T+=f,t.x=c,t.y+=f,T===M))break;return l};E.exports=e},41721:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e){return m(x,"alpha",h,d,t,e)};E.exports=S},67285:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e){return m(x,"x",h,d,t,e)};E.exports=S},9074:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e,l,i){return d==null&&(d=h),m(x,"x",h,t,l,i),m(x,"y",d,e,l,i)};E.exports=S},75222:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e){return m(x,"y",h,d,t,e)};E.exports=S},22983:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S===void 0&&(S=0),x===void 0&&(x=6.28);for(var h=S,d=(x-S)/n.length,t=m.x,e=m.y,l=m.radius,i=0;i<n.length;i++)n[i].x=t+l*Math.cos(h),n[i].y=e+l*Math.sin(h),h+=d;return n};E.exports=y},95253:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S===void 0&&(S=0),x===void 0&&(x=6.28);for(var h=S,d=(x-S)/n.length,t=m.width/2,e=m.height/2,l=0;l<n.length;l++)n[l].x=m.x+t*Math.cos(h),n[l].y=m.y+e*Math.sin(h),h+=d;return n};E.exports=y},88505:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(15258),S=n(26708),x=function(h,d,t){var e;t?e=S(d,t,h.length):e=m(d,h.length);for(var l=0;l<h.length;l++){var i=h[l],s=e[l];i.x=s.x,i.y=s.y}return h};E.exports=x},41346:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(14649),S=n(86003),x=n(49498),h=function(d,t,e){e===void 0&&(e=0);var l=m(t,!1,d.length);e>0?S(l,e):e<0&&x(l,Math.abs(e));for(var i=0;i<d.length;i++)d[i].x=l[i].x,d[i].y=l[i].y;return d};E.exports=h},11575:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(84993),S=function(x,h,d){var t=m({x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2},d),e=m({x1:h.x2,y1:h.y2,x2:h.x3,y2:h.y3},d),l=m({x1:h.x3,y1:h.y3,x2:h.x1,y2:h.y1},d);t.pop(),e.pop(),l.pop(),t=t.concat(e,l);for(var i=t.length/x.length,s=0,r=0;r<x.length;r++){var o=x[r],a=t[Math.floor(s)];o.x=a.x,o.y=a.y,s+=i}return x};E.exports=S},29953:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){for(var x=0;x<n.length;x++){var h=n[x];h.anims&&h.anims.play(m,S)}return n};E.exports=y},66979:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h,d){x===void 0&&(x=0),h===void 0&&(h=0),d===void 0&&(d=1);var t,e=0,l=n.length;if(d===1)for(t=h;t<l;t++)n[t][m]+=S+e*x,e++;else for(t=h;t>=0;t--)n[t][m]+=S+e*x,e++;return n};E.exports=y},43967:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h,d){x===void 0&&(x=0),h===void 0&&(h=0),d===void 0&&(d=1);var t,e=0,l=n.length;if(d===1)for(t=h;t<l;t++)n[t][m]=S+e*x,e++;else for(t=h;t>=0;t--)n[t][m]=S+e*x,e++;return n};E.exports=y},88926:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(28176),S=function(x,h){for(var d=0;d<x.length;d++)m(h,x[d]);return x};E.exports=S},33286:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(24820),S=function(x,h){for(var d=0;d<x.length;d++)m(h,x[d]);return x};E.exports=S},96e3:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65822),S=function(x,h){for(var d=0;d<x.length;d++)m(h,x[d]);return x};E.exports=S},28789:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26597),S=function(x,h){for(var d=0;d<x.length;d++)m(h,x[d]);return x};E.exports=S},97154:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90260),S=function(x,h){for(var d=0;d<x.length;d++)m(h,x[d]);return x};E.exports=S},20510:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e){return m(x,"rotation",h,d,t,e)};E.exports=S},91051:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(1163),S=n(20339),x=function(h,d,t){for(var e=d.x,l=d.y,i=0;i<h.length;i++){var s=h[i];m(s,e,l,t,Math.max(1,S(s.x,s.y,e,l)))}return h};E.exports=x},76332:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(1163),S=function(x,h,d,t){var e=h.x,l=h.y;if(t===0)return x;for(var i=0;i<x.length;i++)m(x[i],e,l,d,t);return x};E.exports=S},61619:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e){return m(x,"scaleX",h,d,t,e)};E.exports=S},94868:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e,l,i){return d==null&&(d=h),m(x,"scaleX",h,t,l,i),m(x,"scaleY",d,e,l,i)};E.exports=S},95532:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66979),S=function(x,h,d,t,e){return m(x,"scaleY",h,d,t,e)};E.exports=S},8689:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"alpha",h,d,t,e)};E.exports=S},2645:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t){return m(x,"blendMode",h,0,d,t)};E.exports=S},32372:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"depth",h,d,t,e)};E.exports=S},85373:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){for(var x=0;x<n.length;x++)n[x].setInteractive(m,S);return n};E.exports=y},81583:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e,l,i){return d==null&&(d=h),m(x,"originX",h,t,l,i),m(x,"originY",d,e,l,i),x.forEach(function(s){s.updateDisplayOrigin()}),x};E.exports=S},79939:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"rotation",h,d,t,e)};E.exports=S},2699:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e,l,i){return d==null&&(d=h),m(x,"scaleX",h,t,l,i),m(x,"scaleY",d,e,l,i)};E.exports=S},98739:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"scaleX",h,d,t,e)};E.exports=S},98476:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"scaleY",h,d,t,e)};E.exports=S},6207:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e,l,i){return d==null&&(d=h),m(x,"scrollFactorX",h,t,l,i),m(x,"scrollFactorY",d,e,l,i)};E.exports=S},6607:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"scrollFactorX",h,d,t,e)};E.exports=S},72248:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"scrollFactorY",h,d,t,e)};E.exports=S},14036:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h){for(var d=0;d<n.length;d++)n[d].setTint(m,S,x,h);return n};E.exports=y},50159:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t){return m(x,"visible",h,0,d,t)};E.exports=S},77597:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"x",h,d,t,e)};E.exports=S},83194:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e,l,i){return d==null&&(d=h),m(x,"x",h,t,l,i),m(x,"y",d,e,l,i)};E.exports=S},67678:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43967),S=function(x,h,d,t,e){return m(x,"y",h,d,t,e)};E.exports=S},35850:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e){t===void 0&&(t=0),e===void 0&&(e=new m);var l,i,s=x.length;if(s===1)l=x[0].x,i=x[0].y,x[0].x=h,x[0].y=d;else{var r=1,o=0;t===0&&(o=s-1,r=s-2),l=x[o].x,i=x[o].y,x[o].x=h,x[o].y=d;for(var a=0;a<s;a++)if(!(r>=s||r===-1)){var u=x[r],f=u.x,v=u.y;u.x=l,u.y=i,l=f,i=v,t===0?r--:r++}}return e.x=l,e.y=i,e};E.exports=S},8628:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(33680),S=function(x){return m(x)};E.exports=S},21837:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7602),S=function(x,h,d,t,e){e===void 0&&(e=!1);var l=Math.abs(t-d)/x.length,i;if(e)for(i=0;i<x.length;i++)x[i][h]+=m(i*l,d,t);else for(i=0;i<x.length;i++)x[i][h]=m(i*l,d,t);return x};E.exports=S},21910:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(54261),S=function(x,h,d,t,e){e===void 0&&(e=!1);var l=Math.abs(t-d)/x.length,i;if(e)for(i=0;i<x.length;i++)x[i][h]+=m(i*l,d,t);else for(i=0;i<x.length;i++)x[i][h]=m(i*l,d,t);return x};E.exports=S},62054:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h){if(h===void 0&&(h=!1),n.length===0)return n;if(n.length===1)return h?n[0][m]+=(x+S)/2:n[0][m]=(x+S)/2,n;var d=Math.abs(x-S)/(n.length-1),t;if(h)for(t=0;t<n.length;t++)n[t][m]+=t*d+S;else for(t=0;t<n.length;t++)n[t][m]=t*d+S;return n};E.exports=y},79815:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){for(var m=0;m<n.length;m++)n[m].visible=!n[m].visible;return n};E.exports=y},39665:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author samme <samme.npm@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(15994),S=function(x,h,d){d===void 0&&(d=0);for(var t=0;t<x.length;t++){var e=x[t];e.x=m(e.x,h.left-d,h.right+d),e.y=m(e.y,h.top-d,h.bottom+d)}return x};E.exports=S},61061:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={AlignTo:n(11517),Angle:n(80318),Call:n(60757),GetFirst:n(69927),GetLast:n(32265),GridAlign:n(94420),IncAlpha:n(41721),IncX:n(67285),IncXY:n(9074),IncY:n(75222),PlaceOnCircle:n(22983),PlaceOnEllipse:n(95253),PlaceOnLine:n(88505),PlaceOnRectangle:n(41346),PlaceOnTriangle:n(11575),PlayAnimation:n(29953),PropertyValueInc:n(66979),PropertyValueSet:n(43967),RandomCircle:n(88926),RandomEllipse:n(33286),RandomLine:n(96e3),RandomRectangle:n(28789),RandomTriangle:n(97154),Rotate:n(20510),RotateAround:n(91051),RotateAroundDistance:n(76332),ScaleX:n(61619),ScaleXY:n(94868),ScaleY:n(95532),SetAlpha:n(8689),SetBlendMode:n(2645),SetDepth:n(32372),SetHitArea:n(85373),SetOrigin:n(81583),SetRotation:n(79939),SetScale:n(2699),SetScaleX:n(98739),SetScaleY:n(98476),SetScrollFactor:n(6207),SetScrollFactorX:n(6607),SetScrollFactorY:n(72248),SetTint:n(14036),SetVisible:n(50159),SetX:n(77597),SetXY:n(83194),SetY:n(67678),ShiftPosition:n(35850),Shuffle:n(8628),SmootherStep:n(21910),SmoothStep:n(21837),Spread:n(62054),ToggleVisible:n(79815),WrapInRectangle:n(39665)}},42099:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(74943),h=n(81957),d=n(41138),t=n(35154),e=n(90126),l=new S({initialize:function(s,r,o){this.manager=s,this.key=r,this.type="frame",this.frames=this.getFrames(s.textureManager,t(o,"frames",[]),t(o,"defaultTextureKey",null),t(o,"sortFrames",!0)),this.frameRate=t(o,"frameRate",null),this.duration=t(o,"duration",null),this.msPerFrame,this.skipMissedFrames=t(o,"skipMissedFrames",!0),this.delay=t(o,"delay",0),this.repeat=t(o,"repeat",0),this.repeatDelay=t(o,"repeatDelay",0),this.yoyo=t(o,"yoyo",!1),this.showBeforeDelay=t(o,"showBeforeDelay",!1),this.showOnStart=t(o,"showOnStart",!1),this.hideOnComplete=t(o,"hideOnComplete",!1),this.randomFrame=t(o,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(x.PAUSE_ALL,this.pause,this),this.manager.on(x.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(i,s,r,o){r===null&&o===null?(i.frameRate=24,i.duration=24/s*1e3):r&&o===null?(i.duration=r,i.frameRate=s/(r/1e3)):(i.frameRate=o,i.duration=s/o*1e3),i.msPerFrame=1e3/i.frameRate},addFrame:function(i){return this.addFrameAt(this.frames.length,i)},addFrameAt:function(i,s){var r=this.getFrames(this.manager.textureManager,s);if(r.length>0){if(i===0)this.frames=r.concat(this.frames);else if(i===this.frames.length)this.frames=this.frames.concat(r);else{var o=this.frames.slice(0,i),a=this.frames.slice(i);this.frames=o.concat(r,a)}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,s,r,o){o===void 0&&(o=!0);var a=[],u,f,v=1,c,g;if(typeof s=="string"){if(g=s,!i.exists(g))return console.warn('Texture "%s" not found',g),a;var p=i.get(g),T=p.getFrameNames();o&&e(T),s=[],T.forEach(function(L){s.push({key:g,frame:L})})}if(!Array.isArray(s)||s.length===0)return a;for(c=0;c<s.length;c++){var C=s[c],M=t(C,"key",r);if(M){var A=t(C,"frame",0),R=i.getFrame(M,A);if(!R){console.warn('Texture "%s" not found',M);continue}f=new d(M,A,v,R),f.duration=t(C,"duration",0),f.isFirst=!u,u&&(u.nextFrame=f,f.prevFrame=u),a.push(f),u=f,v++}}if(a.length>0){f.isLast=!0,f.nextFrame=a[0],a[0].prevFrame=f;var P=1/(a.length-1);for(c=0;c<a.length;c++)a[c].progress=c*P}return a},getNextTick:function(i){i.accumulator-=i.nextTick,i.nextTick=i.frameRate===i.currentAnim.frameRate&&i.currentFrame.duration||i.msPerFrame},getFrameByProgress:function(i){return i=m(i,0,1),h(i,this.frames,"progress")},nextFrame:function(i){var s=i.currentFrame;s.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,s.nextFrame)},handleYoyoFrame:function(i,s){if(s||(s=!1),i.inReverse===!s&&i.repeatCounter>0){(i.repeatDelay===0||i.pendingRepeat)&&(i.forward=s),this.repeatAnimation(i);return}if(i.inReverse!==s&&i.repeatCounter===0){i.complete();return}i.forward=s;var r=s?i.currentFrame.nextFrame:i.currentFrame.prevFrame;this.updateAndGetNextTick(i,r)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(i){var s=i.currentFrame;s.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,s.prevFrame)},updateAndGetNextTick:function(i,s){i.setCurrentFrame(s),this.getNextTick(i)},removeFrame:function(i){var s=this.frames.indexOf(i);return s!==-1&&this.removeFrameAt(s),this},removeFrameAt:function(i){return this.frames.splice(i,1),this.updateFrameSequence(),this},repeatAnimation:function(i){if(i._pendingStop===2){if(i._pendingStopValue===0)return i.stop();i._pendingStopValue--}i.repeatDelay>0&&!i.pendingRepeat?(i.pendingRepeat=!0,i.accumulator-=i.nextTick,i.nextTick+=i.repeatDelay):(i.repeatCounter--,i.forward?i.setCurrentFrame(i.currentFrame.nextFrame):i.setCurrentFrame(i.currentFrame.prevFrame),i.isPlaying&&(this.getNextTick(i),i.handleRepeat()))},toJSON:function(){var i={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(s){i.frames.push(s.toJSON())}),i},updateFrameSequence:function(){for(var i=this.frames.length,s=1/(i-1),r,o=0;o<i;o++)r=this.frames[o],r.index=o+1,r.isFirst=!1,r.isLast=!1,r.progress=o*s,o===0?(r.isFirst=!0,i===1?(r.isLast=!0,r.nextFrame=r,r.prevFrame=r):(r.isLast=!1,r.prevFrame=this.frames[i-1],r.nextFrame=this.frames[o+1])):o===i-1&&i>1?(r.isLast=!0,r.prevFrame=this.frames[i-2],r.nextFrame=this.frames[0]):i>1&&(r.prevFrame=this.frames[o-1],r.nextFrame=this.frames[o+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(x.PAUSE_ALL,this.pause,this),this.manager.off(x.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}});E.exports=l},41138:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t,e,l){l===void 0&&(l=!1),this.textureKey=h,this.textureFrame=d,this.index=t,this.frame=e,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=l},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});E.exports=S},60848:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(42099),S=n(83419),x=n(90330),h=n(50792),d=n(74943),t=n(8443),e=n(95540),l=n(35154),i=n(36383),s=n(20283),r=n(41836),o=new S({Extends:h,initialize:function(u){h.call(this),this.game=u,this.textureManager=null,this.globalTimeScale=1,this.anims=new x,this.mixes=new x,this.paused=!1,this.name="AnimationManager",u.events.once(t.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(t.DESTROY,this.destroy,this)},addMix:function(a,u,f){var v=this.anims,c=this.mixes,g=typeof a=="string"?a:a.key,p=typeof u=="string"?u:u.key;if(v.has(g)&&v.has(p)){var T=c.get(g);T||(T={}),T[p]=f,c.set(g,T)}return this},removeMix:function(a,u){var f=this.mixes,v=typeof a=="string"?a:a.key,c=f.get(v);if(c)if(u){var g=typeof u=="string"?u:u.key;c.hasOwnProperty(g)&&delete c[g]}else u||f.delete(v);return this},getMix:function(a,u){var f=this.mixes,v=typeof a=="string"?a:a.key,c=typeof u=="string"?u:u.key,g=f.get(v);return g&&g.hasOwnProperty(c)?g[c]:0},add:function(a,u){return this.anims.has(a)?(console.warn("Animation key exists: "+a),this):(u.key=a,this.anims.set(a,u),this.emit(d.ADD_ANIMATION,a,u),this)},exists:function(a){return this.anims.has(a)},createFromAseprite:function(a,u,f){var v=[],c=this.game.cache.json.get(a);if(!c)return console.warn("No Aseprite data found for: "+a),v;var g=this,p=l(c,"meta",null),T=l(c,"frames",null);if(p&&T){var C=l(p,"frameTags",[]);C.forEach(function(M){var A=[],R=e(M,"name",null),P=e(M,"from",0),L=e(M,"to",0),F=e(M,"direction","forward");if(R&&(!u||u&&u.indexOf(R)>-1)){for(var w=0,O=P;O<=L;O++){var B=O.toString(),I=T[B];if(I){var D=e(I,"duration",i.MAX_SAFE_INTEGER);A.push({key:a,frame:B,duration:D}),w+=D}}F==="reverse"&&(A=A.reverse());var N={key:R,frames:A,duration:w,yoyo:F==="pingpong"},z;f?f.anims&&(z=f.anims.create(N)):z=g.create(N),z&&v.push(z)}})}return v},create:function(a){var u=a.key,f=!1;return u&&(f=this.get(u),f?console.warn("AnimationManager key already exists: "+u):(f=new m(this,u,a),this.anims.set(u,f),this.emit(d.ADD_ANIMATION,u,f))),f},fromJSON:function(a,u){u===void 0&&(u=!1),u&&this.anims.clear(),typeof a=="string"&&(a=JSON.parse(a));var f=[];if(a.hasOwnProperty("anims")&&Array.isArray(a.anims)){for(var v=0;v<a.anims.length;v++)f.push(this.create(a.anims[v]));a.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=a.globalTimeScale)}else a.hasOwnProperty("key")&&a.type==="frame"&&f.push(this.create(a));return f},generateFrameNames:function(a,u){var f=l(u,"prefix",""),v=l(u,"start",0),c=l(u,"end",0),g=l(u,"suffix",""),p=l(u,"zeroPad",0),T=l(u,"outputArray",[]),C=l(u,"frames",!1);if(!this.textureManager.exists(a))return console.warn('Texture "%s" not found',a),T;var M=this.textureManager.get(a);if(!M)return T;var A;if(u)for(C||(C=s(v,c)),A=0;A<C.length;A++){var R=f+r(C[A],p,"0",1)+g;M.has(R)?T.push({key:a,frame:R}):console.warn('Frame "%s" not found in texture "%s"',R,a)}else for(C=M.getFrameNames(),A=0;A<C.length;A++)T.push({key:a,frame:C[A]});return T},generateFrameNumbers:function(a,u){var f=l(u,"start",0),v=l(u,"end",-1),c=l(u,"first",!1),g=l(u,"outputArray",[]),p=l(u,"frames",!1);if(!this.textureManager.exists(a))return console.warn('Texture "%s" not found',a),g;var T=this.textureManager.get(a);if(!T)return g;c&&T.has(c)&&g.push({key:a,frame:c}),p||(v===-1&&(v=T.frameTotal-2),p=s(f,v));for(var C=0;C<p.length;C++){var M=p[C];T.has(M)?g.push({key:a,frame:M}):console.warn('Frame "%s" not found in texture "%s"',M,a)}return g},get:function(a){return this.anims.get(a)},getAnimsFromTexture:function(a){for(var u=this.textureManager.get(a),f=u.key,v=this.anims.getArray(),c=[],g=0;g<v.length;g++)for(var p=v[g],T=p.frames,C=0;C<T.length;C++)if(T[C].textureKey===f){c.push(p.key);break}return c},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(d.PAUSE_ALL)),this},play:function(a,u){Array.isArray(u)||(u=[u]);for(var f=0;f<u.length;f++)u[f].anims.play(a);return this},staggerPlay:function(a,u,f,v){f===void 0&&(f=0),v===void 0&&(v=!0),Array.isArray(u)||(u=[u]);var c=u.length;v||c--;for(var g=0;g<u.length;g++){var p=f<0?Math.abs(f)*(c-g):f*g;u[g].anims.playAfterDelay(a,p)}return this},remove:function(a){var u=this.get(a);return u&&(this.emit(d.REMOVE_ANIMATION,a,u),this.anims.delete(a),this.removeMix(a)),u},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(d.RESUME_ALL)),this},toJSON:function(a){var u={anims:[],globalTimeScale:this.globalTimeScale};return a!==void 0&&a!==""?u.anims.push(this.anims.get(a).toJSON()):this.anims.each(function(f,v){u.anims.push(v.toJSON())}),u},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});E.exports=o},9674:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(42099),S=n(30976),x=n(83419),h=n(90330),d=n(74943),t=n(95540),e=new x({initialize:function(i){this.parent=i,this.animationManager=i.scene.sys.anims,this.animationManager.on(d.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(l){var i=this.parent;if(l===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,i;Array.isArray(l)||(l=[l]);for(var s=0;s<l.length;s++){var r=l[s];this.nextAnim?this.nextAnimsQueue.push(r):this.nextAnim=r}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(l){this.isPlaying&&this.stop();var i=this.animationManager,s=typeof l=="string"?l:t(l,"key",null),r=this.exists(s)?this.get(s):i.get(s);if(!r)console.warn("Missing animation: "+s);else{this.currentAnim=r;var o=r.getTotalFrames(),a=t(l,"frameRate",r.frameRate),u=t(l,"duration",r.duration);r.calculateDuration(this,o,u,a),this.delay=t(l,"delay",r.delay),this.repeat=t(l,"repeat",r.repeat),this.repeatDelay=t(l,"repeatDelay",r.repeatDelay),this.yoyo=t(l,"yoyo",r.yoyo),this.showBeforeDelay=t(l,"showBeforeDelay",r.showBeforeDelay),this.showOnStart=t(l,"showOnStart",r.showOnStart),this.hideOnComplete=t(l,"hideOnComplete",r.hideOnComplete),this.skipMissedFrames=t(l,"skipMissedFrames",r.skipMissedFrames),this.randomFrame=t(l,"randomFrame",r.randomFrame),this.timeScale=t(l,"timeScale",this.timeScale);var f=t(l,"startFrame",0);f>o&&(f=0),this.randomFrame&&(f=S(0,o-1));var v=r.frames[f];f===0&&!this.forward&&(v=r.getLastFrame()),this.currentFrame=v}return this.parent},pause:function(l){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),l!==void 0&&this.setCurrentFrame(l),this.parent},resume:function(l){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),l!==void 0&&this.setCurrentFrame(l),this.parent},playAfterDelay:function(l,i){if(!this.isPlaying)this.delayCounter=i,this.play(l,!0);else{var s=this.nextAnim,r=this.nextAnimsQueue;s&&r.unshift(s),this.nextAnim=l,this._pendingStop=1,this._pendingStopValue=i}return this.parent},playAfterRepeat:function(l,i){if(i===void 0&&(i=1),!this.isPlaying)this.play(l);else{var s=this.nextAnim,r=this.nextAnimsQueue;s&&r.unshift(s),this.repeatCounter!==-1&&i>this.repeatCounter&&(i=this.repeatCounter),this.nextAnim=l,this._pendingStop=2,this._pendingStopValue=i}return this.parent},play:function(l,i){i===void 0&&(i=!1);var s=this.currentAnim,r=this.parent,o=typeof l=="string"?l:l.key;if(i&&this.isPlaying&&s.key===o)return r;if(s&&this.isPlaying){var a=this.animationManager.getMix(s.key,l);if(a>0)return this.playAfterDelay(l,a)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(l)},playReverse:function(l,i){i===void 0&&(i=!1);var s=typeof l=="string"?l:l.key;return i&&this.isPlaying&&this.currentAnim.key===s?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(l))},startAnimation:function(l){this.load(l);var i=this.currentAnim,s=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)),s},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(d.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(d.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(d.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(d.ANIMATION_COMPLETE,d.ANIMATION_COMPLETE_KEY)},emitEvents:function(l,i){var s=this.currentAnim;if(s){var r=this.currentFrame,o=this.parent,a=r.textureFrame;o.emit(l,s,r,o,a),i&&o.emit(i+s.key,s,r,o,a)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var l=this.currentFrame;if(!l)return 0;var i=l.progress;return this.inReverse&&(i*=-1),i},setProgress:function(l){return this.forward||(l=1-l),this.setCurrentFrame(this.currentAnim.getFrameByProgress(l)),this.parent},setRepeat:function(l){return this.repeatCounter=l===-1?Number.MAX_VALUE:l,this.parent},globalRemove:function(l,i){i===void 0&&(i=this.currentAnim),this.isPlaying&&i.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(l,i){l===void 0&&(l=!1),i===void 0&&(i=!1);var s=this.currentAnim,r=this.parent;return s?(i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),s.getFirstTick(this),this.emitEvents(d.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!l,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(s.frames[0]),this.parent):r},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var l=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(l)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var l=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(l)}return this.parent},stopAfterDelay:function(l){return this._pendingStop=1,this._pendingStopValue=l,this.parent},stopAfterRepeat:function(l){return l===void 0&&(l=1),this.repeatCounter!==-1&&l>this.repeatCounter&&(l=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=l,this.parent},stopOnFrame:function(l){return this._pendingStop=3,this._pendingStopValue=l,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(l,i){var s=this.currentAnim;if(!(!this.isPlaying||!s||s.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?s.nextFrame(this):s.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var r=0;do this.forward?s.nextFrame(this):s.previousFrame(this),r++;while(this.isPlaying&&this.accumulator>this.nextTick&&r<60)}}},setCurrentFrame:function(l){var i=this.parent;return this.currentFrame=l,i.texture=l.frame.texture,i.frame=l.frame,i.isCropped&&i.frame.updateCropUVs(i._crop,i.flipX,i.flipY),l.setAlpha&&(i.alpha=l.alpha),i.setSizeToFrame(),i._originComponent&&(l.frame.customPivot?i.setOrigin(l.frame.pivotX,l.frame.pivotY):i.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(d.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===l&&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(l){return this.anims?this.anims.get(l):null},exists:function(l){return this.anims?this.anims.has(l):!1},create:function(l){var i=l.key,s=!1;return i&&(s=this.get(i),s?console.warn("Animation key already exists: "+i):(s=new m(this,i,l),this.anims||(this.anims=new h),this.anims.set(i,s))),s},createFromAseprite:function(l,i){return this.animationManager.createFromAseprite(l,i,this.parent)},generateFrameNames:function(l,i){return this.animationManager.generateFrameNames(l,i)},generateFrameNumbers:function(l,i){return this.animationManager.generateFrameNumbers(l,i)},remove:function(l){var i=this.get(l);return i&&(this.currentAnim===i&&this.stop(),this.anims.delete(l)),i},destroy:function(){this.animationManager.off(d.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}}});E.exports=e},57090:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="add"},25312:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="animationcomplete"},89580:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="animationcomplete-"},52860:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="animationrepeat"},63850:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="animationrestart"},99085:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="animationstart"},28087:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="animationstop"},1794:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="animationupdate"},52562:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pauseall"},57953:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="remove"},68339:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resumeall"},74943:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ADD_ANIMATION:n(57090),ANIMATION_COMPLETE:n(25312),ANIMATION_COMPLETE_KEY:n(89580),ANIMATION_REPEAT:n(52860),ANIMATION_RESTART:n(63850),ANIMATION_START:n(99085),ANIMATION_STOP:n(28087),ANIMATION_UPDATE:n(1794),PAUSE_ALL:n(52562),REMOVE_ANIMATION:n(57953),RESUME_ALL:n(68339)}},60421:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Animation:n(42099),AnimationFrame:n(41138),AnimationManager:n(60848),AnimationState:n(9674),Events:n(74943)}},2161:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(90330),x=n(50792),h=n(24736),d=new m({initialize:function(){this.entries=new S,this.events=new x},add:function(t,e){return this.entries.set(t,e),this.events.emit(h.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(h.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});E.exports=d},24047:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(2161),S=n(83419),x=n(8443),h=new S({initialize:function(t){this.game=t,this.binary=new m,this.bitmapFont=new m,this.json=new m,this.physics=new m,this.shader=new m,this.audio=new m,this.video=new m,this.text=new m,this.html=new m,this.obj=new m,this.tilemap=new m,this.xml=new m,this.custom={},this.game.events.once(x.DESTROY,this.destroy,this)},addCustom:function(d){return this.custom.hasOwnProperty(d)||(this.custom[d]=new m),this.custom[d]},destroy:function(){for(var d=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],t=0;t<d.length;t++)this[d[t]].destroy(),this[d[t]]=null;for(var e in this.custom)this.custom[e].destroy();this.custom=null,this.game=null}});E.exports=h},51464:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="add"},59261:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="remove"},24736:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ADD:n(51464),REMOVE:n(59261)}},83388:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={BaseCache:n(2161),CacheManager:n(24047),Events:n(24736)}},71911:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(31401),x=n(39506),h=n(50792),d=n(19715),t=n(87841),e=n(61340),l=n(80333),i=n(26099),s=new m({Extends:h,Mixins:[S.AlphaSingle,S.Visible],initialize:function(o,a,u,f){o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=0),h.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new t,this.dirty=!0,this._x=o,this._y=a,this._width=u,this._height=f,this._bounds=new t,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new e,this.matrixCombined=new e,this.matrixExternal=new e,this.transparent=!0,this.backgroundColor=l("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new i(u/2,f/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.forceComposite=!1,this.renderRoundPixels=!0},addToRenderList:function(r){this.renderList.push(r)},setOrigin:function(r,o){return r===void 0&&(r=.5),o===void 0&&(o=r),this.originX=r,this.originY=o,this},getScroll:function(r,o,a){a===void 0&&(a=new i);var u=this.width*.5,f=this.height*.5;return a.x=r-u,a.y=o-f,this.useBounds&&(a.x=this.clampX(a.x),a.y=this.clampY(a.y)),a},centerOnX:function(r){var o=this.width*.5;return this.midPoint.x=r,this.scrollX=r-o,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(r){var o=this.height*.5;return this.midPoint.y=r,this.scrollY=r-o,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(r,o){return this.centerOnX(r),this.centerOnY(o),this},centerToBounds:function(){if(this.useBounds){var r=this._bounds,o=this.width*.5,a=this.height*.5;this.midPoint.set(r.centerX,r.centerY),this.scrollX=r.centerX-o,this.scrollY=r.centerY-a}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(r){if(this.disableCull)return r;var o=this.matrix.matrix,a=o[0],u=o[1],f=o[2],v=o[3],c=a*v-u*f;if(!c)return r;var g=this.scrollX,p=this.scrollY,T=this.width,C=this.height,M=this.y,A=M+C,R=this.x,P=R+T,L=this.culledObjects,F=r.length;c=1/c,L.length=0;for(var w=0;w<F;++w){var O=r[w];if(!O.hasOwnProperty("width")||O.parentContainer){L.push(O);continue}var B=O.width,I=O.height,D=O.x-g*O.scrollFactorX-B*O.originX,N=O.y-p*O.scrollFactorY-I*O.originY,z=D*a+N*f,V=D*u+N*v,U=(D+B)*a+(N+I)*f,G=(D+B)*u+(N+I)*v;U>R&&z<P&&G>M&&V<A&&L.push(O)}return L},getWorldPoint:function(r,o,a){a===void 0&&(a=new i);var u=this.matrixCombined.matrix,f=u[0],v=u[1],c=u[2],g=u[3],p=u[4],T=u[5],C=f*g-v*c;if(!C)return a.x=r,a.y=o,a;C=1/C;var M=g*C,A=-v*C,R=-c*C,P=f*C,L=(c*T-g*p)*C,F=(v*p-f*T)*C;return a.x=r*M+o*R+L,a.y=r*A+o*P+F,a},ignore:function(r){var o=this.id;Array.isArray(r)||(r=[r]);for(var a=0;a<r.length;a++){var u=r[a];Array.isArray(u)?this.ignore(u):u.isParent?this.ignore(u.getChildren()):u.cameraFilter|=o}return this},clampX:function(r){var o=this._bounds,a=this.displayWidth,u=o.x+(a-this.width)/2,f=Math.max(u,u+o.width-a);return r<u?r=u:r>f&&(r=f),r},clampY:function(r){var o=this._bounds,a=this.displayHeight,u=o.y+(a-this.height)/2,f=Math.max(u,u+o.height-a);return r<u?r=u:r>f&&(r=f),r},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(r){return r===void 0&&(r=0),this.rotation=x(r),this},setBackgroundColor:function(r){return r===void 0&&(r="rgba(0,0,0,0)"),this.backgroundColor=l(r),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(r,o,a,u,f){return f===void 0&&(f=!1),this._bounds.setTo(r,o,a,u),this.dirty=!0,this.useBounds=!0,f?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},setForceComposite:function(r){return this.forceComposite=r,this},getBounds:function(r){r===void 0&&(r=new t);var o=this._bounds;return r.setTo(o.x,o.y,o.width,o.height),r},setName:function(r){return r===void 0&&(r=""),this.name=r,this},setPosition:function(r,o){return o===void 0&&(o=r),this.x=r,this.y=o,this},setRotation:function(r){return r===void 0&&(r=0),this.rotation=r,this},setRoundPixels:function(r){return this.roundPixels=r,this},setScene:function(r,o){o===void 0&&(o=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=r,this.isSceneCamera=o;var a=r.sys;return this.sceneManager=a.game.scene,this.scaleManager=a.scale,this.cameraManager=a.cameras,this.updateSystem(),this},setScroll:function(r,o){return o===void 0&&(o=r),this.scrollX=r,this.scrollY=o,this},setSize:function(r,o){return o===void 0&&(o=r),this.width=r,this.height=o,this},setViewport:function(r,o,a,u){return this.x=r,this.y=o,this.width=a,this.height=u,this},setZoom:function(r,o){return r===void 0&&(r=1),o===void 0&&(o=r),r===0&&(r=.001),o===0&&(o=.001),this.zoomX=r,this.zoomY=o,this},setMask:function(r,o){return o===void 0&&(o=!0),this.mask=r,this._maskCamera=o?this.cameraManager.default:this,this},clearMask:function(r){return r===void 0&&(r=!1),r&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var r={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&&(r.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),r},update:function(){},setIsSceneCamera:function(r){return this.isSceneCamera=r,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var r=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,o=this.sceneManager;r&&!this._customViewport?o.customViewports++:!r&&this._customViewport&&o.customViewports--,this.dirty=!0,this._customViewport=r}},destroy:function(){this.emit(d.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.matrixCombined.destroy(),this.matrixExternal.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(r){this._x=r,this.updateSystem()}},y:{get:function(){return this._y},set:function(r){this._y=r,this.updateSystem()}},width:{get:function(){return this._width},set:function(r){this._width=r,this.updateSystem()}},height:{get:function(){return this._height},set:function(r){this._height=r,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(r){r!==this._scrollX&&(this._scrollX=r,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(r){r!==this._scrollY&&(this._scrollY=r,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(r){this._zoomX=r,this._zoomY=r,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(r){this._zoomX=r,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(r){this._zoomY=r,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(r){this._rotation=r,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}}});E.exports=s},38058:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(71911),S=n(67502),x=n(45319),h=n(83419),d=n(31401),t=n(20052),e=n(19715),l=n(28915),i=n(87841),s=n(26099),r=new h({Extends:m,initialize:function(a,u,f,v){m.call(this,a,u,f,v),this.filters={internal:new d.FilterList(this),external:new d.FilterList(this)},this.isObjectInversion=!1,this.inputEnabled=!0,this.fadeEffect=new t.Fade(this),this.flashEffect=new t.Flash(this),this.shakeEffect=new t.Shake(this),this.panEffect=new t.Pan(this),this.rotateToEffect=new t.RotateTo(this),this.zoomEffect=new t.Zoom(this),this.lerp=new s(1,1),this.followOffset=new s,this.deadzone=null,this._follow=null},setDeadzone:function(o,a){if(o===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=o,this.deadzone.height=a):this.deadzone=new i(0,0,o,a),this._follow){var u=this.width/2,f=this.height/2,v=this._follow.x-this.followOffset.x,c=this._follow.y-this.followOffset.y;this.midPoint.set(v,c),this.scrollX=v-u,this.scrollY=c-f}S(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(o,a,u,f,v,c){return this.fadeEffect.start(!1,o,a,u,f,!0,v,c)},fadeOut:function(o,a,u,f,v,c){return this.fadeEffect.start(!0,o,a,u,f,!0,v,c)},fadeFrom:function(o,a,u,f,v,c,g){return this.fadeEffect.start(!1,o,a,u,f,v,c,g)},fade:function(o,a,u,f,v,c,g){return this.fadeEffect.start(!0,o,a,u,f,v,c,g)},flash:function(o,a,u,f,v,c,g){return this.flashEffect.start(o,a,u,f,v,c,g)},shake:function(o,a,u,f,v){return this.shakeEffect.start(o,a,u,f,v)},pan:function(o,a,u,f,v,c,g){return this.panEffect.start(o,a,u,f,v,c,g)},rotateTo:function(o,a,u,f,v,c,g){return this.rotateToEffect.start(o,a,u,f,v,c,g)},zoomTo:function(o,a,u,f,v,c){return this.zoomEffect.start(o,a,u,f,v,c)},preRender:function(){this.renderList.length=0;var o=this.width,a=this.height,u=o*.5,f=a*.5,v=this.zoomX,c=this.zoomY;this.renderRoundPixels=this.roundPixels&&Number.isInteger(v)&&Number.isInteger(c);var g=o*this.originX,p=a*this.originY,T=this._follow,C=this.deadzone,M=this.scrollX,A=this.scrollY;C&&S(C,this.midPoint.x,this.midPoint.y);var R=!1;if(T&&!this.panEffect.isRunning){var P=this.lerp,L=T.x-this.followOffset.x,F=T.y-this.followOffset.y;C?(L<C.x?M=l(M,M-(C.x-L),P.x):L>C.right&&(M=l(M,M+(L-C.right),P.x)),F<C.y?A=l(A,A-(C.y-F),P.y):F>C.bottom&&(A=l(A,A+(F-C.bottom),P.y))):(M=l(M,L-g,P.x),A=l(A,F-p,P.y)),R=!0}this.useBounds&&(M=this.clampX(M),A=this.clampY(A)),this.scrollX=M,this.scrollY=A;var w=M+u,O=A+f;this.midPoint.set(w,O);var B=o/v,I=a/c,D=w-B/2,N=O-I/2;this.worldView.setTo(D,N,B,I);var z=this.matrix,V=this.matrixExternal;this.isObjectInversion?(z.loadIdentity(),z.translate(g,p),z.scale(v,c),z.rotate(this.rotation),z.translate(-M-g,-A-p)):(z.applyITRS(g,p,this.rotation,v,c),z.translate(-M-g,-A-p)),V.applyITRS(this.x,this.y,0,1,1),this.shakeEffect.preRender(),V.multiply(z,this.matrixCombined),R&&this.emit(e.FOLLOW_UPDATE,this,T)},getViewMatrix:function(o){return o||this.forceComposite||this.filters.external.length>0||this.filters.internal.length>0?this.matrix:this.matrixCombined},setLerp:function(o,a){return o===void 0&&(o=1),a===void 0&&(a=o),this.lerp.set(o,a),this},setFollowOffset:function(o,a){return o===void 0&&(o=0),a===void 0&&(a=0),this.followOffset.set(o,a),this},startFollow:function(o,a,u,f,v,c){a===void 0&&(a=!1),u===void 0&&(u=1),f===void 0&&(f=u),v===void 0&&(v=0),c===void 0&&(c=v),this._follow=o,this.roundPixels=a,u=x(u,0,1),f=x(f,0,1),this.lerp.set(u,f),this.followOffset.set(v,c);var g=this.width/2,p=this.height/2,T=o.x-v,C=o.y-c;return this.midPoint.set(T,C),this.scrollX=T-g,this.scrollY=C-p,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(o,a){this.visible&&(this.rotateToEffect.update(o,a),this.panEffect.update(o,a),this.zoomEffect.update(o,a),this.shakeEffect.update(o,a),this.flashEffect.update(o,a),this.fadeEffect.update(o,a))},destroy:function(){this.resetFX(),this.filters.internal.destroy(),this.filters.external.destroy(),m.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});E.exports=r},32743:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(38058),S=n(83419),x=n(95540),h=n(37277),d=n(37303),t=n(97480),e=n(44594),l=new S({initialize:function(s){this.scene=s,this.systems=s.sys,this.roundPixels=s.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,s.sys.events.once(e.BOOT,this.boot,this),s.sys.events.on(e.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 m(0,0,i.scale.width,i.scale.height).setScene(this.scene),i.game.scale.on(t.RESIZE,this.onResize,this),this.systems.events.once(e.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 s=this.systems.events;s.on(e.UPDATE,this.update,this),s.once(e.SHUTDOWN,this.shutdown,this)},add:function(i,s,r,o,a,u){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=this.scene.sys.scale.width),o===void 0&&(o=this.scene.sys.scale.height),a===void 0&&(a=!1),u===void 0&&(u="");var f=new m(i,s,r,o);return f.setName(u),f.setScene(this.scene),f.setRoundPixels(this.roundPixels),f.id=this.getNextID(),this.cameras.push(f),a&&(this.main=f),f},addExisting:function(i,s){s===void 0&&(s=!1);var r=this.cameras.indexOf(i);return r===-1?(i.id=this.getNextID(),i.setRoundPixels(this.roundPixels),this.cameras.push(i),s&&(this.main=i),i):null},getNextID:function(){for(var i=this.cameras,s=1,r=0;r<32;r++){for(var o=!1,a=0;a<i.length;a++){var u=i[a];if(u&&u.id===s){o=!0;continue}}if(o)s=s<<1;else return s}return 0},getTotal:function(i){i===void 0&&(i=!1);for(var s=0,r=this.cameras,o=0;o<r.length;o++){var a=r[o];(!i||i&&a.visible)&&s++}return s},fromJSON:function(i){Array.isArray(i)||(i=[i]);for(var s=this.scene.sys.scale.width,r=this.scene.sys.scale.height,o=0;o<i.length;o++){var a=i[o],u=x(a,"x",0),f=x(a,"y",0),v=x(a,"width",s),c=x(a,"height",r),g=this.add(u,f,v,c);g.name=x(a,"name",""),g.zoom=x(a,"zoom",1),g.rotation=x(a,"rotation",0),g.scrollX=x(a,"scrollX",0),g.scrollY=x(a,"scrollY",0),g.roundPixels=x(a,"roundPixels",!1),g.visible=x(a,"visible",!0);var p=x(a,"backgroundColor",!1);p&&g.setBackgroundColor(p);var T=x(a,"bounds",null);if(T){var C=x(T,"x",0),M=x(T,"y",0),A=x(T,"width",s),R=x(T,"height",r);g.setBounds(C,M,A,R)}}return this},getCamera:function(i){for(var s=this.cameras,r=0;r<s.length;r++)if(s[r].name===i)return s[r];return null},getCamerasBelowPointer:function(i){for(var s=this.cameras,r=i.x,o=i.y,a=[],u=0;u<s.length;u++){var f=s[u];f.visible&&f.inputEnabled&&d(f,r,o)&&a.unshift(f)}return a},remove:function(i,s){s===void 0&&(s=!0),Array.isArray(i)||(i=[i]);for(var r=0,o=this.cameras,a=0;a<i.length;a++){var u=o.indexOf(i[a]);u!==-1&&(s?o[u].destroy():o[u].renderList=[],o.splice(u,1),r++)}return!this.main&&o[0]&&(this.main=o[0]),r},render:function(i,s){for(var r=this.scene,o=this.cameras,a=0;a<o.length;a++){var u=o[a];if(u.visible&&u.alpha>0){u.preRender();var f=this.getVisibleChildren(s.getChildren(),u);i.render(r,f,u)}}},getVisibleChildren:function(i,s){return i.filter(function(r){return r.willRender(s)})},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,s){for(var r=0;r<this.cameras.length;r++)this.cameras[r].update(i,s)},onResize:function(i,s,r,o,a){for(var u=0;u<this.cameras.length;u++){var f=this.cameras[u];f._x===0&&f._y===0&&f._width===o&&f._height===a&&f.setSize(s.width,s.height)}},resize:function(i,s){for(var r=0;r<this.cameras.length;r++)this.cameras[r].setSize(i,s)},shutdown:function(){this.main=void 0;for(var i=0;i<this.cameras.length;i++)this.cameras[i].destroy();this.cameras=[];var s=this.systems.events;s.off(e.UPDATE,this.update,this),s.off(e.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(e.START,this.start,this),this.systems.events.off(e.DESTROY,this.destroy,this),this.systems.game.scale.off(t.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});h.register("CameraManager",l,"cameras"),E.exports=l},5020:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(19715),h=new S({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(d,t,e,l,i,s,r,o){if(d===void 0&&(d=!0),t===void 0&&(t=1e3),e===void 0&&(e=0),l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=!1),r===void 0&&(r=null),o===void 0&&(o=this.camera.scene),!s&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=t,this.direction=d,this.progress=0,this.red=e,this.green=l,this.blue=i,this.alpha=d?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=r,this._onUpdateScope=o;var a=d?x.FADE_OUT_START:x.FADE_IN_START;return this.camera.emit(a,this.camera,this,t,e,l,i),this.camera},update:function(d,t){this.isRunning&&(this._elapsed+=t,this.progress=m(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(d){if(!this.isRunning&&!this.isComplete)return!1;var t=this.camera;return d.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",d.fillRect(t.x,t.y,t.width,t.height),!0},postRenderWebGL:function(){return this.isRunning||this.isComplete},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var d=this.direction?x.FADE_OUT_COMPLETE:x.FADE_IN_COMPLETE;this.camera.emit(d,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});E.exports=h},10662:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(19715),h=new S({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(d,t,e,l,i,s,r){return d===void 0&&(d=250),t===void 0&&(t=255),e===void 0&&(e=255),l===void 0&&(l=255),i===void 0&&(i=!1),s===void 0&&(s=null),r===void 0&&(r=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=d,this.progress=0,this.red=t,this.green=e,this.blue=l,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=s,this._onUpdateScope=r,this.camera.emit(x.FLASH_START,this.camera,this,d,t,e,l),this.camera)},update:function(d,t){this.isRunning&&(this._elapsed+=t,this.progress=m(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(d){if(!this.isRunning)return!1;var t=this.camera;return d.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",d.fillRect(t.x,t.y,t.width,t.height),!0},postRenderWebGL:function(){return this.isRunning},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(x.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});E.exports=h},20359:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(62640),h=n(19715),d=n(26099),t=new S({initialize:function(l){this.camera=l,this.isRunning=!1,this.duration=0,this.source=new d,this.current=new d,this.destination=new d,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(e,l,i,s,r,o,a){i===void 0&&(i=1e3),s===void 0&&(s=x.Linear),r===void 0&&(r=!1),o===void 0&&(o=null),a===void 0&&(a=this.camera.scene);var u=this.camera;return!r&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(u.scrollX,u.scrollY),this.destination.set(e,l),u.getScroll(e,l,this.current),typeof s=="string"&&x.hasOwnProperty(s)?this.ease=x[s]:typeof s=="function"&&(this.ease=s),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(h.PAN_START,this.camera,this,i,e,l)),u},update:function(e,l){if(this.isRunning){this._elapsed+=l;var i=m(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed<this.duration){var r=this.ease(i);s.getScroll(this.destination.x,this.destination.y,this.current);var o=this.source.x+(this.current.x-this.source.x)*r,a=this.source.y+(this.current.y-this.source.y)*r;s.setScroll(o,a),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,o,a)}else s.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,s.scrollX,s.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(h.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}});E.exports=t},34208:(E,y,n)=>{/**
|
||
* @author Jason Nicholls <nicholls.jason@gmail.com>
|
||
* @copyright 2018 Photon Storm Ltd.
|
||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(19715),h=n(62640),d=n(86554),t=new S({initialize:function(l){this.camera=l,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,l,i,s,r,o,a){i===void 0&&(i=1e3),s===void 0&&(s=h.Linear),r===void 0&&(r=!1),o===void 0&&(o=null),a===void 0&&(a=this.camera.scene),l===void 0&&(l=!1);var u=this.camera;if(!r&&this.isRunning)return u;if(this.shortestPath=l,this.isRunning=!0,this.duration=i,this.progress=0,this.source=u.rotation,this.destination=e,typeof s=="string"&&h.hasOwnProperty(s)?this.ease=h[s]:typeof s=="function"&&(this.ease=s),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.shortestPath){var f=d(this.destination-this.source);this.destination=this.source+f,this.clockwise=f>=0}else this.clockwise=this.destination>=this.source;return this.camera.emit(x.ROTATE_START,this.camera,this,i,this.destination),u},update:function(e,l){if(this.isRunning){this._elapsed+=l;var i=m(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed<this.duration){var r=this.ease(i),o=this.source+r*(this.destination-this.source);s.rotation=o,this.current=o,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,o)}else s.rotation=this.destination,this.current=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(x.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}});E.exports=t},30330:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(19715),h=n(26099),d=new S({initialize:function(e){this.camera=e,this.isRunning=!1,this.duration=0,this.intensity=new h,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,l,i,s){return t===void 0&&(t=100),e===void 0&&(e=.05),l===void 0&&(l=!1),i===void 0&&(i=null),s===void 0&&(s=this.camera.scene),!l&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,typeof e=="number"?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=i,this._onUpdateScope=s,this.camera.emit(x.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=m(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var l=this.intensity,i=this.camera.width,s=this.camera.height,r=this.camera.zoom;this._offsetX=(Math.random()*l.x*i*2-l.x*i)*r,this._offsetY=(Math.random()*l.y*s*2-l.y*s)*r,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(x.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}});E.exports=d},45641:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(62640),h=n(19715),d=new S({initialize:function(e){this.camera=e,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,l,i,s,r){e===void 0&&(e=1e3),l===void 0&&(l=x.Linear),i===void 0&&(i=!1),s===void 0&&(s=null),r===void 0&&(r=this.camera.scene);var o=this.camera;return!i&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=o.zoom,this.destination=t,typeof l=="string"&&x.hasOwnProperty(l)?this.ease=x[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=r,this.camera.emit(h.ZOOM_START,this.camera,this,e,t)),o},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=m(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(h.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});E.exports=d},20052:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Fade:n(5020),Flash:n(10662),Pan:n(20359),Shake:n(30330),RotateTo:n(34208),Zoom:n(45641)}},16438:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="cameradestroy"},32726:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerafadeincomplete"},87807:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerafadeinstart"},45917:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerafadeoutcomplete"},95666:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerafadeoutstart"},47056:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="cameraflashcomplete"},91261:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="cameraflashstart"},45047:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="followupdate"},81927:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerapancomplete"},74264:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerapanstart"},54419:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="postrender"},79330:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="prerender"},93183:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerarotatecomplete"},80112:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerarotatestart"},62252:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerashakecomplete"},86017:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerashakestart"},539:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerazoomcomplete"},51892:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="camerazoomstart"},19715:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={DESTROY:n(16438),FADE_IN_COMPLETE:n(32726),FADE_IN_START:n(87807),FADE_OUT_COMPLETE:n(45917),FADE_OUT_START:n(95666),FLASH_COMPLETE:n(47056),FLASH_START:n(91261),FOLLOW_UPDATE:n(45047),PAN_COMPLETE:n(81927),PAN_START:n(74264),POST_RENDER:n(54419),PRE_RENDER:n(79330),ROTATE_COMPLETE:n(93183),ROTATE_START:n(80112),SHAKE_COMPLETE:n(62252),SHAKE_START:n(86017),ZOOM_COMPLETE:n(539),ZOOM_START:n(51892)}},87969:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Camera:n(38058),BaseCamera:n(71911),CameraManager:n(32743),Effects:n(20052),Events:n(19715)}},63091:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(35154),x=new m({initialize:function(d){this.camera=S(d,"camera",null),this.left=S(d,"left",null),this.right=S(d,"right",null),this.up=S(d,"up",null),this.down=S(d,"down",null),this.zoomIn=S(d,"zoomIn",null),this.zoomOut=S(d,"zoomOut",null),this.zoomSpeed=S(d,"zoomSpeed",.01),this.minZoom=S(d,"minZoom",.001),this.maxZoom=S(d,"maxZoom",1e3),this.speedX=0,this.speedY=0;var t=S(d,"speed",null);typeof t=="number"?(this.speedX=t,this.speedY=t):(this.speedX=S(d,"speed.x",0),this.speedY=S(d,"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(h){return this.camera=h,this},update:function(h){if(this.active){h===void 0&&(h=1);var d=this.camera;this.up&&this.up.isDown?d.scrollY-=this.speedY*h|0:this.down&&this.down.isDown&&(d.scrollY+=this.speedY*h|0),this.left&&this.left.isDown?d.scrollX-=this.speedX*h|0:this.right&&this.right.isDown&&(d.scrollX+=this.speedX*h|0),this.zoomIn&&this.zoomIn.isDown?(d.zoom-=this.zoomSpeed,d.zoom<this.minZoom&&(d.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(d.zoom+=this.zoomSpeed,d.zoom>this.maxZoom&&(d.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}});E.exports=x},58818:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(35154),x=new m({initialize:function(d){this.camera=S(d,"camera",null),this.left=S(d,"left",null),this.right=S(d,"right",null),this.up=S(d,"up",null),this.down=S(d,"down",null),this.zoomIn=S(d,"zoomIn",null),this.zoomOut=S(d,"zoomOut",null),this.zoomSpeed=S(d,"zoomSpeed",.01),this.minZoom=S(d,"minZoom",.001),this.maxZoom=S(d,"maxZoom",1e3),this.accelX=0,this.accelY=0;var t=S(d,"acceleration",null);typeof t=="number"?(this.accelX=t,this.accelY=t):(this.accelX=S(d,"acceleration.x",0),this.accelY=S(d,"acceleration.y",0)),this.dragX=0,this.dragY=0;var e=S(d,"drag",null);typeof e=="number"?(this.dragX=e,this.dragY=e):(this.dragX=S(d,"drag.x",0),this.dragY=S(d,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var l=S(d,"maxSpeed",null);typeof l=="number"?(this.maxSpeedX=l,this.maxSpeedY=l):(this.maxSpeedX=S(d,"maxSpeed.x",0),this.maxSpeedY=S(d,"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(h){return this.camera=h,this},update:function(h){if(this.active){h===void 0&&(h=1);var d=this.camera;this._speedX>0?(this._speedX-=this.dragX*h,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*h,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*h,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*h,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&&(d.scrollX-=this._speedX*h|0),this._speedY!==0&&(d.scrollY-=this._speedY*h|0),this._zoom!==0&&(d.zoom+=this._zoom,d.zoom<this.minZoom?d.zoom=this.minZoom:d.zoom>this.maxZoom&&(d.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}});E.exports=x},38865:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={FixedKeyControl:n(63091),SmoothedKeyControl:n(58818)}},26638:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Controls:n(38865),Scene2D:n(87969)}},8054:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={VERSION:"4.0.0 RC6",LOG_VERSION:"v400",BlendModes:n(10312),ScaleModes:n(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};E.exports=m},69547:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(8054),x=n(42363),h=n(82264),d=n(95540),t=n(35154),e=n(41212),l=n(29747),i=n(75508),s=n(80333),r=new m({initialize:function(a){a===void 0&&(a={});var u=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],f="#ffffff",v=t(a,"scale",null);this.width=t(v,"width",1024,a),this.height=t(v,"height",768,a),this.zoom=t(v,"zoom",1,a),this.parent=t(v,"parent",void 0,a),this.scaleMode=t(v,v?"mode":"scaleMode",0,a),this.expandParent=t(v,"expandParent",!0,a),this.autoRound=t(v,"autoRound",!1,a),this.autoCenter=t(v,"autoCenter",0,a),this.resizeInterval=t(v,"resizeInterval",500,a),this.fullscreenTarget=t(v,"fullscreenTarget",null,a),this.minWidth=t(v,"min.width",0,a),this.maxWidth=t(v,"max.width",0,a),this.minHeight=t(v,"min.height",0,a),this.maxHeight=t(v,"max.height",0,a),this.snapWidth=t(v,"snap.width",0,a),this.snapHeight=t(v,"snap.height",0,a),this.renderType=t(a,"type",S.AUTO),this.canvas=t(a,"canvas",null),this.context=t(a,"context",null),this.canvasStyle=t(a,"canvasStyle",null),this.customEnvironment=t(a,"customEnvironment",!1),this.sceneConfig=t(a,"scene",null),this.seed=t(a,"seed",[(Date.now()*Math.random()).toString()]),i.RND=new i.RandomDataGenerator(this.seed),this.gameTitle=t(a,"title",""),this.gameURL=t(a,"url","https://phaser.io/"+S.LOG_VERSION),this.gameVersion=t(a,"version",""),this.autoFocus=t(a,"autoFocus",!0),this.stableSort=t(a,"stableSort",-1),this.stableSort===-1&&(this.stableSort=h.browser.es2019?1:0),h.features.stableSort=this.stableSort,this.domCreateContainer=t(a,"dom.createContainer",!1),this.domPointerEvents=t(a,"dom.pointerEvents","none"),this.inputKeyboard=t(a,"input.keyboard",!0),this.inputKeyboardEventTarget=t(a,"input.keyboard.target",window),this.inputKeyboardCapture=t(a,"input.keyboard.capture",[]),this.inputMouse=t(a,"input.mouse",!0),this.inputMouseEventTarget=t(a,"input.mouse.target",null),this.inputMousePreventDefaultDown=t(a,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=t(a,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=t(a,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=t(a,"input.mouse.preventDefaultWheel",!0),this.inputTouch=t(a,"input.touch",h.input.touch),this.inputTouchEventTarget=t(a,"input.touch.target",null),this.inputTouchCapture=t(a,"input.touch.capture",!0),this.inputActivePointers=t(a,"input.activePointers",1),this.inputSmoothFactor=t(a,"input.smoothFactor",0),this.inputWindowEvents=t(a,"input.windowEvents",!0),this.inputGamepad=t(a,"input.gamepad",!1),this.inputGamepadEventTarget=t(a,"input.gamepad.target",window),this.disableContextMenu=t(a,"disableContextMenu",!1),this.audio=t(a,"audio",{}),this.hideBanner=t(a,"banner",null)===!1,this.hidePhaser=t(a,"banner.hidePhaser",!1),this.bannerTextColor=t(a,"banner.text",f),this.bannerBackgroundColor=t(a,"banner.background",u),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=t(a,"fps",null);var c=t(a,"render",null);this.autoMobileTextures=t(c,"autoMobileTextures",!0,a),this.antialias=t(c,"antialias",!0,a),this.antialiasGL=t(c,"antialiasGL",!0,a),this.mipmapFilter=t(c,"mipmapFilter","",a),this.desynchronized=t(c,"desynchronized",!1,a),this.roundPixels=t(c,"roundPixels",!1,a),this.selfShadow=t(c,"selfShadow",!1,a),this.pathDetailThreshold=t(c,"pathDetailThreshold",1,a),this.pixelArt=t(c,"pixelArt",this.zoom!==1,a),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.smoothPixelArt=t(c,"smoothPixelArt",!1,a),this.smoothPixelArt&&(this.antialias=!0,this.antialiasGL=!0,this.pixelArt=!1),this.transparent=t(c,"transparent",!1,a),this.clearBeforeRender=t(c,"clearBeforeRender",!0,a),this.preserveDrawingBuffer=t(c,"preserveDrawingBuffer",!1,a),this.premultipliedAlpha=t(c,"premultipliedAlpha",!0,a),this.skipUnreadyShaders=t(c,"skipUnreadyShaders",!1,a),this.failIfMajorPerformanceCaveat=t(c,"failIfMajorPerformanceCaveat",!1,a),this.powerPreference=t(c,"powerPreference","default",a),this.batchSize=t(c,"batchSize",16384,a),this.maxTextures=t(c,"maxTextures",-1,a),this.maxLights=t(c,"maxLights",10,a),this.renderNodes=t(c,"renderNodes",{},a);var g=t(a,"backgroundColor",0);this.backgroundColor=s(g),this.transparent&&(this.backgroundColor=s(0),this.backgroundColor.alpha=0),this.preBoot=t(a,"callbacks.preBoot",l),this.postBoot=t(a,"callbacks.postBoot",l),this.physics=t(a,"physics",{}),this.defaultPhysicsSystem=t(this.physics,"default",!1),this.loaderBaseURL=t(a,"loader.baseURL",""),this.loaderPath=t(a,"loader.path",""),this.loaderMaxParallelDownloads=t(a,"loader.maxParallelDownloads",h.os.android?6:32),this.loaderCrossOrigin=t(a,"loader.crossOrigin",void 0),this.loaderResponseType=t(a,"loader.responseType",""),this.loaderAsync=t(a,"loader.async",!0),this.loaderUser=t(a,"loader.user",""),this.loaderPassword=t(a,"loader.password",""),this.loaderTimeout=t(a,"loader.timeout",0),this.loaderMaxRetries=t(a,"loader.maxRetries",2),this.loaderWithCredentials=t(a,"loader.withCredentials",!1),this.loaderImageLoadType=t(a,"loader.imageLoadType","XHR"),this.loaderLocalScheme=t(a,"loader.localScheme",["file://","capacitor://"]),this.glowQuality=t(a,"filters.glow.quality",10),this.glowDistance=t(a,"filters.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var p=t(a,"plugins",null),T=x.DefaultScene;p&&(Array.isArray(p)?this.defaultPlugins=p:e(p)&&(this.installGlobalPlugins=d(p,"global",[]),this.installScenePlugins=d(p,"scene",[]),Array.isArray(p.default)?T=p.default:Array.isArray(p.defaultMerge)&&(T=T.concat(p.defaultMerge)))),this.defaultPlugins=T;var C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=t(a,"images.default",C+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=t(a,"images.missing",C+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=t(a,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=S.WEBGL:window.FORCE_CANVAS&&(this.renderType=S.CANVAS))}});E.exports=r},86054:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20623),S=n(27919),x=n(8054),h=n(89357),d=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===x.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==x.HEADLESS)if(e.renderType===x.AUTO&&(e.renderType=h.webGL?x.WEBGL:x.CANVAS),e.renderType===x.WEBGL){if(!h.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(e.renderType===x.CANVAS){if(!h.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+e.renderType);e.antialias||S.disableSmoothing();var l=t.scale.baseSize,i=l.width,s=l.height;if(e.canvas?(t.canvas=e.canvas,t.canvas.width=i,t.canvas.height=s):t.canvas=S.create(t,i,s,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||m.setCrisp(t.canvas),e.renderType!==x.HEADLESS){var r,o;r=n(68627),o=n(74797),e.renderType===x.WEBGL?t.renderer=new o(t):(t.renderer=new r(t),t.context=t.renderer.gameContext)}};E.exports=d},96391:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8054),S=function(x){var h=x.config;if(!h.hideBanner){var d="WebGL";h.renderType===m.CANVAS?d="Canvas":h.renderType===m.HEADLESS&&(d="Headless");var t=h.audio,e=x.device.audio,l;if(e.webAudio&&!t.disableWebAudio?l="Web Audio":t.noAudio||!e.webAudio&&!e.audioData?l="No Audio":l="HTML5 Audio",x.device.browser.ie)window.console&&console.log("Phaser v"+m.VERSION+" / https://phaser.io");else{var i="",s=[i];if(Array.isArray(h.bannerBackgroundColor)){var r;h.bannerBackgroundColor.forEach(function(o){i=i.concat("%c "),s.push("background: "+o),r=o}),s[s.length-1]="color: "+h.bannerTextColor+"; background: "+r}else i=i.concat("%c "),s.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor);s.push("background: transparent"),h.gameTitle&&(i=i.concat(h.gameTitle),h.gameVersion&&(i=i.concat(" v"+h.gameVersion)),h.hidePhaser||(i=i.concat(" / "))),h.hidePhaser||(i=i.concat("Phaser v"+m.VERSION+" ("+d+" | "+l+")")),i=i.concat(" %c "+h.gameURL),s[0]=i,console.log.apply(console,s)}}};E.exports=S},50127:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40366),S=n(60848),x=n(24047),h=n(27919),d=n(83419),t=n(69547),e=n(83719),l=n(86054),i=n(45893),s=n(96391),r=n(82264),o=n(57264),a=n(50792),u=n(8443),f=n(7003),v=n(37277),c=n(77332),g=n(76531),p=n(60903),T=n(69442),C=n(17130),M=n(65898),A=n(51085),R=n(14747),P=new d({initialize:function(F){this.config=new t(F),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new a,this.anims=new S(this),this.textures=new C(this),this.cache=new x(this),this.registry=new i(this,new a),this.input=new f(this,this.config),this.scene=new p(this,this.config.sceneConfig),this.device=r,this.scale=new g(this,this.config),this.sound=null,this.sound=R.create(this),this.loop=new M(this,this.config.fps),this.plugins=new c(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,o(this.boot.bind(this))},boot:function(){if(!v.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),e(this),s(this),m(this.canvas,this.config.parent),this.textures.once(T.READY,this.texturesReady,this),this.events.emit(u.BOOT)},texturesReady:function(){this.events.emit(u.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 L=this.events;L.on(u.HIDDEN,this.onHidden,this),L.on(u.VISIBLE,this.onVisible,this),L.on(u.BLUR,this.onBlur,this),L.on(u.FOCUS,this.onFocus,this)},step:function(L,F){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var w=this.events;w.emit(u.PRE_STEP,L,F),w.emit(u.STEP,L,F),this.scene.update(L,F),w.emit(u.POST_STEP,L,F);var O=this.renderer;O.preRender(),w.emit(u.PRE_RENDER,O,L,F),this.scene.render(O),O.postRender(),w.emit(u.POST_RENDER,O,L,F)}},headlessStep:function(L,F){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var w=this.events;w.emit(u.PRE_STEP,L,F),w.emit(u.STEP,L,F),this.scene.update(L,F),w.emit(u.POST_STEP,L,F),this.scene.isProcessing=!1,w.emit(u.PRE_RENDER,null,L,F),w.emit(u.POST_RENDER,null,L,F)}},onHidden:function(){this.loop.pause(),this.events.emit(u.PAUSE)},pause:function(){var L=this.isPaused;this.isPaused=!0,L||this.events.emit(u.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(u.RESUME,this.loop.pauseDuration)},resume:function(){var L=this.isPaused;this.isPaused=!1,L&&this.events.emit(u.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(L,F){F===void 0&&(F=!1),this.pendingDestroy=!0,this.removeCanvas=L,this.noReturn=F},runDestroy:function(){this.scene.destroy(),this.events.emit(u.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(h.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}});E.exports=P},65898:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(35154),x=n(29747),h=n(43092),d=new m({initialize:function(e,l){this.game=e,this.raf=new h,this.started=!1,this.running=!1,this.minFps=S(l,"min",5),this.targetFps=S(l,"target",60),this.fpsLimit=S(l,"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=x,this.forceSetTimeOut=S(l,"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=S(l,"deltaHistory",10),this.panicMax=S(l,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=S(l,"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 t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=Math.min(this._target,this.deltaHistory[e]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(t){if(this.started)return this;this.started=!0,this.running=!0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=t;var l=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(l,this.forceSetTimeOut,this._target)},smoothDelta:function(t){var e=this.deltaIndex,l=this.deltaHistory,i=this.deltaSmoothingMax;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=l[e],t=Math.min(t,this._min)),l[e]=t,this.deltaIndex++,this.deltaIndex>=i&&(this.deltaIndex=0);for(var s=0,r=0;r<i;r++)s+=l[r];return s/=i,s},updateFPS:function(t){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0},stepLimitFPS:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta+=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){t===void 0&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var l=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(l,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});E.exports=d},51085:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8443),S=function(x){var h,d=x.events;if(document.hidden!==void 0)h="visibilitychange";else{var t=["webkit","moz","ms"];t.forEach(function(l){document[l+"Hidden"]!==void 0&&(document.hidden=function(){return document[l+"Hidden"]},h=l+"visibilitychange")})}var e=function(l){document.hidden||l.type==="pause"?d.emit(m.HIDDEN):d.emit(m.VISIBLE)};h&&document.addEventListener(h,e,!1),window.onblur=function(){d.emit(m.BLUR)},window.onfocus=function(){d.emit(m.FOCUS)},window.focus&&x.config.autoFocus&&window.focus()};E.exports=S},97217:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="blur"},47548:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="boot"},19814:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="contextlost"},68446:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="destroy"},41700:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="focus"},25432:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="hidden"},65942:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pause"},59211:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="postrender"},47789:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="poststep"},39066:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="prerender"},460:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="prestep"},16175:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="ready"},42331:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resume"},11966:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="step"},32969:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="systemready"},94830:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="visible"},8443:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={BLUR:n(97217),BOOT:n(47548),CONTEXT_LOST:n(19814),DESTROY:n(68446),FOCUS:n(41700),HIDDEN:n(25432),PAUSE:n(65942),POST_RENDER:n(59211),POST_STEP:n(47789),PRE_RENDER:n(39066),PRE_STEP:n(460),READY:n(16175),RESUME:n(42331),STEP:n(11966),SYSTEM_READY:n(32969),VISIBLE:n(94830)}},42857:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Config:n(69547),CreateRenderer:n(86054),DebugHeader:n(96391),Events:n(8443),TimeStep:n(65898),VisibilityHandler:n(51085)}},46728:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(36316),x=n(80021),h=n(26099),d=new m({Extends:x,initialize:function(e,l,i,s){x.call(this,"CubicBezierCurve"),Array.isArray(e)&&(s=new h(e[6],e[7]),i=new h(e[4],e[5]),l=new h(e[2],e[3]),e=new h(e[0],e[1])),this.p0=e,this.p1=l,this.p2=i,this.p3=s},getStartPoint:function(t){return t===void 0&&(t=new h),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){e===void 0&&(e=new h);var l=this.p0,i=this.p1,s=this.p2,r=this.p3;return e.set(S(t,l.x,i.x,s.x,r.x),S(t,l.y,i.y,s.y,r.y))},draw:function(t,e){e===void 0&&(e=32);var l=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var i=1;i<l.length;i++)t.lineTo(l[i].x,l[i].y);return t.strokePath(),t},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]}}});d.fromJSON=function(t){var e=t.points,l=new h(e[0],e[1]),i=new h(e[2],e[3]),s=new h(e[4],e[5]),r=new h(e[6],e[7]);return new d(l,i,s,r)},E.exports=d},80021:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(19217),x=n(87841),h=n(26099),d=new m({initialize:function(e){this.type=e,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new h,this._tmpVec2B=new h},draw:function(t,e){return e===void 0&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new x),e===void 0&&(e=16);var l=this.getLength();e>l&&(e=l/2);var i=Math.max(1,Math.round(l/e));return S(this.getSpacedPoints(i),t)},getDistancePoints:function(t){var e=this.getLength(),l=Math.max(1,e/t);return this.getSpacedPoints(l)},getEndPoint:function(t){return t===void 0&&(t=new h),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],l,i=this.getPoint(0,this._tmpVec2A),s=0;e.push(0);for(var r=1;r<=t;r++)l=this.getPoint(r/t,this._tmpVec2B),s+=l.distance(i),e.push(s),i.copy(l);return this.cacheArcLengths=e,e},getPointAt:function(t,e){var l=this.getUtoTmapping(t);return this.getPoint(l,e)},getPoints:function(t,e,l){l===void 0&&(l=[]),t||(e?t=this.getLength()/e:t=this.defaultDivisions);for(var i=0;i<=t;i++)l.push(this.getPoint(i/t));return l},getRandomPoint:function(t){return t===void 0&&(t=new h),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,l){l===void 0&&(l=[]),t||(e?t=this.getLength()/e:t=this.defaultDivisions);for(var i=0;i<=t;i++){var s=this.getUtoTmapping(i/t,null,t);l.push(this.getPoint(s))}return l},getStartPoint:function(t){return t===void 0&&(t=new h),this.getPointAt(0,t)},getTangent:function(t,e){e===void 0&&(e=new h);var l=1e-4,i=t-l,s=t+l;return i<0&&(i=0),s>1&&(s=1),this.getPoint(i,this._tmpVec2A),this.getPoint(s,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var l=this.getUtoTmapping(t);return this.getTangent(l,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,l){var i=this.getLengths(l),s=0,r=i.length,o;e?o=Math.min(e,i[r-1]):o=t*i[r-1];for(var a=0,u=r-1,f;a<=u;)if(s=Math.floor(a+(u-a)/2),f=i[s]-o,f<0)a=s+1;else if(f>0)u=s-1;else{u=s;break}if(s=u,i[s]===o)return s/(r-1);var v=i[s],c=i[s+1],g=c-v,p=(o-v)/g;return(s+p)/(r-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});E.exports=d},73825:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(80021),x=n(39506),h=n(35154),d=n(43396),t=n(26099),e=new m({Extends:S,initialize:function(i,s,r,o,a,u,f,v){if(typeof i=="object"){var c=i;i=h(c,"x",0),s=h(c,"y",0),r=h(c,"xRadius",0),o=h(c,"yRadius",r),a=h(c,"startAngle",0),u=h(c,"endAngle",360),f=h(c,"clockwise",!1),v=h(c,"rotation",0)}else o===void 0&&(o=r),a===void 0&&(a=0),u===void 0&&(u=360),f===void 0&&(f=!1),v===void 0&&(v=0);S.call(this,"EllipseCurve"),this.p0=new t(i,s),this._xRadius=r,this._yRadius=o,this._startAngle=x(a),this._endAngle=x(u),this._clockwise=f,this._rotation=x(v)},getStartPoint:function(l){return l===void 0&&(l=new t),this.getPoint(0,l)},getResolution:function(l){return l*2},getPoint:function(l,i){i===void 0&&(i=new t);for(var s=Math.PI*2,r=this._endAngle-this._startAngle,o=Math.abs(r)<Number.EPSILON;r<0;)r+=s;for(;r>s;)r-=s;r<Number.EPSILON&&(o?r=0:r=s),this._clockwise&&!o&&(r===s?r=-s:r=r-s);var a=this._startAngle+l*r,u=this.p0.x+this._xRadius*Math.cos(a),f=this.p0.y+this._yRadius*Math.sin(a);if(this._rotation!==0){var v=Math.cos(this._rotation),c=Math.sin(this._rotation),g=u-this.p0.x,p=f-this.p0.y;u=g*v-p*c+this.p0.x,f=g*c+p*v+this.p0.y}return i.set(u,f)},setXRadius:function(l){return this.xRadius=l,this},setYRadius:function(l){return this.yRadius=l,this},setWidth:function(l){return this.xRadius=l/2,this},setHeight:function(l){return this.yRadius=l/2,this},setStartAngle:function(l){return this.startAngle=l,this},setEndAngle:function(l){return this.endAngle=l,this},setClockwise:function(l){return this.clockwise=l,this},setRotation:function(l){return this.rotation=l,this},x:{get:function(){return this.p0.x},set:function(l){this.p0.x=l}},y:{get:function(){return this.p0.y},set:function(l){this.p0.y=l}},xRadius:{get:function(){return this._xRadius},set:function(l){this._xRadius=l}},yRadius:{get:function(){return this._yRadius},set:function(l){this._yRadius=l}},startAngle:{get:function(){return d(this._startAngle)},set:function(l){this._startAngle=x(l)}},endAngle:{get:function(){return d(this._endAngle)},set:function(l){this._endAngle=x(l)}},clockwise:{get:function(){return this._clockwise},set:function(l){this._clockwise=l}},angle:{get:function(){return d(this._rotation)},set:function(l){this._rotation=x(l)}},rotation:{get:function(){return this._rotation},set:function(l){this._rotation=l}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:d(this._startAngle),endAngle:d(this._endAngle),clockwise:this._clockwise,rotation:d(this._rotation)}}});e.fromJSON=function(l){return new e(l)},E.exports=e},33951:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(80021),x=n(19217),h=n(87841),d=n(26099),t=new m({Extends:S,initialize:function(l,i){S.call(this,"LineCurve"),Array.isArray(l)&&(i=new d(l[2],l[3]),l=new d(l[0],l[1])),this.p0=l,this.p1=i,this.arcLengthDivisions=1},getBounds:function(e){return e===void 0&&(e=new h),x([this.p0,this.p1],e)},getStartPoint:function(e){return e===void 0&&(e=new d),e.copy(this.p0)},getResolution:function(e){return e===void 0&&(e=1),e},getPoint:function(e,l){return l===void 0&&(l=new d),e===1?l.copy(this.p1):(l.copy(this.p1).subtract(this.p0).scale(e).add(this.p0),l)},getPointAt:function(e,l){return this.getPoint(e,l)},getTangent:function(e,l){return l===void 0&&(l=new d),l.copy(this.p1).subtract(this.p0).normalize(),l},getUtoTmapping:function(e,l,i){var s;if(l){var r=this.getLengths(i),o=r[r.length-1],a=Math.min(l,o);s=a/o}else s=e;return s},draw:function(e){return e.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),e},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});t.fromJSON=function(e){var l=e.points,i=new d(l[0],l[1]),s=new d(l[2],l[3]);return new t(i,s)},E.exports=t},14744:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(80021),x=n(32112),h=n(26099),d=new m({Extends:S,initialize:function(e,l,i){S.call(this,"QuadraticBezierCurve"),Array.isArray(e)&&(i=new h(e[4],e[5]),l=new h(e[2],e[3]),e=new h(e[0],e[1])),this.p0=e,this.p1=l,this.p2=i},getStartPoint:function(t){return t===void 0&&(t=new h),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){e===void 0&&(e=new h);var l=this.p0,i=this.p1,s=this.p2;return e.set(x(t,l.x,i.x,s.x),x(t,l.y,i.y,s.y))},draw:function(t,e){e===void 0&&(e=32);var l=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var i=1;i<l.length;i++)t.lineTo(l[i].x,l[i].y);return t.strokePath(),t},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]}}});d.fromJSON=function(t){var e=t.points,l=new h(e[0],e[1]),i=new h(e[2],e[3]),s=new h(e[4],e[5]);return new d(l,i,s)},E.exports=d},42534:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87842),S=n(83419),x=n(80021),h=n(26099),d=new S({Extends:x,initialize:function(e){e===void 0&&(e=[]),x.call(this,"SplineCurve"),this.points=[],this.addPoints(e)},addPoints:function(t){for(var e=0;e<t.length;e++){var l=new h;typeof t[e]=="number"?(l.x=t[e],l.y=t[e+1],e++):Array.isArray(t[e])?(l.x=t[e][0],l.y=t[e][1]):(l.x=t[e].x,l.y=t[e].y),this.points.push(l)}return this},addPoint:function(t,e){var l=new h(t,e);return this.points.push(l),l},getStartPoint:function(t){return t===void 0&&(t=new h),t.copy(this.points[0])},getResolution:function(t){return t*this.points.length},getPoint:function(t,e){e===void 0&&(e=new h);var l=this.points,i=(l.length-1)*t,s=Math.floor(i),r=i-s,o=l[s===0?s:s-1],a=l[s],u=l[s>l.length-2?l.length-1:s+1],f=l[s>l.length-3?l.length-1:s+2];return e.set(m(r,o.x,a.x,u.x,f.x),m(r,o.y,a.y,u.y,f.y))},toJSON:function(){for(var t=[],e=0;e<this.points.length;e++)t.push(this.points[e].x),t.push(this.points[e].y);return{type:this.type,points:t}}});d.fromJSON=function(t){return new d(t.points)},E.exports=d},25410:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Path:n(46669),MoveTo:n(68618),CubicBezier:n(46728),Curve:n(80021),Ellipse:n(73825),Line:n(33951),QuadraticBezier:n(14744),Spline:n(42534)}},68618:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(26099),x=new m({initialize:function(d,t){this.active=!1,this.p0=new S(d,t)},getPoint:function(h,d){return d===void 0&&(d=new S),d.copy(this.p0)},getPointAt:function(h,d){return this.getPoint(h,d)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});E.exports=x},46669:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(46728),x=n(73825),h=n(39429),d=n(33951),t=n(68618),e=n(14744),l=n(87841),i=n(42534),s=n(26099),r=n(36383),o=new m({initialize:function(u,f){u===void 0&&(u=0),f===void 0&&(f=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new s,this._tmpVec2A=new s,this._tmpVec2B=new s,typeof u=="object"?this.fromJSON(u):this.startPoint.set(u,f)},add:function(a){return this.curves.push(a),this},circleTo:function(a,u,f){return u===void 0&&(u=!1),this.ellipseTo(a,a,0,360,u,f)},closePath:function(){var a=this.curves[0].getPoint(0),u=this.curves[this.curves.length-1].getPoint(1);return a.equals(u)||this.curves.push(new d(u,a)),this},cubicBezierTo:function(a,u,f,v,c,g){var p=this.getEndPoint(),T,C,M;return a instanceof s?(T=a,C=u,M=f):(T=new s(f,v),C=new s(c,g),M=new s(a,u)),this.add(new S(p,T,C,M))},quadraticBezierTo:function(a,u,f,v){var c=this.getEndPoint(),g,p;return a instanceof s?(g=a,p=u):(g=new s(f,v),p=new s(a,u)),this.add(new e(c,g,p))},draw:function(a,u){for(var f=0;f<this.curves.length;f++){var v=this.curves[f];v.active&&v.draw(a,u)}return a},ellipseTo:function(a,u,f,v,c,g){var p=new x(0,0,a,u,f,v,c,g),T=this.getEndPoint(this._tmpVec2A),C=p.getStartPoint(this._tmpVec2B);return T.subtract(C),p.x=T.x,p.y=T.y,this.add(p)},fromJSON:function(a){this.curves=[],this.cacheLengths=[],this.startPoint.set(a.x,a.y),this.autoClose=a.autoClose;for(var u=0;u<a.curves.length;u++){var f=a.curves[u];switch(f.type){case"LineCurve":this.add(d.fromJSON(f));break;case"EllipseCurve":this.add(x.fromJSON(f));break;case"SplineCurve":this.add(i.fromJSON(f));break;case"CubicBezierCurve":this.add(S.fromJSON(f));break;case"QuadraticBezierCurve":this.add(e.fromJSON(f));break}}return this},getBounds:function(a,u){a===void 0&&(a=new l),u===void 0&&(u=16),a.x=Number.MAX_VALUE,a.y=Number.MAX_VALUE;for(var f=new l,v=r.MIN_SAFE_INTEGER,c=r.MIN_SAFE_INTEGER,g=0;g<this.curves.length;g++){var p=this.curves[g];p.active&&(p.getBounds(f,u),a.x=Math.min(a.x,f.x),a.y=Math.min(a.y,f.y),v=Math.max(v,f.right),c=Math.max(c,f.bottom))}return a.right=v,a.bottom=c,a},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],u=0,f=0;f<this.curves.length;f++)u+=this.curves[f].getLength(),a.push(u);return this.cacheLengths=a,a},getCurveAt:function(a){for(var u=a*this.getLength(),f=this.getCurveLengths(),v=0;v<f.length;){if(f[v]>=u)return this.curves[v];v++}return null},getEndPoint:function(a){return a===void 0&&(a=new s),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,a):a.copy(this.startPoint),a},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},getPoint:function(a,u){u===void 0&&(u=new s);for(var f=a*this.getLength(),v=this.getCurveLengths(),c=0;c<v.length;){if(v[c]>=f){var g=v[c]-f,p=this.curves[c],T=p.getLength(),C=T===0?0:1-g/T;return p.getPointAt(C,u)}c++}return null},getPoints:function(a,u){!a&&!u&&(a=this.defaultDivisions);for(var f=[],v,c=0;c<this.curves.length;c++){var g=this.curves[c];if(g.active)for(var p=g.getResolution(a),T=g.getPoints(p,u),C=0;C<T.length;C++){var M=T[C];v&&v.equals(M)||(f.push(M),v=M)}}return this.autoClose&&f.length>1&&!f[f.length-1].equals(f[0])&&f.push(f[0]),f},getRandomPoint:function(a){return a===void 0&&(a=new s),this.getPoint(Math.random(),a)},getSpacedPoints:function(a){a===void 0&&(a=40);for(var u=[],f=0;f<=a;f++)u.push(this.getPoint(f/a));return this.autoClose&&u.push(u[0]),u},getStartPoint:function(a){return a===void 0&&(a=new s),a.copy(this.startPoint)},getTangent:function(a,u){u===void 0&&(u=new s);for(var f=a*this.getLength(),v=this.getCurveLengths(),c=0;c<v.length;){if(v[c]>=f){var g=v[c]-f,p=this.curves[c],T=p.getLength(),C=T===0?0:1-g/T;return p.getTangentAt(C,u)}c++}return null},lineTo:function(a,u){a instanceof s?this._tmpVec2B.copy(a):typeof a=="object"?this._tmpVec2B.setFromObject(a):this._tmpVec2B.set(a,u);var f=this.getEndPoint(this._tmpVec2A);return this.add(new d([f.x,f.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(a){return a.unshift(this.getEndPoint()),this.add(new i(a))},moveTo:function(a,u){return a instanceof s?this.add(new t(a.x,a.y)):this.add(new t(a,u))},toJSON:function(){for(var a=[],u=0;u<this.curves.length;u++)a.push(this.curves[u].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:a}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});h.register("path",function(a,u){return new o(a,u)}),E.exports=o},45893:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(24882),x=new m({initialize:function(d,t){this.parent=d,this.events=t,t||(this.events=d.events?d.events:d),this.list={},this.values={},this._frozen=!1,!d.hasOwnProperty("sys")&&this.events&&this.events.once(S.DESTROY,this.destroy,this)},get:function(h){var d=this.list;if(Array.isArray(h)){for(var t=[],e=0;e<h.length;e++)t.push(d[h[e]]);return t}else return d[h]},getAll:function(){var h={};for(var d in this.list)this.list.hasOwnProperty(d)&&(h[d]=this.list[d]);return h},query:function(h){var d={};for(var t in this.list)this.list.hasOwnProperty(t)&&t.match(h)&&(d[t]=this.list[t]);return d},set:function(h,d){if(this._frozen)return this;if(typeof h=="string")return this.setValue(h,d);for(var t in h)this.setValue(t,h[t]);return this},inc:function(h,d){if(this._frozen)return this;d===void 0&&(d=1);var t=this.get(h);return t===void 0&&(t=0),this.set(h,t+d),this},toggle:function(h){return this._frozen?this:(this.set(h,!this.get(h)),this)},setValue:function(h,d){if(this._frozen)return this;if(this.has(h))this.values[h]=d;else{var t=this,e=this.list,l=this.events,i=this.parent;Object.defineProperty(this.values,h,{enumerable:!0,configurable:!0,get:function(){return e[h]},set:function(s){if(!t._frozen){var r=e[h];e[h]=s,l.emit(S.CHANGE_DATA,i,h,s,r),l.emit(S.CHANGE_DATA_KEY+h,i,s,r)}}}),e[h]=d,l.emit(S.SET_DATA,i,h,d)}return this},each:function(h,d){for(var t=[this.parent,null,void 0],e=1;e<arguments.length;e++)t.push(arguments[e]);for(var l in this.list)t[1]=l,t[2]=this.list[l],h.apply(d,t);return this},merge:function(h,d){d===void 0&&(d=!0);for(var t in h)h.hasOwnProperty(t)&&(d||!d&&!this.has(t))&&this.setValue(t,h[t]);return this},remove:function(h){if(this._frozen)return this;if(Array.isArray(h))for(var d=0;d<h.length;d++)this.removeValue(h[d]);else return this.removeValue(h);return this},removeValue:function(h){if(this.has(h)){var d=this.list[h];delete this.list[h],delete this.values[h],this.events.emit(S.REMOVE_DATA,this.parent,h,d)}return this},pop:function(h){var d=void 0;return!this._frozen&&this.has(h)&&(d=this.list[h],delete this.list[h],delete this.values[h],this.events.emit(S.REMOVE_DATA,this.parent,h,d)),d},has:function(h){return this.list.hasOwnProperty(h)},setFreeze:function(h){return this._frozen=h,this},reset:function(){for(var h in this.list)delete this.list[h],delete this.values[h];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(S.CHANGE_DATA),this.events.off(S.SET_DATA),this.events.off(S.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(h){this._frozen=!!h}},count:{get:function(){var h=0;for(var d in this.list)this.list[d]!==void 0&&h++;return h}}});E.exports=x},63646:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(45893),x=n(37277),h=n(44594),d=new m({Extends:S,initialize:function(e){S.call(this,e,e.sys.events),this.scene=e,this.systems=e.sys,e.sys.events.once(h.BOOT,this.boot,this),e.sys.events.on(h.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){S.prototype.destroy.call(this),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null}});x.register("DataManagerPlugin",d,"data"),E.exports=d},10700:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="changedata"},93608:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="changedata-"},60883:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="destroy"},69780:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="removedata"},22166:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="setdata"},24882:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CHANGE_DATA:n(10700),CHANGE_DATA_KEY:n(93608),DESTROY:n(60883),REMOVE_DATA:n(69780),SET_DATA:n(22166)}},44965:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={DataManager:n(45893),DataManagerPlugin:n(63646),Events:n(24882)}},7098:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(84148),S={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function x(){if(typeof importScripts=="function")return S;S.audioData=!!window.Audio,S.webAudio=!!(window.AudioContext||window.webkitAudioContext);var h=document.createElement("audio"),d=!!h.canPlayType;try{if(d){var t=function(i,s){var r=h.canPlayType("audio/"+i).replace(/^no$/,"");return s?!!(r||h.canPlayType("audio/"+s).replace(/^no$/,"")):!!r};if(S.ogg=t('ogg; codecs="vorbis"'),S.opus=t('ogg; codecs="opus"',"opus"),S.mp3=t("mpeg"),S.wav=t("wav"),S.m4a=t("x-m4a"),S.aac=t("aac"),S.flac=t("flac","x-flac"),S.webm=t('webm; codecs="vorbis"'),h.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(m.edge)S.dolby=!0;else if(m.safari&&m.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var e=parseInt(RegExp.$1,10),l=parseInt(RegExp.$2,10);(e===10&&l>=11||e>10)&&(S.dolby=!0)}}}}catch{}return S}E.exports=x()},84148:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25892),S={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function x(){var h=navigator.userAgent;return/Edg\/\d+/.test(h)?(S.edge=!0,S.es2019=!0):/OPR/.test(h)?(S.opera=!0,S.es2019=!0):/Chrome\/(\d+)/.test(h)&&!m.windowsPhone?(S.chrome=!0,S.chromeVersion=parseInt(RegExp.$1,10),S.es2019=S.chromeVersion>69):/Firefox\D+(\d+)/.test(h)?(S.firefox=!0,S.firefoxVersion=parseInt(RegExp.$1,10),S.es2019=S.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(h)&&m.iOS?(S.mobileSafari=!0,S.es2019=!0):/MSIE (\d+\.\d+);/.test(h)?(S.ie=!0,S.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(h)&&!m.windowsPhone?(S.safari=!0,S.safariVersion=parseInt(RegExp.$1,10),S.es2019=S.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(h)&&(S.ie=!0,S.trident=!0,S.tridentVersion=parseInt(RegExp.$1,10),S.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(h)&&(S.silk=!0),S}E.exports=x()},89289:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(27919),S={supportInverseAlpha:!1,supportNewBlendModes:!1};function x(){var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",e="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",l=new Image;return l.onload=function(){var i=new Image;i.onload=function(){var s=m.create2D(i,6),r=s.getContext("2d",{willReadFrequently:!0});if(r.globalCompositeOperation="multiply",r.drawImage(l,0,0),r.drawImage(i,2,0),!r.getImageData(2,0,1,1))return!1;var o=r.getImageData(2,0,1,1).data;m.remove(i),S.supportNewBlendModes=o[0]===255&&o[1]===0&&o[2]===0},i.src=t+"/wCKxvRF"+e},l.src=t+"AP804Oa6"+e,!1}function h(){var t=m.create2D(this,2),e=t.getContext("2d",{willReadFrequently:!0});e.fillStyle="rgba(10, 20, 30, 0.5)",e.fillRect(0,0,1,1);var l=e.getImageData(0,0,1,1);if(l===null)return!1;e.putImageData(l,1,0);var i=e.getImageData(1,0,1,1),s=i.data[0]===l.data[0]&&i.data[1]===l.data[1]&&i.data[2]===l.data[2]&&i.data[3]===l.data[3];return m.remove(this),s}function d(){return typeof importScripts!="function"&&document!==void 0&&(S.supportNewBlendModes=x(),S.supportInverseAlpha=h()),S}E.exports=d()},89357:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25892),S=n(84148),x=n(27919),h={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 d(){var e=new ArrayBuffer(4),l=new Uint8Array(e),i=new Uint32Array(e);return l[0]=161,l[1]=178,l[2]=195,l[3]=212,i[0]===3569595041?!0:i[0]===2712847316?!1:null}function t(){if(typeof importScripts=="function")return h;h.canvas=!!window.CanvasRenderingContext2D;try{h.localStorage=!!localStorage.getItem}catch{h.localStorage=!1}h.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,h.fileSystem=!!window.requestFileSystem;var e=!1,l=function(){if(window.WebGLRenderingContext)try{var i=x.createWebGL(this),s=i.getContext("webgl")||i.getContext("experimental-webgl"),r=x.create2D(this),o=r.getContext("2d",{willReadFrequently:!0}),a=o.createImageData(1,1);return e=a.data instanceof Uint8ClampedArray,x.remove(i),x.remove(r),!!s}catch{return!1}return!1};return h.webGL=l(),h.worker=!!window.Worker,h.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,h.getUserMedia=h.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,S.firefox&&S.firefoxVersion<21&&(h.getUserMedia=!1),!m.iOS&&(S.ie||S.firefox||S.chrome)&&(h.canvasBitBltShift=!0),(S.safari||S.mobileSafari)&&(h.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(h.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(h.littleEndian=d()),h.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&h.littleEndian!==null&&e,h}E.exports=t()},91639:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={available:!1,cancel:"",keyboard:!1,request:""};function n(){if(typeof importScripts=="function")return y;var m,S="Fullscreen",x="FullScreen",h=["request"+S,"request"+x,"webkitRequest"+S,"webkitRequest"+x,"msRequest"+S,"msRequest"+x,"mozRequest"+x,"mozRequest"+S];for(m=0;m<h.length;m++)if(document.documentElement[h[m]]){y.available=!0,y.request=h[m];break}var d=["cancel"+x,"exit"+S,"webkitCancel"+x,"webkitExit"+S,"msCancel"+x,"msExit"+S,"mozCancel"+x,"mozExit"+S];if(y.available){for(m=0;m<d.length;m++)if(document[d[m]]){y.cancel=d[m];break}}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(y.keyboard=!0),Object.defineProperty(y,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),y}E.exports=n()},31784:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(84148),S={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function x(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(S.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(S.mspointer=!0),navigator.getGamepads&&(S.gamepads=!0),"onwheel"in window||m.ie&&"WheelEvent"in window?S.wheelEvent="wheel":"onmousewheel"in window?S.wheelEvent="mousewheel":m.firefox&&"MouseScrollEvent"in window&&(S.wheelEvent="DOMMouseScroll")),S}E.exports=x()},25892:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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 n(){if(typeof importScripts=="function")return y;var m=navigator.userAgent;/Windows/.test(m)?y.windows=!0:/Mac OS/.test(m)&&!/like Mac OS/.test(m)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(y.iOS=!0,y.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),y.iOSVersion=parseInt(RegExp.$1,10)):y.macOS=!0:/Android/.test(m)?y.android=!0:/Linux/.test(m)?y.linux=!0:/iP[ao]d|iPhone/i.test(m)?(y.iOS=!0,navigator.appVersion.match(/OS (\d+)/),y.iOSVersion=parseInt(RegExp.$1,10),y.iPhone=m.toLowerCase().indexOf("iphone")!==-1,y.iPad=m.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(m)||/\bKF[A-Z][A-Z]+/.test(m)||/Silk.*Mobile Safari/.test(m)?y.kindle=!0:/CrOS/.test(m)&&(y.chromeOS=!0),(/Windows Phone/i.test(m)||/IEMobile/i.test(m))&&(y.android=!1,y.iOS=!1,y.macOS=!1,y.windows=!0,y.windowsPhone=!0);var S=/Silk/.test(m);return(y.windows||y.macOS||y.linux&&!S||y.chromeOS)&&(y.desktop=!0),(y.windowsPhone||/Windows NT/i.test(m)&&/Touch/i.test(m))&&(y.desktop=!1),navigator.standalone&&(y.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(y.cordova=!0),window.ejecta!==void 0&&(y.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(y.node=!0),y.node&&typeof process.versions=="object"&&(y.nodeWebkit=!!process.versions["node-webkit"],y.electron=!!process.versions.electron),/Crosswalk/.test(m)&&(y.crosswalk=!0),y.pixelRatio=window.devicePixelRatio||1,y}E.exports=n()},43267:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S={h264:!1,hls:!1,mov:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function x(){if(typeof importScripts=="function")return S;var h=document.createElement("video"),d=!!h.canPlayType,t=/^no$/;try{d&&(h.canPlayType('video/ogg; codecs="theora"').replace(t,"")&&(S.ogg=!0),h.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(t,"")&&(S.h264=!0,S.mp4=!0),h.canPlayType('video/quicktime4; codecs="avc1.42E01E"').replace(t,"")&&(S.mov=!0),h.canPlayType("video/x-m4v").replace(t,"")&&(S.m4v=!0),h.canPlayType('video/webm; codecs="vp8, vorbis"').replace(t,"")&&(S.webm=!0),h.canPlayType('video/webm; codecs="vp9"').replace(t,"")&&(S.vp9=!0),h.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(t,"")&&(S.hls=!0))}catch{}return h.parentNode&&h.parentNode.removeChild(h),S.getVideoURL=function(e){Array.isArray(e)||(e=[e]);for(var l=0;l<e.length;l++){var i=m(e[l],"url",e[l]);if(i.indexOf("blob:")===0)return{url:i,type:""};var s;if(i.indexOf("data:")===0?s=i.split(",")[0].match(/\/(.*?);/):s=i.match(/\.([a-zA-Z0-9]+)($|\?)/),s=m(e[l],"type",s?s[1]:"").toLowerCase(),S[s])return{url:i,type:s}}return null},S}E.exports=x()},82264:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={os:n(25892),browser:n(84148),features:n(89357),input:n(31784),audio:n(7098),video:n(43267),fullscreen:n(91639),canvasFeatures:n(89289)}},89422:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new Float32Array(20),x=new m({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(h){return this._matrix.set(h),this._dirty=!0,this},reset:function(){var h=this._matrix;return h.fill(0),h[0]=1,h[6]=1,h[12]=1,h[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var h=this._data;return this._dirty&&(h.set(this._matrix),h[4]/=255,h[9]/=255,h[14]/=255,h[19]/=255,this._dirty=!1),h},brightness:function(h,d){h===void 0&&(h=0),d===void 0&&(d=!1);var t=h;return this.multiply([t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0],d)},saturate:function(h,d){h===void 0&&(h=0),d===void 0&&(d=!1);var t=h*2/3+1,e=(t-1)*-.5;return this.multiply([t,e,e,0,0,e,t,e,0,0,e,e,t,0,0,0,0,0,1,0],d)},desaturate:function(h){return h===void 0&&(h=!1),this.saturate(-1,h)},hue:function(h,d){h===void 0&&(h=0),d===void 0&&(d=!1),h=h/180*Math.PI;var t=Math.cos(h),e=Math.sin(h),l=.213,i=.715,s=.072;return this.multiply([l+t*(1-l)+e*-l,i+t*-i+e*-i,s+t*-s+e*(1-s),0,0,l+t*-l+e*.143,i+t*(1-i)+e*.14,s+t*-s+e*-.283,0,0,l+t*-l+e*-.787,i+t*-i+e*i,s+t*(1-s)+e*s,0,0,0,0,0,1,0],d)},grayscale:function(h,d){return h===void 0&&(h=1),d===void 0&&(d=!1),this.saturate(-h,d)},blackWhite:function(h){return h===void 0&&(h=!1),this.multiply(x.BLACK_WHITE,h)},contrast:function(h,d){h===void 0&&(h=0),d===void 0&&(d=!1);var t=h+1,e=-.5*(t-1);return this.multiply([t,0,0,0,e,0,t,0,0,e,0,0,t,0,e,0,0,0,1,0],d)},negative:function(h){return h===void 0&&(h=!1),this.multiply(x.NEGATIVE,h)},desaturateLuminance:function(h){return h===void 0&&(h=!1),this.multiply(x.DESATURATE_LUMINANCE,h)},sepia:function(h){return h===void 0&&(h=!1),this.multiply(x.SEPIA,h)},night:function(h,d){return h===void 0&&(h=.1),d===void 0&&(d=!1),this.multiply([h*-2,-h,0,0,0,-h,0,h,0,0,0,h,h*2,0,0,0,0,0,1,0],d)},lsd:function(h){return h===void 0&&(h=!1),this.multiply(x.LSD,h)},brown:function(h){return h===void 0&&(h=!1),this.multiply(x.BROWN,h)},vintagePinhole:function(h){return h===void 0&&(h=!1),this.multiply(x.VINTAGE,h)},kodachrome:function(h){return h===void 0&&(h=!1),this.multiply(x.KODACHROME,h)},technicolor:function(h){return h===void 0&&(h=!1),this.multiply(x.TECHNICOLOR,h)},polaroid:function(h){return h===void 0&&(h=!1),this.multiply(x.POLAROID,h)},shiftToBGR:function(h){return h===void 0&&(h=!1),this.multiply(x.SHIFT_BGR,h)},multiply:function(h,d){d===void 0&&(d=!1),d||this.reset();var t=this._matrix,e=S;return e.set(t),t.set([e[0]*h[0]+e[1]*h[5]+e[2]*h[10]+e[3]*h[15],e[0]*h[1]+e[1]*h[6]+e[2]*h[11]+e[3]*h[16],e[0]*h[2]+e[1]*h[7]+e[2]*h[12]+e[3]*h[17],e[0]*h[3]+e[1]*h[8]+e[2]*h[13]+e[3]*h[18],e[0]*h[4]+e[1]*h[9]+e[2]*h[14]+e[3]*h[19]+e[4],e[5]*h[0]+e[6]*h[5]+e[7]*h[10]+e[8]*h[15],e[5]*h[1]+e[6]*h[6]+e[7]*h[11]+e[8]*h[16],e[5]*h[2]+e[6]*h[7]+e[7]*h[12]+e[8]*h[17],e[5]*h[3]+e[6]*h[8]+e[7]*h[13]+e[8]*h[18],e[5]*h[4]+e[6]*h[9]+e[7]*h[14]+e[8]*h[19]+e[9],e[10]*h[0]+e[11]*h[5]+e[12]*h[10]+e[13]*h[15],e[10]*h[1]+e[11]*h[6]+e[12]*h[11]+e[13]*h[16],e[10]*h[2]+e[11]*h[7]+e[12]*h[12]+e[13]*h[17],e[10]*h[3]+e[11]*h[8]+e[12]*h[13]+e[13]*h[18],e[10]*h[4]+e[11]*h[9]+e[12]*h[14]+e[13]*h[19]+e[14],e[15]*h[0]+e[16]*h[5]+e[17]*h[10]+e[18]*h[15],e[15]*h[1]+e[16]*h[6]+e[17]*h[11]+e[18]*h[16],e[15]*h[2]+e[16]*h[7]+e[17]*h[12]+e[18]*h[17],e[15]*h[3]+e[16]*h[8]+e[17]*h[13]+e[18]*h[18],e[15]*h[4]+e[16]*h[9]+e[17]*h[14]+e[18]*h[19]+e[19]]),this._dirty=!0,this}});x.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],x.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],x.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],x.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],x.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],x.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],x.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],x.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],x.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],x.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],x.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],E.exports=x},51767:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(29747),x=new m({initialize:function(d,t,e){this._rgb=[0,0,0],this.onChangeCallback=S,this.dirty=!1,this.set(d,t,e)},set:function(h,d,t){return h===void 0&&(h=0),d===void 0&&(d=0),t===void 0&&(t=0),this._rgb=[h,d,t],this.onChange(),this},equals:function(h,d,t){var e=this._rgb;return e[0]===h&&e[1]===d&&e[2]===t},onChange:function(){this.dirty=!0;var h=this._rgb;this.onChangeCallback.call(this,h[0],h[1],h[2])},r:{get:function(){return this._rgb[0]},set:function(h){this._rgb[0]=h,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(h){this._rgb[1]=h,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(h){this._rgb[2]=h,this.onChange()}},destroy:function(){this.onChangeCallback=null}});E.exports=x},60461:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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};E.exports=y},54312:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(35893),x=n(86327),h=n(88417),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)+l),x(t,m(e)+i),t};E.exports=d},46768:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(26541),x=n(86327),h=n(385),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)-l),x(t,m(e)+i),t};E.exports=d},35827:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(54380),x=n(86327),h=n(40136),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)+l),x(t,m(e)+i),t};E.exports=d},46871:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66786),S=n(35893),x=n(7702),h=function(d,t,e,l){return e===void 0&&(e=0),l===void 0&&(l=0),m(d,S(t)+e,x(t)+l),d};E.exports=h},5198:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7702),S=n(26541),x=n(20786),h=n(385),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)-l),x(t,m(e)+i),t};E.exports=d},11879:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(60461),S=[];S[m.BOTTOM_CENTER]=n(54312),S[m.BOTTOM_LEFT]=n(46768),S[m.BOTTOM_RIGHT]=n(35827),S[m.CENTER]=n(46871),S[m.LEFT_CENTER]=n(5198),S[m.RIGHT_CENTER]=n(80503),S[m.TOP_CENTER]=n(89698),S[m.TOP_LEFT]=n(922),S[m.TOP_RIGHT]=n(21373),S[m.LEFT_BOTTOM]=S[m.BOTTOM_LEFT],S[m.LEFT_TOP]=S[m.TOP_LEFT],S[m.RIGHT_BOTTOM]=S[m.BOTTOM_RIGHT],S[m.RIGHT_TOP]=S[m.TOP_RIGHT];var x=function(h,d,t,e,l){return S[t](h,d,e,l)};E.exports=x},80503:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7702),S=n(54380),x=n(20786),h=n(40136),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)+l),x(t,m(e)+i),t};E.exports=d},89698:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35893),S=n(17717),x=n(88417),h=n(66737),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),x(t,m(e)+l),h(t,S(e)-i),t};E.exports=d},922:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26541),S=n(17717),x=n(385),h=n(66737),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),x(t,m(e)-l),h(t,S(e)-i),t};E.exports=d},21373:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(54380),S=n(17717),x=n(40136),h=n(66737),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),x(t,m(e)+l),h(t,S(e)-i),t};E.exports=d},91660:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={BottomCenter:n(54312),BottomLeft:n(46768),BottomRight:n(35827),Center:n(46871),LeftCenter:n(5198),QuickSet:n(11879),RightCenter:n(80503),TopCenter:n(89698),TopLeft:n(922),TopRight:n(21373)}},71926:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(60461),S=n(79291),x={In:n(91660),To:n(16694)};x=S(!1,x,m),E.exports=x},21578:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(35893),x=n(88417),h=n(66737),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),x(t,S(e)+l),h(t,m(e)+i),t};E.exports=d},10210:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(26541),x=n(385),h=n(66737),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),x(t,S(e)-l),h(t,m(e)+i),t};E.exports=d},82341:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(54380),x=n(40136),h=n(66737),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),x(t,S(e)+l),h(t,m(e)+i),t};E.exports=d},87958:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(26541),x=n(86327),h=n(40136),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)-l),x(t,m(e)+i),t};E.exports=d},40080:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7702),S=n(26541),x=n(20786),h=n(40136),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)-l),x(t,m(e)+i),t};E.exports=d},88466:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26541),S=n(17717),x=n(40136),h=n(66737),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),x(t,m(e)-l),h(t,S(e)-i),t};E.exports=d},38829:(E,y,n)=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(60461),S=[];S[m.BOTTOM_CENTER]=n(21578),S[m.BOTTOM_LEFT]=n(10210),S[m.BOTTOM_RIGHT]=n(82341),S[m.LEFT_BOTTOM]=n(87958),S[m.LEFT_CENTER]=n(40080),S[m.LEFT_TOP]=n(88466),S[m.RIGHT_BOTTOM]=n(19211),S[m.RIGHT_CENTER]=n(34609),S[m.RIGHT_TOP]=n(48741),S[m.TOP_CENTER]=n(49440),S[m.TOP_LEFT]=n(81288),S[m.TOP_RIGHT]=n(61323);var x=function(h,d,t,e,l){return S[t](h,d,e,l)};E.exports=x},19211:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(54380),x=n(86327),h=n(385),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)+l),x(t,m(e)+i),t};E.exports=d},34609:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7702),S=n(54380),x=n(20786),h=n(385),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,S(e)+l),x(t,m(e)+i),t};E.exports=d},48741:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(54380),S=n(17717),x=n(385),h=n(66737),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),x(t,m(e)+l),h(t,S(e)-i),t};E.exports=d},49440:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35893),S=n(17717),x=n(86327),h=n(88417),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,m(e)+l),x(t,S(e)-i),t};E.exports=d},81288:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26541),S=n(17717),x=n(86327),h=n(385),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,m(e)-l),x(t,S(e)-i),t};E.exports=d},61323:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(54380),S=n(17717),x=n(86327),h=n(40136),d=function(t,e,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),h(t,m(e)+l),x(t,S(e)-i),t};E.exports=d},16694:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={BottomCenter:n(21578),BottomLeft:n(10210),BottomRight:n(82341),LeftBottom:n(87958),LeftCenter:n(40080),LeftTop:n(88466),QuickSet:n(38829),RightBottom:n(19211),RightCenter:n(34609),RightTop:n(48741),TopCenter:n(49440),TopLeft:n(81288),TopRight:n(61323)}},66786:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(88417),S=n(20786),x=function(h,d,t){return m(h,d),S(h,t)};E.exports=x},62235:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.y+n.height-n.height*n.originY};E.exports=y},72873:(E,y,n)=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62235),S=n(26541),x=n(54380),h=n(17717),d=n(87841),t=function(e,l){l===void 0&&(l=new d);var i=S(e),s=h(e);return l.x=i,l.y=s,l.width=x(e)-i,l.height=m(e)-s,l};E.exports=t},35893:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.x-n.width*n.originX+n.width*.5};E.exports=y},7702:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.y-n.height*n.originY+n.height*.5};E.exports=y},26541:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.x-n.width*n.originX};E.exports=y},87431:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.width*n.originX};E.exports=y},46928:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.height*n.originY};E.exports=y},54380:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.x+n.width-n.width*n.originX};E.exports=y},17717:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.y-n.height*n.originY};E.exports=y},86327:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.y=m-n.height+n.height*n.originY,n};E.exports=y},88417:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.width*n.originX;return n.x=m+S-n.width*.5,n};E.exports=y},20786:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.height*n.originY;return n.y=m+S-n.height*.5,n};E.exports=y},385:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x=m+n.width*n.originX,n};E.exports=y},40136:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x=m-n.width+n.width*n.originX,n};E.exports=y},66737:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.y=m+n.height*n.originY,n};E.exports=y},58724:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CenterOn:n(66786),GetBottom:n(62235),GetBounds:n(72873),GetCenterX:n(35893),GetCenterY:n(7702),GetLeft:n(26541),GetOffsetX:n(87431),GetOffsetY:n(46928),GetRight:n(54380),GetTop:n(17717),SetBottom:n(86327),SetCenterX:n(88417),SetCenterY:n(20786),SetLeft:n(385),SetRight:n(40136),SetTop:n(66737)}},20623:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setCrisp:function(n){var m=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return m.forEach(function(S){n.style["image-rendering"]=S}),n.style.msInterpolationMode="nearest-neighbor",n},setBicubic:function(n){return n.style["image-rendering"]="auto",n.style.msInterpolationMode="bicubic",n}};E.exports=y},27919:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8054),S=n(68703),x=[],h=!1,d=function(){var t=function(f,v,c,g,p){v===void 0&&(v=1),c===void 0&&(c=1),g===void 0&&(g=m.CANVAS),p===void 0&&(p=!1);var T,C=i(g);return C===null?(C={parent:f,canvas:document.createElement("canvas"),type:g},g===m.CANVAS&&x.push(C),T=C.canvas):(C.parent=f,T=C.canvas),p&&(C.parent=T),T.width=v,T.height=c,h&&g===m.CANVAS&&S.disable(T.getContext("2d",{willReadFrequently:!1})),T},e=function(f,v,c){return t(f,v,c,m.CANVAS)},l=function(f,v,c){return t(f,v,c,m.WEBGL)},i=function(f){if(f===void 0&&(f=m.CANVAS),f===m.WEBGL)return null;for(var v=0;v<x.length;v++){var c=x[v];if(!c.parent&&c.type===f)return c}return null},s=function(f){var v=f instanceof HTMLCanvasElement;x.forEach(function(c){(v&&c.canvas===f||!v&&c.parent===f)&&(c.parent=null,c.canvas.width=1,c.canvas.height=1)})},r=function(){var f=0;return x.forEach(function(v){v.parent&&f++}),f},o=function(){return x.length-r()},a=function(){h=!0},u=function(){h=!1};return{create2D:e,create:t,createWebGL:l,disableSmoothing:a,enableSmoothing:u,first:i,free:o,pool:x,remove:s,total:r}};E.exports=d()},68703:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y="",n=function(){var m=function(d){for(var t=["i","webkitI","msI","mozI","oI"],e=0;e<t.length;e++){var l=t[e]+"mageSmoothingEnabled";if(l in d)return l}return null},S=function(d){return y===""&&(y=m(d)),y&&(d[y]=!0),d},x=function(d){return y===""&&(y=m(d)),y&&(d[y]=!1),d},h=function(d){return y!==null?d[y]:null};return{disable:x,enable:S,getPrefix:m,isEnabled:h}};E.exports=n()},65208:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m="none"),n.style.msTouchAction=m,n.style["ms-touch-action"]=m,n.style["touch-action"]=m,n};E.exports=y},91610:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m="none");var S=["-webkit-","-khtml-","-moz-","-ms-",""];return S.forEach(function(x){n.style[x+"user-select"]=m}),n.style["-webkit-touch-callout"]=m,n.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",n};E.exports=y},26253:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CanvasInterpolation:n(20623),CanvasPool:n(27919),Smoothing:n(68703),TouchAction:n(65208),UserSelect:n(91610)}},40987:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(37589),x=n(1e3),h=n(7537),d=n(87837),t=new m({initialize:function(l,i,s,r){l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=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(l,i,s,r)},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(e,l,i,s,r){return s===void 0&&(s=255),r===void 0&&(r=!0),this._locked=!0,this.red=e,this.green=l,this.blue=i,this.alpha=s,this._locked=!1,this.update(r)},setGLTo:function(e,l,i,s){return s===void 0&&(s=1),this._locked=!0,this.redGL=e,this.greenGL=l,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(e){return this._locked=!0,this.red=e.r,this.green=e.g,this.blue=e.b,e.hasOwnProperty("a")&&(this.alpha=e.a),this._locked=!1,this.update(!0)},setFromHSV:function(e,l,i){return h(e,l,i,this)},update:function(e){if(e===void 0&&(e=!1),this._locked)return this;var l=this.r,i=this.g,s=this.b,r=this.a;return this._color=S(l,i,s),this._color32=x(l,i,s,r),this._rgba="rgba("+l+","+i+","+s+","+r/255+")",e&&d(l,i,s,this),this},updateHSV:function(){var e=this.r,l=this.g,i=this.b;return d(e,l,i,this),this},clone:function(){return new t(this.r,this.g,this.b,this.a)},gray:function(e){return this.setTo(e,e,e)},random:function(e,l){e===void 0&&(e=0),l===void 0&&(l=255);var i=Math.floor(e+Math.random()*(l-e)),s=Math.floor(e+Math.random()*(l-e)),r=Math.floor(e+Math.random()*(l-e));return this.setTo(i,s,r)},randomGray:function(e,l){e===void 0&&(e=0),l===void 0&&(l=255);var i=Math.floor(e+Math.random()*(l-e));return this.setTo(i,i,i)},saturate:function(e){return this.s+=e/100,this},desaturate:function(e){return this.s-=e/100,this},lighten:function(e){return this.v+=e/100,this},darken:function(e){return this.v-=e/100,this},brighten:function(e){var l=this.r,i=this.g,s=this.b;return l=Math.max(0,Math.min(255,l-Math.round(255*-(e/100)))),i=Math.max(0,Math.min(255,i-Math.round(255*-(e/100)))),s=Math.max(0,Math.min(255,s-Math.round(255*-(e/100)))),this.setTo(l,i,s)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(e){this.gl[0]=Math.min(Math.abs(e),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(e){this.gl[1]=Math.min(Math.abs(e),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(e){this.gl[2]=Math.min(Math.abs(e),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(e){this.gl[3]=Math.min(Math.abs(e),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(e){e=Math.floor(Math.abs(e)),this.r=Math.min(e,255),this.gl[0]=e/255,this.update(!0)}},green:{get:function(){return this.g},set:function(e){e=Math.floor(Math.abs(e)),this.g=Math.min(e,255),this.gl[1]=e/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(e){e=Math.floor(Math.abs(e)),this.b=Math.min(e,255),this.gl[2]=e/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(e){e=Math.floor(Math.abs(e)),this.a=Math.min(e,255),this.gl[3]=e/255,this.update()}},h:{get:function(){return this._h},set:function(e){this._h=e,h(e,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(e){this._s=e,h(this._h,e,this._v,this)}},v:{get:function(){return this._v},set:function(e){this._v=e,h(this._h,this._s,e,this)}}});E.exports=t},92728:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37589),S=function(x){x===void 0&&(x=1024);var h=[],d=255,t,e=255,l=0,i=0;for(t=0;t<=d;t++)h.push({r:e,g:t,b:i,color:m(e,t,i)});for(l=255,t=d;t>=0;t--)h.push({r:t,g:l,b:i,color:m(t,l,i)});for(e=0,t=0;t<=d;t++,l--)h.push({r:e,g:l,b:t,color:m(e,l,t)});for(l=0,i=255,t=0;t<=d;t++,i--,e++)h.push({r:e,g:l,b:i,color:m(e,l,i)});if(x===1024)return h;var s=[],r=0,o=1024/x;for(t=0;t<x;t++)s.push(h[Math.floor(r)]),r+=o;return s};E.exports=S},91588:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m={r:n>>16&255,g:n>>8&255,b:n&255,a:255};return n>16777215&&(m.a=n>>>24),m};E.exports=y},62957:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=n.toString(16);return m.length===1?"0"+m:m};E.exports=y},37589:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n<<16|m<<8|S};E.exports=y},1e3:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){return x<<24|n<<16|m<<8|S};E.exports=y},62183:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40987),S=n(89528),x=function(h,d,t){var e=t,l=t,i=t;if(d!==0){var s=t<.5?t*(1+d):t+d-t*d,r=2*t-s;e=S(r,s,h+1/3),l=S(r,s,h),i=S(r,s,h-1/3)}var o=new m;return o.setGLTo(e,l,i,1)};E.exports=x},27939:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7537),S=function(x,h){x===void 0&&(x=1),h===void 0&&(h=1);for(var d=[],t=0;t<=359;t++)d.push(m(t/359,x,h));return d};E.exports=S},7537:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37589);function S(h,d,t,e){var l=(h+d*6)%6,i=Math.min(l,4-l,1);return Math.round(255*(e-e*t*Math.max(0,i)))}var x=function(h,d,t,e){d===void 0&&(d=1),t===void 0&&(t=1);var l=S(5,h,d,t),i=S(3,h,d,t),s=S(1,h,d,t);return e?e.setTo?e.setTo(l,i,s,e.alpha,!0):(e.r=l,e.g=i,e.b=s,e.color=m(l,i,s),e):{r:l,g:i,b:s,color:m(l,i,s)}};E.exports=x},70238:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40987),S=function(x){var h=new m;x=x.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(i,s,r,o){return s+s+r+r+o+o});var d=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(x);if(d){var t=parseInt(d[1],16),e=parseInt(d[2],16),l=parseInt(d[3],16);h.setTo(t,e,l)}return h};E.exports=S},89528:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return S<0&&(S+=1),S>1&&(S-=1),S<.16666666666666666?n+(m-n)*6*S:S<.5?m:S<.6666666666666666?n+(m-n)*(.6666666666666666-S)*6:n};E.exports=y},30100:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40987),S=n(90664),x=function(h){var d=S(h);return new m(d.r,d.g,d.b,d.a)};E.exports=x},90664:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n>16777215?{a:n>>>24,r:n>>16&255,g:n>>8&255,b:n&255}:{a:255,r:n>>16&255,g:n>>8&255,b:n&255}};E.exports=y},13699:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(28915),S=n(37589),x=function(t,e,l,i,s,r,o,a){o===void 0&&(o=100),a===void 0&&(a=0);var u=a/o,f=m(t,i,u),v=m(e,s,u),c=m(l,r,u);return{r:f,g:v,b:c,a:255,color:S(f,v,c)}},h=function(t,e,l,i){return l===void 0&&(l=100),i===void 0&&(i=0),x(t.r,t.g,t.b,e.r,e.g,e.b,l,i)},d=function(t,e,l,i,s,r){return s===void 0&&(s=100),r===void 0&&(r=0),x(t.r,t.g,t.b,e,l,i,s,r)};E.exports={RGBWithRGB:x,ColorWithRGB:d,ColorWithColor:h}},68957:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40987),S=function(x){return new m(x.r,x.g,x.b,x.a)};E.exports=S},87388:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40987),S=function(x){var h=new m,d=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(x.toLowerCase());if(d){var t=parseInt(d[1],10),e=parseInt(d[2],10),l=parseInt(d[3],10),i=d[4]!==void 0?parseFloat(d[4]):1;h.setTo(t,e,l,i*255)}return h};E.exports=S},87837:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){x===void 0&&(x={h:0,s:0,v:0}),n/=255,m/=255,S/=255;var h=Math.min(n,m,S),d=Math.max(n,m,S),t=d-h,e=0,l=d===0?0:t/d,i=d;return d!==h&&(d===n?e=(m-S)/t+(m<S?6:0):d===m?e=(S-n)/t+2:d===S&&(e=(n-m)/t+4),e/=6),x.hasOwnProperty("_h")?(x._h=e,x._s=l,x._v=i):(x.h=e,x.s=l,x.v=i),x};E.exports=y},75723:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62957),S=function(x,h,d,t,e){return t===void 0&&(t=255),e===void 0&&(e="#"),e==="#"?"#"+((1<<24)+(x<<16)+(h<<8)+d).toString(16).slice(1,7):"0x"+m(t)+m(x)+m(h)+m(d)};E.exports=S},85386:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(30976),S=n(40987),x=function(h,d){return h===void 0&&(h=0),d===void 0&&(d=255),new S(m(h,d),m(h,d),m(h,d))};E.exports=x},80333:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70238),S=n(30100),x=n(68957),h=n(87388),d=function(t){var e=typeof t;switch(e){case"string":return t.substr(0,3).toLowerCase()==="rgb"?h(t):m(t);case"number":return S(t);case"object":return x(t)}};E.exports=d},3956:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40987);m.ColorSpectrum=n(92728),m.ColorToRGBA=n(91588),m.ComponentToHex=n(62957),m.GetColor=n(37589),m.GetColor32=n(1e3),m.HexStringToColor=n(70238),m.HSLToColor=n(62183),m.HSVColorWheel=n(27939),m.HSVToRGB=n(7537),m.HueToComponent=n(89528),m.IntegerToColor=n(30100),m.IntegerToRGB=n(90664),m.Interpolate=n(13699),m.ObjectToColor=n(68957),m.RandomRGB=n(85386),m.RGBStringToColor=n(87388),m.RGBToHSV=n(87837),m.RGBToString=n(75723),m.ValueToColor=n(80333),E.exports=m},27460:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Align:n(71926),BaseShader:n(73894),Bounds:n(58724),Canvas:n(26253),Color:n(3956),ColorMatrix:n(89422),Masks:n(69781),RGB:n(51767)}},80661:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d){this.geometryMask=d},setShape:function(x){return this.geometryMask=x,this},preRenderCanvas:function(x,h,d){var t=this.geometryMask;x.currentContext.save(),t.renderCanvas(x,t,d,null,null,!0),x.currentContext.clip()},postRenderCanvas:function(x){x.currentContext.restore()},destroy:function(){this.geometryMask=null}});E.exports=S},69781:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={GeometryMask:n(80661)}},73894:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t){t===void 0&&(t={}),this.key=h,this.glsl=d,this.metadata=t}});E.exports=S},40366:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S;if(m)typeof m=="string"?S=document.getElementById(m):typeof m=="object"&&m.nodeType===1&&(S=m);else if(n.parentElement||m===null)return n;return S||(S=document.body),S.appendChild(n),n};E.exports=y},83719:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40366),S=function(x){var h=x.config;if(!(!h.parent||!h.domCreateContainer)){var d=document.createElement("div");d.style.cssText=["display: block;","width: "+x.scale.width+"px;","height: "+x.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+h.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),x.domContainer=d,m(d,h.parent)}};E.exports=S},57264:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25892),S=function(x){if(document.readyState==="complete"||document.readyState==="interactive"){x();return}var h=function(){document.removeEventListener("deviceready",h,!0),document.removeEventListener("DOMContentLoaded",h,!0),window.removeEventListener("load",h,!0),x()};document.body?m.cordova?document.addEventListener("deviceready",h,!1):(document.addEventListener("DOMContentLoaded",h,!0),window.addEventListener("load",h,!0)):window.setTimeout(h,20)};E.exports=S},57811:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){if(!n)return window.innerHeight;var m=Math.abs(window.orientation),S={w:0,h:0},x=document.createElement("div");return x.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(x),S.w=m===90?x.offsetHeight:window.innerWidth,S.h=m===90?window.innerWidth:x.offsetHeight,document.documentElement.removeChild(x),x=null,Math.abs(window.orientation)!==90?S.h:S.w};E.exports=y},45818:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(13560),S=function(x,h){var d=window.screen,t=d?d.orientation||d.mozOrientation||d.msOrientation:!1;if(t&&typeof t.type=="string")return t.type;if(typeof t=="string")return t;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?m.ORIENTATION.PORTRAIT:m.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return m.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return m.ORIENTATION.LANDSCAPE}else return h>x?m.ORIENTATION.PORTRAIT:m.ORIENTATION.LANDSCAPE};E.exports=S},74403:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m;return n!==""&&(typeof n=="string"?m=document.getElementById(n):n&&n.nodeType===1&&(m=n)),m||(m=document.body),m};E.exports=y},56836:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m="";try{if(window.DOMParser){var S=new DOMParser;m=S.parseFromString(n,"text/xml")}else m=new ActiveXObject("Microsoft.XMLDOM"),m.loadXML(n)}catch{m=null}return!m||!m.documentElement||m.getElementsByTagName("parsererror").length?null:m};E.exports=y},35846:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){n.parentNode&&n.parentNode.removeChild(n)};E.exports=y},43092:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(29747),x=new m({initialize:function(){this.isRunning=!1,this.callback=S,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var d=this;this.step=function t(e){d.callback(e),d.isRunning&&(d.timeOutID=window.requestAnimationFrame(t))},this.stepTimeout=function t(){d.isRunning&&(d.timeOutID=window.setTimeout(t,d.delay)),d.callback(window.performance.now())}},start:function(h,d,t){this.isRunning||(this.callback=h,this.isSetTimeOut=d,this.delay=t,this.isRunning=!0,this.timeOutID=d?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=S}});E.exports=x},84902:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={AddToDOM:n(40366),DOMContentLoaded:n(57264),GetInnerHeight:n(57811),GetScreenOrientation:n(45818),GetTarget:n(74403),ParseXML:n(56836),RemoveFromDOM:n(35846),RequestAnimationFrame:n(43092)};E.exports=m},47565:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50792),x=n(37277),h=new m({Extends:S,initialize:function(){S.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});x.register("EventEmitter",h,"events"),E.exports=h},93055:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={EventEmitter:n(47565)}},10189:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t){t===void 0&&(t=1),S.call(this,d,"FilterBarrel"),this.amount=t}});E.exports=x},16762:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t,e,l,i){t===void 0&&(t="__WHITE"),e===void 0&&(e=0),l===void 0&&(l=1),i===void 0&&(i=[1,1,1,1]),S.call(this,d,"FilterBlend"),this.glTexture,this.blendMode=e,this.amount=l,this.color=i,this.setTexture(t)},setTexture:function(h){var d=this.camera.scene.sys.textures.getFrame(h);return d&&(this.glTexture=d.glTexture),this}});E.exports=x},37597:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t){S.call(this,d,"FilterBlocky"),this.size={x:4,y:4},this.offset={x:0,y:0},t&&(t.size!==void 0&&(typeof t.size=="number"?(this.size.x=t.size,this.size.y=t.size):(this.size.x=t.size.x,this.size.y=t.size.y)),t.offset!==void 0&&(typeof t.offset=="number"?(this.offset.x=t.offset,this.offset.y=t.offset):(this.offset.x=t.offset.x,this.offset.y=t.offset.y)))}});E.exports=x},88344:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t,e,l,i,s,r){t===void 0&&(t=0),e===void 0&&(e=2),l===void 0&&(l=2),i===void 0&&(i=1),r===void 0&&(r=4),S.call(this,d,"FilterBlur"),this.quality=t,this.x=e,this.y=l,this.strength=i,this.glcolor=[1,1,1],s!=null&&(this.color=s),this.steps=r},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var d=this.glcolor;d[0]=(h>>16&255)/255,d[1]=(h>>8&255)/255,d[2]=(h&255)/255}},getPadding:function(){var h=this.paddingOverride;if(h)return this.currentPadding.setTo(h.x,h.y,h.width,h.height),h;var d=this.quality,t=d===0?1.333:d===1?3.2307692308:5.176470588235294,e=this.steps*this.strength*t,l=Math.ceil(this.x*e),i=Math.ceil(this.y*e);return this.currentPadding.setTo(-l,-i,l*2,i*2),this.currentPadding}});E.exports=x},47564:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t,e,l,i,s,r,o){t===void 0&&(t=.5),e===void 0&&(e=1),l===void 0&&(l=.2),i===void 0&&(i=!1),s===void 0&&(s=1),r===void 0&&(r=1),o===void 0&&(o=1),S.call(this,d,"FilterBokeh"),this.radius=t,this.amount=e,this.contrast=l,this.isTiltShift=i,this.blurX=s,this.blurY=r,this.strength=o},getPadding:function(){var h=this.paddingOverride;if(h)return this.currentPadding.setTo(h.x,h.y,h.width,h.height),h;var d=Math.ceil(this.camera.height*this.radius*.021426096060426905);return this.currentPadding.setTo(-d,-d,d*2,d*2),this.currentPadding}});E.exports=x},77011:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=n(89422),h=new m({Extends:S,initialize:function(t){S.call(this,t,"FilterColorMatrix"),this.colorMatrix=new x},destroy:function(){this.colorMatrix=null,S.prototype.destroy.call(this)}});E.exports=h},13045:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(87841),x=new m({initialize:function(d,t){this.active=!0,this.camera=d,this.renderNode=t,this.paddingOverride=new S,this.currentPadding=new S,this.allowBaseDraw=!0,this.ignoreDestroy=!1},getPadding:function(){return this.paddingOverride||this.currentPadding},setPaddingOverride:function(h,d,t,e){return h===null?(this.paddingOverride=null,this):(h===void 0&&(h=0),d===void 0&&(d=0),t===void 0&&(t=0),e===void 0&&(e=0),this.paddingOverride=new S(h,d,t-h,e-d),this)},setActive:function(h){return this.active=h,this},destroy:function(){this.active=!1,this.renderNode=null,this.camera=null}});E.exports=x},16898:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t,e,l){t===void 0&&(t="__WHITE"),e===void 0&&(e=.005),l===void 0&&(l=.005),S.call(this,d,"FilterDisplacement"),this.x=e,this.y=l,this.glTexture,this.setTexture(t)},setTexture:function(h){var d=this.camera.scene.sys.textures.getFrame(h);return d&&(this.glTexture=d.glTexture),this},getPadding:function(){var h=this.paddingOverride;if(h)return this.currentPadding.setTo(h.x,h.y,h.width,h.height),h;var d=this.camera,t=Math.ceil(d.width*this.x*.5),e=Math.ceil(d.height*this.y*.5);return this.currentPadding.setTo(-t,-e,t*2,e*2),this.currentPadding}});E.exports=x},42652:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t,e,l,i,s,r,o){e===void 0&&(e=4),l===void 0&&(l=0),i===void 0&&(i=1),s===void 0&&(s=!1),r===void 0&&(r=d.scene.sys.game.config.glowQuality),o===void 0&&(o=d.scene.sys.game.config.glowDistance),S.call(this,d,"FilterGlow"),this.outerStrength=e,this.innerStrength=l,this.scale=i,this.knockout=s,this._quality=Math.max(Math.round(r),1),this._distance=Math.max(Math.round(o),1),this.glcolor=[1,1,1,1],t!==void 0&&(this.color=t)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var d=this.glcolor;d[0]=(h>>16&255)/255,d[1]=(h>>8&255)/255,d[2]=(h&255)/255}},distance:{get:function(){return this._distance}},quality:{get:function(){return this._quality}},getPadding:function(){var h=this.paddingOverride;if(h)return this.currentPadding.setTo(h.x,h.y,h.width,h.height),h;var d=this.currentPadding,t=Math.ceil(this.distance*this.scale);return d.left=-t,d.top=-t,d.right=t,d.bottom=t,d}});E.exports=x},97797:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(45650),x=n(13045),h=new m({Extends:x,initialize:function(t,e,l,i,s,r){e===void 0&&(e="__WHITE"),l===void 0&&(l=!1),r===void 0&&(r=1),x.call(this,t,"FilterMask"),this.glTexture,this._dynamicTexture=null,this.maskGameObject=null,this.invert=l,this.autoUpdate=!0,this.needsUpdate=!1,this.viewTransform=s||"world",this.viewCamera=i,this.scaleFactor=r,typeof e=="string"?this.setTexture(e):this.setGameObject(e)},updateDynamicTexture:function(d,t){var e=this.scaleFactor,l=d*e,i=t*e,s=this.maskGameObject;if(s){if(this._dynamicTexture)this._dynamicTexture.width!==l||this._dynamicTexture.height!==i?this._dynamicTexture.setSize(l,i,!1):this._dynamicTexture.clear();else{var r=this.camera.scene.sys.textures;this._dynamicTexture=r.addDynamicTexture(S(),l,i,!1)}this.glTexture=this._dynamicTexture.get().glTexture;var o=this.viewCamera||s.scene.renderer.currentViewCamera;this._dynamicTexture.capture(s,{transform:this.viewTransform,camera:o}),this._dynamicTexture.render(),this.needsUpdate=!1}},setGameObject:function(d){return this.maskGameObject=d,this.needsUpdate=!0,this},setTexture:function(d){var t=this.camera.scene.sys.textures.getFrame(d);return t&&(this.maskGameObject=null,this.glTexture=t.glTexture),this},destroy:function(){this._dynamicTexture&&this._dynamicTexture.destroy(),this.maskGameObject=null,this._dynamicTexture=null,x.prototype.destroy.call(this)}});E.exports=h},2195:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53427),x=n(13045),h=n(16762),d=new m({Extends:x,initialize:function(e){x.call(this,e,"FilterParallelFilters"),this.top=new S(e),this.bottom=new S(e),this.blend=new h(e)}});E.exports=d},29861:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t){t===void 0&&(t=1),S.call(this,d,"FilterPixelate"),this.amount=t}});E.exports=x},63785:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t,e){e===void 0&&(e=null),S.call(this,d,"FilterSampler"),this.allowBaseDraw=!1,this.callback=t,this.region=e}});E.exports=x},62229:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t,e,l,i,s,r,o){t===void 0&&(t=0),e===void 0&&(e=0),l===void 0&&(l=.1),i===void 0&&(i=1),r===void 0&&(r=6),o===void 0&&(o=1),S.call(this,d,"FilterShadow"),this.x=t,this.y=e,this.decay=l,this.power=i,this.glcolor=[0,0,0,1],this.samples=r,this.intensity=o,s!==void 0&&(this.color=s)},color:{get:function(){var h=this.glcolor;return(h[0]*255<<16)+(h[1]*255<<8)+(h[2]*255|0)},set:function(h){var d=this.glcolor;d[0]=(h>>16&255)/255,d[1]=(h>>8&255)/255,d[2]=(h&255)/255}},getPadding:function(){var h=this.paddingOverride;if(h)return this.currentPadding.setTo(h.x,h.y,h.width,h.height),h;var d=this.camera,t=this.decay*this.intensity,e=Math.ceil(Math.abs(this.x)*d.width*t),l=Math.ceil(Math.abs(this.y)*d.height*t);return this.currentPadding.setTo(-e,-l,e*2,l*2),this.currentPadding}});E.exports=x},99534:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13045),x=new m({Extends:S,initialize:function(d,t,e,l){S.call(this,d,"FilterThreshold"),this.edge1=[.5,.5,.5,.5],this.edge2=[.5,.5,.5,.5],this.invert=[!1,!1,!1,!1],this.setEdge(t,e),this.setInvert(l)},setEdge:function(h,d){h===void 0&&(h=.5),typeof h=="number"&&(h=[h,h,h,h]),this.edge1[0]=h[0],this.edge1[1]=h[1],this.edge1[2]=h[2],this.edge1[3]=h[3],d===void 0&&(d=h),typeof d=="number"&&(d=[d,d,d,d]),this.edge2[0]=d[0],this.edge2[1]=d[1],this.edge2[2]=d[2],this.edge2[3]=d[3];for(var t=0;t<4;t++)if(this.edge1[t]>this.edge2[t]){var e=this.edge1[t];this.edge1[t]=this.edge2[t],this.edge2[t]=e}return this},setInvert:function(h){return h===void 0&&(h=!1),typeof h=="boolean"&&(h=[h,h,h,h]),this.invert[0]=h[0],this.invert[1]=h[1],this.invert[2]=h[2],this.invert[3]=h[3],this}});E.exports=x},11889:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={Controller:n(13045),Barrel:n(10189),Blend:n(16762),Blocky:n(37597),Blur:n(88344),Bokeh:n(47564),ColorMatrix:n(77011),Displacement:n(16898),Glow:n(42652),Mask:n(97797),ParallelFilters:n(2195),Pixelate:n(29861),Sampler:n(63785),Shadow:n(62229),Threshold:n(99534)};E.exports=m},25305:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10312),S=n(23568),x=function(h,d,t){d.x=S(t,"x",0),d.y=S(t,"y",0),d.depth=S(t,"depth",0),d.flipX=S(t,"flipX",!1),d.flipY=S(t,"flipY",!1);var e=S(t,"scale",null);typeof e=="number"?d.setScale(e):e!==null&&(d.scaleX=S(e,"x",1),d.scaleY=S(e,"y",1));var l=S(t,"scrollFactor",null);typeof l=="number"?d.setScrollFactor(l):l!==null&&(d.scrollFactorX=S(l,"x",1),d.scrollFactorY=S(l,"y",1)),d.rotation=S(t,"rotation",0);var i=S(t,"angle",null);i!==null&&(d.angle=i),d.alpha=S(t,"alpha",1);var s=S(t,"origin",null);if(typeof s=="number")d.setOrigin(s);else if(s!==null){var r=S(s,"x",.5),o=S(s,"y",.5);d.setOrigin(r,o)}d.blendMode=S(t,"blendMode",m.NORMAL),d.visible=S(t,"visible",!0);var a=S(t,"add",!0);return a&&h.sys.displayList.add(d),d.preUpdate&&h.sys.updateList.add(d),d};E.exports=x},13059:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(23568),S=function(x,h){var d=m(h,"anims",null);if(d===null)return x;if(typeof d=="string")x.anims.play(d);else if(typeof d=="object"){var t=x.anims,e=m(d,"key",void 0);if(e){var l=m(d,"startFrame",void 0),i=m(d,"delay",0),s=m(d,"repeat",0),r=m(d,"repeatDelay",0),o=m(d,"yoyo",!1),a=m(d,"play",!1),u=m(d,"delayedPlay",0),f={key:e,delay:i,repeat:s,repeatDelay:r,yoyo:o,startFrame:l};a?t.play(f):u>0?t.playAfterDelay(f,u):t.load(f)}}return x};E.exports=S},8050:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(73162),x=n(37277),h=n(51708),d=n(44594),t=n(19186),e=new m({Extends:S,initialize:function(i){S.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(d.BOOT,this.boot,this),this.events.on(d.START,this.start,this)},boot:function(){this.events.once(d.DESTROY,this.destroy,this)},addChildCallback:function(l){l.displayList&&l.displayList!==this&&l.removeFromDisplayList(),l.parentContainer&&l.parentContainer.remove(l),l.displayList||(this.queueDepthSort(),l.displayList=this,l.emit(h.ADDED_TO_SCENE,l,this.scene),this.events.emit(d.ADDED_TO_SCENE,l,this.scene))},removeChildCallback:function(l){this.queueDepthSort(),l.displayList=null,l.emit(h.REMOVED_FROM_SCENE,l,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,l,this.scene)},start:function(){this.events.once(d.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(t(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(l,i){return l._depth-i._depth},getChildren:function(){return this.list},shutdown:function(){for(var l=this.list,i=l.length;i--;)l[i]&&l[i].destroy(!0);l.length=0,this.events.off(d.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(d.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});x.register("DisplayList",e,"displayList"),E.exports=e},95643:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(31401),x=n(53774),h=n(45893),d=n(50792),t=n(51708),e=n(44594),l=new m({Extends:d,Mixins:[S.Filters,S.RenderSteps],initialize:function(s,r){d.call(this),this.scene=s,this.displayList=null,this.type=r,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.vertexRoundMode="safeAuto",this.input=null,this.body=null,this.ignoreDestroy=!1,this.addRenderStep&&this.addRenderStep(this.renderWebGL),this.on(t.ADDED_TO_SCENE,this.addedToScene,this),this.on(t.REMOVED_FROM_SCENE,this.removedFromScene,this),s.sys.queueDepthSort()},setActive:function(i){return this.active=i,this},setName:function(i){return this.name=i,this},setState:function(i){return this.state=i,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(i,s){return this.data||(this.data=new h(this)),this.data.set(i,s),this},incData:function(i,s){return this.data||(this.data=new h(this)),this.data.inc(i,s),this},toggleData:function(i){return this.data||(this.data=new h(this)),this.data.toggle(i),this},getData:function(i){return this.data||(this.data=new h(this)),this.data.get(i)},setInteractive:function(i,s,r){return this.scene.sys.input.enable(this,i,s,r),this},disableInteractive:function(i){return i===void 0&&(i=!1),this.scene.sys.input.disable(this,i),this},removeInteractive:function(i){return i===void 0&&(i=!1),this.scene.sys.input.clear(this),i&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return x(this)},willRender:function(i){var s=this.displayList&&this.displayList.active?this.displayList.willRender(i):!0;return!(!s||l.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&i.id)},willRoundVertices:function(i,s){switch(this.vertexRoundMode){case"safe":return s;case"safeAuto":return s&&i.roundPixels;case"full":return!0;case"fullAuto":return i.roundPixels;case"off":default:return!1}},setVertexRoundMode:function(i){return this.vertexRoundMode=i,this},getIndexList:function(){for(var i=this,s=this.parentContainer,r=[];s&&(r.unshift(s.getIndex(i)),i=s,s.parentContainer);)s=s.parentContainer;return this.displayList?r.unshift(this.displayList.getIndex(i)):r.unshift(this.scene.sys.displayList.getIndex(i)),r},addToDisplayList:function(i){return i===void 0&&(i=this.scene.sys.displayList),this.displayList&&this.displayList!==i&&this.removeFromDisplayList(),i.exists(this)||(this.displayList=i,i.add(this,!0),i.queueDepthSort(),this.emit(t.ADDED_TO_SCENE,this,this.scene),i.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 i=this.displayList||this.scene.sys.displayList;return i&&i.exists(this)&&(i.remove(this,!0),i.queueDepthSort(),this.displayList=null,this.emit(t.REMOVED_FROM_SCENE,this,this.scene),i.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 i=null;return this.parentContainer?i=this.parentContainer.list:this.displayList&&(i=this.displayList.list),i},destroy:function(i){!this.scene||this.ignoreDestroy||(i===void 0&&(i=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(t.DESTROY,this,i),this.removeAllListeners(),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.filterCamera&&(this.filterCamera.destroy(),this.filterCamera=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,E.exports=l},44603:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(37277),x=n(44594),h=new m({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(x.BOOT,this.boot,this),this.events.on(x.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(x.DESTROY,this.destroy,this)},start:function(){this.events.once(x.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(x.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(x.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});h.register=function(d,t){h.prototype.hasOwnProperty(d)||(h.prototype[d]=t)},h.remove=function(d){h.prototype.hasOwnProperty(d)&&delete h.prototype[d]},S.register("GameObjectCreator",h,"make"),E.exports=h},39429:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(37277),x=n(44594),h=new m({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(x.BOOT,this.boot,this),this.events.on(x.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(x.DESTROY,this.destroy,this)},start:function(){this.events.once(x.SHUTDOWN,this.shutdown,this)},existing:function(d){return(d.renderCanvas||d.renderWebGL)&&this.displayList.add(d),d.preUpdate&&this.updateList.add(d),d},shutdown:function(){this.events.off(x.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(x.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});h.register=function(d,t){h.prototype.hasOwnProperty(d)||(h.prototype[d]=t)},h.remove=function(d){h.prototype.hasOwnProperty(d)&&delete h.prototype[d]},S.register("GameObjectFactory",h,"add"),E.exports=h},91296:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=new m,x=new m,h=new m,d=new m,t={camera:S,sprite:x,calc:h,cameraExternal:d},e=function(l,i,s,r){return r?d.loadIdentity():d.copyFrom(i.matrixExternal),S.copyWithScrollFactorFrom(r?i.matrix:i.matrixCombined,i.scrollX,i.scrollY,l.scrollFactorX,l.scrollFactorY),h.copyFrom(S),s&&h.multiply(s),x.applyITRS(l.x,l.y,l.rotation,l.scaleX,l.scaleY),h.multiply(x),t};E.exports=e},45027:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(25774),x=n(37277),h=n(44594),d=new m({Extends:S,initialize:function(e){S.call(this),this.checkQueue=!0,this.scene=e,this.systems=e.sys,e.sys.events.once(h.BOOT,this.boot,this),e.sys.events.on(h.START,this.start,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(h.PRE_UPDATE,this.update,this),t.on(h.UPDATE,this.sceneUpdate,this),t.once(h.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var l=this._active,i=l.length,s=0;s<i;s++){var r=l[s];r.active&&r.preUpdate.call(r,t,e)}},shutdown:function(){for(var t=this._active.length;t--;)this._active[t].destroy(!0);for(t=this._pending.length;t--;)this._pending[t].destroy(!0);for(t=this._destroy.length;t--;)this._destroy[t].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var e=this.systems.events;e.off(h.PRE_UPDATE,this.update,this),e.off(h.UPDATE,this.sceneUpdate,this),e.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(h.START,this.start,this),this.scene=null,this.systems=null}});x.register("UpdateList",d,"updateList"),E.exports=d},3217:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={frame:null,uvSource:null},n={quad:new Float32Array(8)},m=function(S,x,h,d,t,e,l,i,s){y.frame=h.frame,y.uvSource=t;var r=d.x-h.displayOriginX+e,o=d.y-h.displayOriginY+l,a=r+d.w,u=o+d.h,f=i.a,v=i.b,c=i.c,g=i.d,p=i.e,T=i.f,C=r*f+o*c+p,M=r*v+o*g+T,A=r*f+u*c+p,R=r*v+u*g+T,P=a*f+u*c+p,L=a*v+u*g+T,F=a*f+o*c+p,w=a*v+o*g+T;n.quad[0]=C,n.quad[1]=M,n.quad[2]=A,n.quad[3]=R,n.quad[4]=P,n.quad[5]=L,n.quad[6]=F,n.quad[7]=w,x.run(S,h,void 0,0,y,n,s)};E.exports=m},53048:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){if(S===void 0&&(S=!1),x===void 0)return x={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},x;var h=n.text,d=h.length,t=n.maxWidth,e=n.wordWrapCharCode,l=Number.MAX_VALUE,i=Number.MAX_VALUE,s=0,r=0,o=n.fontData.chars,a=n.fontData.lineHeight,u=n.letterSpacing,f=n.lineSpacing,v=0,c=0,g=0,p=null,T=n._align,C=0,M=0,A=n.fontSize/n.fontData.size,R=A*n.scaleX,P=A*n.scaleY,L=null,F=0,w=[],O=Number.MAX_VALUE,B=0,I=0,D=0,N,z,V,U=[],G=[],b=null,Y=function(lt,dt){for(var ct=0,Bt=0;Bt<lt.length;Bt++){var Lt=lt.charCodeAt(Bt),zt=dt.chars[Lt];zt&&(ct+=zt.xAdvance)}return ct*R};if(t>0){V=h.split(`
|
||
`);var W=[];for(N=0;N<V.length;N++){var H=V[N],X="",K="",Z="",Q="";for(z=0;z<H.length;z++)if(g=H.charCodeAt(z),X+=H[z],g===e||z===H.length-1){Q=Z+X;var j=Y(Q,n.fontData);j<=t?Z=Q:(K=K.slice(0,-1),K+=(K?`
|
||
`:"")+Z,Z=X),X=""}K=K.slice(0,-1),K+=(K?`
|
||
`:"")+Z,W.push(K)}h=W.join(`
|
||
`),x.wrappedText=h,d=h.length}var J=0;for(N=0;N<d;N++){if(g=h.charCodeAt(N),g===10){b!==null&&(U.push({word:b.word,i:b.i,x:b.x*R,y:b.y*P,w:b.w*R,h:b.h*P}),b=null),L=null,w[I]=D,D>B&&(B=D),D<O&&(O=D),I++,D=0,v=0,c=(a+f)*I;continue}if(p=o[g],!!p){if(C=v,M=c,L!==null){var tt=p.kerning[F];C+=tt!==void 0?tt:0}l>C&&(l=C),i>M&&(i=M);var k=C+p.xAdvance,q=M+a;s<k&&(s=k),r<q&&(r=q);var _=p.xOffset+p.xAdvance+(tt!==void 0?tt:0);g===e?b!==null&&(U.push({word:b.word,i:b.i,x:b.x*R,y:b.y*P,w:b.w*R,h:b.h*P}),b=null):(b===null&&(b={word:"",i:J,x:v,y:c,w:0,h:a}),b.word=b.word.concat(h[N]),b.w+=_),G.push({i:J,idx:N,char:h[N],code:g,x:(p.xOffset+C)*A,y:(p.yOffset+c)*A,w:p.width*A,h:p.height*A,t:c*A,r:k*A,b:a*A,line:I,glyph:p}),v+=p.xAdvance+u+(tt!==void 0?tt:0),L=p,F=g,D=k*A,J++}}if(b!==null&&U.push({word:b.word,i:b.i,x:b.x*R,y:b.y*P,w:b.w*R,h:b.h*P}),w[I]=D,D>B&&(B=D),D<O&&(O=D),T>0)for(var rt=0;rt<G.length;rt++){var at=G[rt];if(T===1){var ht=(B-w[at.line])/2;at.x+=ht,at.r+=ht}else if(T===2){var ot=B-w[at.line];at.x+=ot,at.r+=ot}}var nt=x.local,it=x.global;return V=x.lines,nt.x=l*A,nt.y=i*A,nt.width=s*A,nt.height=r*A,it.x=n.x-n._displayOriginX+l*R,it.y=n.y-n._displayOriginY+i*P,it.width=s*R,it.height=r*P,V.shortest=O,V.longest=B,V.lengths=w,m&&(nt.x=Math.ceil(nt.x),nt.y=Math.ceil(nt.y),nt.width=Math.ceil(nt.width),nt.height=Math.ceil(nt.height),it.x=Math.ceil(it.x),it.y=Math.ceil(it.y),it.width=Math.ceil(it.width),it.height=Math.ceil(it.height),V.shortest=Math.ceil(O),V.longest=Math.ceil(B)),S&&(n._displayOriginX=n.originX*nt.width,n._displayOriginY=n.originY*nt.height,it.x=n.x-n._displayOriginX*n.scaleX,it.y=n.y-n._displayOriginY*n.scaleY,m&&(it.x=Math.ceil(it.x),it.y=Math.ceil(it.y))),x.words=U,x.characters=G,x.lines.height=a,x.scale=A,x.scaleX=n.scaleX,x.scaleY=n.scaleY,x};E.exports=y},61327:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(21859),S=function(x,h,d,t,e,l,i){var s=x.sys.textures.get(d),r=s.get(t),o=x.sys.cache.xml.get(e);if(r&&o){var a=m(o,r,l,i,s);return x.sys.cache.bitmapFont.add(h,{data:a,texture:d,frame:t,fromAtlas:!0}),!0}else return!1};E.exports=S},6925:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35154),S=function(x,h){var d=h.width,t=h.height,e=Math.floor(d/2),l=Math.floor(t/2),i=m(h,"chars","");if(i!==""){var s=m(h,"image",""),r=x.sys.textures.getFrame(s),o=r.cutX,a=r.cutY,u=r.source.width,f=r.source.height,v=m(h,"offset.x",0),c=m(h,"offset.y",0),g=m(h,"spacing.x",0),p=m(h,"spacing.y",0),T=m(h,"lineSpacing",0),C=m(h,"charsPerRow",null);C===null&&(C=u/d,C>i.length&&(C=i.length));for(var M=v,A=c,R={retroFont:!0,font:s,size:d,lineHeight:t+T,chars:{}},P=0,L=0;L<i.length;L++){var F=i.charCodeAt(L),w=(o+M)/u,O=1-(a+A)/f,B=(o+M+d)/u,I=1-(a+A+t)/f;R.chars[F]={x:M,y:A,width:d,height:t,centerX:e,centerY:l,xOffset:0,yOffset:0,xAdvance:d,data:{},kerning:{},u0:w,v0:O,u1:B,v1:I},P++,P===C?(P=0,M=v,A+=t+p):M+=d+g}var D={data:R,frame:null,texture:s};return D}};E.exports=S},21859:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function y(m,S){return parseInt(m.getAttribute(S),10)}var n=function(m,S,x,h,d){x===void 0&&(x=0),h===void 0&&(h=0);var t=S.cutX,e=S.cutY,l=S.source.width,i=S.source.height,s=S.sourceIndex,r={},o=m.getElementsByTagName("info")[0],a=m.getElementsByTagName("common")[0];r.font=o.getAttribute("face"),r.size=y(o,"size"),r.lineHeight=y(a,"lineHeight")+h,r.chars={};var u=m.getElementsByTagName("char"),f=S!==void 0&&S.trimmed;if(f)var v=S.height,c=S.width;for(var g=0;g<u.length;g++){var p=u[g],T=y(p,"id"),C=String.fromCharCode(T),M=y(p,"x"),A=y(p,"y"),R=y(p,"width"),P=y(p,"height");f&&(M<c&&(c=M),A<v&&(v=A)),f&&v!==0&&c!==0&&(M-=S.x,A-=S.y);var L=(t+M)/l,F=1-(e+A)/i,w=(t+M+R)/l,O=1-(e+A+P)/i;if(r.chars[T]={x:M,y:A,width:R,height:P,centerX:Math.floor(R/2),centerY:Math.floor(P/2),xOffset:y(p,"xoffset"),yOffset:y(p,"yoffset"),xAdvance:y(p,"xadvance")+x,data:{},kerning:{},u0:L,v0:F,u1:w,v1:O},d&&R!==0&&P!==0){var B=d.add(C,s,M,A,R,P);B&&B.setUVs(R,P,L,F,w,O)}}var I=m.getElementsByTagName("kerning");for(g=0;g<I.length;g++){var D=I[g],N=y(D,"first"),z=y(D,"second"),V=y(D,"amount");r.chars[z].kerning[N]=V}return r};E.exports=n},196:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87662),S=n(79291),x={Parse:n(6925)};x=S(!1,x,m),E.exports=x},87662:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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`};E.exports=y},2638:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(22186),S=n(83419),x=n(12310),h=new S({Extends:m,Mixins:[x],initialize:function(t,e,l,i,s,r,o){m.call(this,t,e,l,i,s,r,o),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(d,t){return this.cropWidth=d,this.cropHeight=t,this},setDisplayCallback:function(d){return this.displayCallback=d,this},setScrollX:function(d){return this.scrollX=d,this},setScrollY:function(d){return this.scrollY=d,this}});E.exports=h},86741:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20926),S=function(x,h,d,t){var e=h._text,l=e.length,i=x.currentContext;if(!(l===0||!m(x,i,h,d,t))){d.addToRenderList(h);var s=h.fromAtlas?h.frame:h.texture.frames.__BASE,r=h.displayCallback,o=h.callbackData,a=h.fontData.chars,u=h.fontData.lineHeight,f=h._letterSpacing,v=0,c=0,g=0,p=null,T=0,C=0,M=0,A=0,R=0,P=0,L=null,F=0,w=h.frame.source.image,O=s.cutX,B=s.cutY,I=0,D=0,N=h._fontSize/h.fontData.size,z=h._align,V=0,U=0;h.getTextBounds(!1);var G=h._bounds.lines;z===1?U=(G.longest-G.lengths[0])/2:z===2&&(U=G.longest-G.lengths[0]),i.translate(-h.displayOriginX,-h.displayOriginY);var b=d.roundPixels;h.cropWidth>0&&h.cropHeight>0&&(i.beginPath(),i.rect(0,0,h.cropWidth,h.cropHeight),i.clip());for(var Y=0;Y<l;Y++){if(D=N,I=0,g=e.charCodeAt(Y),g===10){V++,z===1?U=(G.longest-G.lengths[V])/2:z===2&&(U=G.longest-G.lengths[V]),v=0,c+=u,L=null;continue}if(p=a[g],!!p){if(T=O+p.x,C=B+p.y,M=p.width,A=p.height,R=p.xOffset+v-h.scrollX,P=p.yOffset+c-h.scrollY,L!==null){var W=p.kerning[F];R+=W!==void 0?W:0}if(r){o.index=Y,o.charCode=g,o.x=R,o.y=P,o.scale=D,o.rotation=I,o.data=p.data;var H=r(o);R=H.x,P=H.y,D=H.scale,I=H.rotation}R*=D,P*=D,R+=U,v+=p.xAdvance+f+(W!==void 0?W:0),L=p,F=g,!(M===0||A===0||g===32)&&(b&&(R=Math.round(R),P=Math.round(P)),i.save(),i.translate(R,P),i.rotate(I),i.scale(D,D),i.drawImage(w,T,C,M,A,0,0,M,A),i.restore())}}i.restore()}};E.exports=S},11164:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(2638),S=n(25305),x=n(44603),h=n(23568);x.register("dynamicBitmapText",function(d,t){d===void 0&&(d={});var e=h(d,"font",""),l=h(d,"text",""),i=h(d,"size",!1),s=new m(this.scene,0,0,e,l,i);return t!==void 0&&(d.add=t),S(this.scene,s,d),s})},72566:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(2638),S=n(39429);S.register("dynamicBitmapText",function(x,h,d,t,e){return this.displayList.add(new m(this.scene,x,h,d,t,e))})},12310:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(73482),x=n(86741),E.exports={renderWebGL:S,renderCanvas:x}},73482:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=n(61340),x=n(70554),h=new S,d={frame:null,uvSource:null},t={tintEffect:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},e=function(l,i,s,r){var o=i.text,a=o.length;if(a!==0){var u=s.camera;u.addToRenderList(i);var f=s,v=i.customRenderNodes.Submitter||i.defaultRenderNodes.Submitter,c=m(i,u,r,!s.useCanvas),g=c.sprite,p=c.calc,T=h,C=i.cropWidth>0||i.cropHeight>0;C&&(f=s.getClone(),f.setScissorEnable(!0),f.setScissorBox(p.tx,p.ty,i.cropWidth*p.scaleX,i.cropHeight*p.scaleY),f.use()),d.frame=i.frame;var M=i.tintFill,A=x.getTintAppendFloatAlpha(i.tintTopLeft,i._alphaTL),R=x.getTintAppendFloatAlpha(i.tintTopRight,i._alphaTR),P=x.getTintAppendFloatAlpha(i.tintBottomLeft,i._alphaBL),L=x.getTintAppendFloatAlpha(i.tintBottomRight,i._alphaBR),F=0,w=0,O=0,B=0,I=i.letterSpacing,D,N=0,z=0,V,U=i.scrollX,G=i.scrollY,b=i.fontData,Y=b.chars,W=b.lineHeight,H=i.fontSize/b.size,X=0,K=i._align,Z=0,Q=0,j=i.getTextBounds(!1);i.maxWidth>0&&(o=j.wrappedText,a=o.length);var J=i._bounds.lines;K===1?Q=(J.longest-J.lengths[0])/2:K===2&&(Q=J.longest-J.lengths[0]);for(var tt=i.displayCallback,k=i.callbackData,q=0;q<a;q++){if(O=o.charCodeAt(q),O===10){Z++,K===1?Q=(J.longest-J.lengths[Z])/2:K===2&&(Q=J.longest-J.lengths[Z]),F=0,w+=W,V=null;continue}if(D=Y[O],!!D){d.uvSource=D,N=D.width,z=D.height;var _=D.xOffset+F-U,rt=D.yOffset+w-G;if(V!==null){var at=D.kerning[B]||0;_+=at,F+=at}if(F+=D.xAdvance+I,V=D,B=O,!(N===0||z===0||O===32)){if(H=i.fontSize/i.fontData.size,X=0,tt){k.color=0,k.tint.topLeft=A,k.tint.topRight=R,k.tint.bottomLeft=P,k.tint.bottomRight=L,k.index=q,k.charCode=O,k.x=_,k.y=rt,k.scale=H,k.rotation=X,k.data=D.data;var ht=tt(k);_=ht.x,rt=ht.y,H=ht.scale,X=ht.rotation,ht.color?(A=ht.color,R=ht.color,P=ht.color,L=ht.color):(A=ht.tint.topLeft,R=ht.tint.topRight,P=ht.tint.bottomLeft,L=ht.tint.bottomRight),A=x.getTintAppendFloatAlpha(A,i._alphaTL),R=x.getTintAppendFloatAlpha(R,i._alphaTR),P=x.getTintAppendFloatAlpha(P,i._alphaBL),L=x.getTintAppendFloatAlpha(L,i._alphaBR)}t.tintFill=M,t.tintTopLeft=A,t.tintTopRight=R,t.tintBottomLeft=P,t.tintBottomRight=L,_*=H,rt*=H,_-=i.displayOriginX,rt-=i.displayOriginY,_+=Q,T.applyITRS(_,rt,X,H,H),p.multiply(T,g);var ot=N,nt=z,it=g.e,lt=g.f,dt=nt*g.c+g.e,ct=nt*g.d+g.f,Bt=ot*g.a+nt*g.c+g.e,Lt=ot*g.b+nt*g.d+g.f,zt=ot*g.a+g.e,Kt=ot*g.b+g.f;v.run(f,i,void 0,0,d,{quad:[it,lt,dt,ct,Bt,Lt,zt,Kt]},t)}}}C&&s.use()}};E.exports=e},22186:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70972),S=n(83419),x=n(45319),h=n(31401),d=n(95643),t=n(53048),e=n(61327),l=n(21859),i=n(87841),s=n(18658),r=new S({Extends:d,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.GetBounds,h.Lighting,h.Mask,h.Origin,h.RenderNodes,h.ScrollFactor,h.Texture,h.Tint,h.Transform,h.Visible,s],initialize:function(a,u,f,v,c,g,p){c===void 0&&(c=""),p===void 0&&(p=0),d.call(this,a,"BitmapText"),this.font=v;var T=this.scene.sys.cache.bitmapFont.get(v);T||console.warn("Invalid BitmapText key: "+v),this.fontData=T.data,this._text="",this._fontSize=g||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=p,this._bounds=t(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=T.fromAtlas,this.setTexture(T.texture,T.frame),this.setPosition(u,f),this.setOrigin(0,0),this.initRenderNodes(this._defaultRenderNodesMap),this.setText(c)},_defaultRenderNodesMap:{get:function(){return m}},setLeftAlign:function(){return this._align=r.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=r.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=r.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(o){return this._fontSize=o,this._dirty=!0,this},setLetterSpacing:function(o){return o===void 0&&(o=0),this._letterSpacing=o,this._dirty=!0,this},setLineSpacing:function(o){return o===void 0&&(o=0),this.lineSpacing=o,this},setText:function(o){return!o&&o!==0&&(o=""),Array.isArray(o)&&(o=o.join(`
|
||
`)),o!==this.text&&(this._text=o.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(o,a,u,f){return o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=.5),this.dropShadowX=o,this.dropShadowY=a,this.dropShadowColor=u,this.dropShadowAlpha=f,this},setCharacterTint:function(o,a,u,f,v,c,g){o===void 0&&(o=0),a===void 0&&(a=1),u===void 0&&(u=!1),f===void 0&&(f=-1),v===void 0&&(v=f,c=f,g=f);var p=this.text.length;a===-1&&(a=p),o<0&&(o=p+o),o=x(o,0,p-1);for(var T=x(o+a,o,p),C=this.charColors,M=o;M<T;M++){var A=C[M];if(f===-1)C[M]=null;else{var R=u?1:0;A?(A.tintEffect=R,A.tintTL=f,A.tintTR=v,A.tintBL=c,A.tintBR=g):C[M]={tintEffect:R,tintTL:f,tintTR:v,tintBL:c,tintBR:g}}}return this},setWordTint:function(o,a,u,f,v,c,g){a===void 0&&(a=1);for(var p=this.getTextBounds(),T=p.words,C=typeof o=="number",M=0,A=0;A<T.length;A++){var R=T[A];if((C&&A===o||!C&&R.word===o)&&(this.setCharacterTint(R.i,R.word.length,u,f,v,c,g),M++,M===a))return this}return this},getTextBounds:function(o){var a=this._bounds;return(this._dirty||o||this.scaleX!==a.scaleX||this.scaleY!==a.scaleY)&&(t(this,o,!0,a),this._dirty=!1),a},getCharacterAt:function(o,a,u){for(var f=this.getLocalPoint(o,a,null,u),v=this.getTextBounds(),c=v.characters,g=new i,p=0;p<c.length;p++){var T=c[p];if(g.setTo(T.x,T.t,T.r-T.x,T.b),g.contains(f.x,f.y))return T}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(o,a,u){a===void 0&&(a=this._fontSize),u===void 0&&(u=this._align);var f=this.scene.sys.cache.bitmapFont.get(o);return f&&(this.font=o,this.fontData=f.data,this._fontSize=a,this._align=u,this.fromAtlas=f.fromAtlas===!0,this.setTexture(f.texture,f.frame),t(this,!1,!0,this._bounds)),this},setMaxWidth:function(o,a){return this._maxWidth=o,this._dirty=!0,a!==void 0&&(this.wordWrapCharCode=a),this},align:{set:function(o){this._align=o,this._dirty=!0},get:function(){return this._align}},text:{set:function(o){this.setText(o)},get:function(){return this._text}},fontSize:{set:function(o){this._fontSize=o,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(o){this._letterSpacing=o,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(o){this._lineSpacing=o,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(o){this._maxWidth=o,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:{get:function(){return this.width}},displayHeight:{get:function(){return this.height}},toJSON:function(){var o=h.ToJSON(this),a={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return o.data=a,o},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});r.ALIGN_LEFT=0,r.ALIGN_CENTER=1,r.ALIGN_RIGHT=2,r.ParseFromAtlas=e,r.ParseXMLBitmapFont=l,E.exports=r},37289:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20926),S=function(x,h,d,t){var e=h._text,l=e.length,i=x.currentContext;if(!(l===0||!m(x,i,h,d,t))){d.addToRenderList(h);var s=h.fromAtlas?h.frame:h.texture.frames.__BASE,r=h.fontData.chars,o=h.fontData.lineHeight,a=h._letterSpacing,u=h._lineSpacing,f=0,v=0,c=0,g=null,p=0,T=0,C=0,M=0,A=0,R=0,P=null,L=0,F=s.source.image,w=s.cutX,O=s.cutY,B=h._fontSize/h.fontData.size,I=h._align,D=0,N=0,z=h.getTextBounds(!1);h.maxWidth>0&&(e=z.wrappedText,l=e.length);var V=h._bounds.lines;I===1?N=(V.longest-V.lengths[0])/2:I===2&&(N=V.longest-V.lengths[0]),i.translate(-h.displayOriginX,-h.displayOriginY);for(var U=d.roundPixels,G=0;G<l;G++){if(c=e.charCodeAt(G),c===10){D++,I===1?N=(V.longest-V.lengths[D])/2:I===2&&(N=V.longest-V.lengths[D]),f=0,v+=o+u,P=null;continue}if(g=r[c],!!g){if(p=w+g.x,T=O+g.y,C=g.width,M=g.height,A=g.xOffset+f,R=g.yOffset+v,P!==null){var b=g.kerning[L];A+=b!==void 0?b:0}A*=B,R*=B,A+=N,f+=g.xAdvance+a+(b!==void 0?b:0),P=g,L=c,!(C===0||M===0||c===32)&&(U&&(A=Math.round(A),R=Math.round(R)),i.save(),i.translate(A,R),i.scale(B,B),i.drawImage(F,p,T,C,M,0,0,C,M),i.restore())}}i.restore()}};E.exports=S},57336:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(22186),S=n(25305),x=n(44603),h=n(23568),d=n(35154);x.register("bitmapText",function(t,e){t===void 0&&(t={});var l=d(t,"font",""),i=h(t,"text",""),s=h(t,"size",!1),r=d(t,"align",0),o=new m(this.scene,0,0,l,i,s,r);return e!==void 0&&(t.add=e),S(this.scene,o,t),o})},34914:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(22186),S=n(39429);S.register("bitmapText",function(x,h,d,t,e,l){return this.displayList.add(new m(this.scene,x,h,d,t,e,l))})},18658:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(33590),x=n(37289),E.exports={renderWebGL:S,renderCanvas:x}},33590:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(3217),S=n(91296),x=n(70554),h={tintEffect:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},d={tintEffect:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},t=function(e,l,i,s){var r=l._text,o=r.length;if(o!==0){var a=i.camera;a.addToRenderList(l);var u=l.customRenderNodes.Submitter||l.defaultRenderNodes.Submitter,f=S(l,a,s,!i.useCanvas).calc,v=l.charColors,c=x.getTintAppendFloatAlpha;h.tintFill=l.tintFill,h.tintTopLeft=c(l.tintTopLeft,l._alphaTL),h.tintTopRight=c(l.tintTopRight,l._alphaTR),h.tintBottomLeft=c(l.tintBottomLeft,l._alphaBL),h.tintBottomRight=c(l.tintBottomRight,l._alphaBR);var g=l.getTextBounds(!1),p,T,C,M=g.characters,A=l.dropShadowX,R=l.dropShadowY,P=A!==0||R!==0;if(P){var L=l.dropShadowColor,F=l.dropShadowAlpha;for(d.tintFill=1,d.tintTopLeft=c(L,F*l._alphaTL),d.tintTopRight=c(L,F*l._alphaTR),d.tintBottomLeft=c(L,F*l._alphaBL),d.tintBottomRight=c(L,F*l._alphaBR),p=0;p<M.length;p++)T=M[p],C=T.glyph,!(T.code===32||C.width===0||C.height===0)&&m(i,u,l,T,C,A,R,f,d)}for(p=0;p<M.length;p++)if(T=M[p],C=T.glyph,!(T.code===32||C.width===0||C.height===0))if(v[T.i]){var w=v[T.i];d.tintFill=w.tintEffect,d.tintTopLeft=c(w.tintTL,l._alphaTL),d.tintTopRight=c(w.tintTR,l._alphaTR),d.tintBottomLeft=c(w.tintBL,l._alphaBL),d.tintBottomRight=c(w.tintBR,l._alphaBR),m(i,u,l,T,C,0,0,f,d)}else m(i,u,l,T,C,0,0,f,h)}};E.exports=t},6107:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(48011),S=n(46590),x=n(98682),h=n(83419),d=n(31401),t=n(4327),e=n(95643),l=n(73162),i=new h({Extends:e,Mixins:[d.Alpha,d.BlendMode,d.Depth,d.Lighting,d.Mask,d.RenderNodes,d.ScrollFactor,d.Size,d.Texture,d.Transform,d.Visible,m],initialize:function(r,o,a,u,f){e.call(this,r,"Blitter"),this.setTexture(u,f),this.setPosition(o,a),this.initRenderNodes(this._defaultRenderNodesMap),this.children=new l,this.renderList=[],this.dirty=!1},_defaultRenderNodesMap:{get:function(){return x}},create:function(s,r,o,a,u){a===void 0&&(a=!0),u===void 0&&(u=this.children.length),o===void 0?o=this.frame:o instanceof t||(o=this.texture.get(o));var f=new S(this,s,r,o,a);return this.children.addAt(f,u,!1),this.dirty=!0,f},createFromCallback:function(s,r,o,a){for(var u=this.createMultiple(r,o,a),f=0;f<u.length;f++){var v=u[f];s.call(this,v,f)}return u},createMultiple:function(s,r,o){r===void 0&&(r=this.frame.name),o===void 0&&(o=!0),Array.isArray(r)||(r=[r]);var a=[],u=this;return r.forEach(function(f){for(var v=0;v<s;v++)a.push(u.create(0,0,f,o))}),a},childCanRender:function(s){return s.visible&&s.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=[]}});E.exports=i},72396:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=m.getRenderList();if(h.length!==0){var d=n.currentContext,t=S.alpha*m.alpha;if(t!==0){S.addToRenderList(m),d.globalCompositeOperation=n.blendModes[m.blendMode],d.imageSmoothingEnabled=!m.frame.source.scaleMode;var e=m.x-S.scrollX*m.scrollFactorX,l=m.y-S.scrollY*m.scrollFactorY;d.save(),x&&x.copyToContext(d);for(var i=S.roundPixels,s=0;s<h.length;s++){var r=h[s],o=r.flipX||r.flipY,a=r.frame,u=a.canvasData,f=a.x,v=a.y,c=1,g=1,p=r.alpha*t;p!==0&&(d.globalAlpha=p,o?(r.flipX&&(c=-1,f-=u.width),r.flipY&&(g=-1,v-=u.height),u.width>0&&u.height>0&&(d.save(),d.translate(r.x+e,r.y+l),d.scale(c,g),d.drawImage(a.source.image,u.x,u.y,u.width,u.height,f,v,u.width,u.height),d.restore())):(i&&(f=Math.round(f),v=Math.round(v)),u.width>0&&u.height>0&&d.drawImage(a.source.image,u.x,u.y,u.width,u.height,f+r.x+e,v+r.y+l,u.width,u.height)))}d.restore()}}};E.exports=y},9403:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(6107),S=n(25305),x=n(44603),h=n(23568);x.register("blitter",function(d,t){d===void 0&&(d={});var e=h(d,"key",null),l=h(d,"frame",null),i=new m(this.scene,0,0,e,l);return t!==void 0&&(d.add=t),S(this.scene,i,d),i})},12709:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(6107),S=n(39429);S.register("blitter",function(x,h,d,t){return this.displayList.add(new m(this.scene,x,h,d,t))})},48011:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(99485),x=n(72396),E.exports={renderWebGL:S,renderCanvas:x}},99485:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=n(70554),x=new m,h={quad:new Float32Array(8)},d={},t={},e=function(l,i,s,r){var o=i.getRenderList(),a=s.camera,u=i.alpha;if(!(o.length===0||u===0)){a.addToRenderList(i);var f=x.copyWithScrollFactorFrom(a.getViewMatrix(!s.useCanvas),a.scrollX,a.scrollY,i.scrollFactorX,i.scrollFactorY);r&&f.multiply(r);for(var v=i.x,c=i.y,g=i.customRenderNodes,p=i.defaultRenderNodes,T=0;T<o.length;T++){var C=o[T],M=C.frame,A=C.alpha*u;if(A!==0){var R=M.width,P=M.height,L=v+C.x+M.x,F=c+C.y+M.y;C.flipX&&(R*=-1,L+=M.width),C.flipY&&(P*=-1,F+=M.height),f.setQuad(L,F,L+R,F+P,h.quad),d.frame=M,d.uvSource=M;var w=S.getTintAppendFloatAlpha(C.tint,A);t.tintTopLeft=w,t.tintBottomLeft=w,t.tintTopRight=w,t.tintBottomRight=w,(g.Submitter||p.Submitter).run(s,i,r,0,d,h,t,void 0,0)}}}};E.exports=e},46590:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(4327),x=new m({initialize:function(d,t,e,l,i){this.parent=d,this.x=t,this.y=e,this.frame=l,this.data={},this.tint=16777215,this._visible=i,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(h){return h===void 0?this.frame=this.parent.frame:h instanceof S&&h.texture===this.parent.texture?this.frame=h:this.frame=this.parent.texture.get(h),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(h,d,t){return this.x=h,this.y=d,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,t&&this.setFrame(t),this},setPosition:function(h,d){return this.x=h,this.y=d,this},setFlipX:function(h){return this.flipX=h,this},setFlipY:function(h){return this.flipY=h,this},setFlip:function(h,d){return this.flipX=h,this.flipY=d,this},setVisible:function(h){return this.visible=h,this},setAlpha:function(h){return this.alpha=h,this},setTint:function(h){return this.tint=h,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(h){this.parent.dirty|=this._visible!==h,this._visible=h}},alpha:{get:function(){return this._alpha},set:function(h){this.parent.dirty|=this._alpha>0!=h>0,this._alpha=h}}});E.exports=x},43451:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87774),S=n(30529),x=n(83419),h=n(31401),d=n(95643),t=n(36683),e=new x({Extends:d,Mixins:[h.BlendMode,h.Depth,h.RenderNodes,h.Visible,t],initialize:function(i,s){d.call(this,i,"CaptureFrame");var r=i.renderer;this.drawingContext=new m(r,{width:r.width,height:r.height}),this.captureTexture=i.sys.textures.addGLTexture(s,this.drawingContext.texture),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return S}},setAlpha:function(l){return this},setScrollFactor:function(l,i){return this}});E.exports=e},23675:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(44603),S=n(23568),x=n(43451);m.register("captureFrame",function(h,d){h===void 0&&(h={});var t=S(h,"depth",0),e=S(h,"key",null),l=S(h,"visible",!0),i=new x(this.scene,e);return d!==void 0&&(h.add=d),i.setDepth(t).setVisible(l),h.add&&this.scene.sys.displayList.add(i),i})},20421:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43451),S=n(39429);S.register("captureFrame",function(x){return this.displayList.add(new m(this.scene,x))})},36683:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(82237),E.exports={renderWebGL:S,renderCanvas:x}},82237:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=!1,n=function(m,S,x){if(x.useCanvas){y||(y=!0,console.warn("CaptureFrame: Cannot capture from main canvas. Activate `forceComposite` on the camera to use this feature. This warning will now mute."));return}x.camera.addToRenderList(S);var h=x.width,d=x.height,t=S.customRenderNodes,e=S.defaultRenderNodes;S.drawingContext.resize(h,d),S.drawingContext.use(),(t.BatchHandler||e.BatchHandler).batch(S.drawingContext,x.texture,0,d,0,0,h,d,h,0,0,0,1,1,!1,4294967295,4294967295,4294967295,4294967295,{}),S.drawingContext.release()};E.exports=n},16005:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=2,x={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(h,d,t,e){return h===void 0&&(h=1),d===void 0?this.alpha=h:(this._alphaTL=m(h,0,1),this._alphaTR=m(d,0,1),this._alphaBL=m(t,0,1),this._alphaBR=m(e,0,1)),this},alpha:{get:function(){return this._alpha},set:function(h){var d=m(h,0,1);this._alpha=d,this._alphaTL=d,this._alphaTR=d,this._alphaBL=d,this._alphaBR=d,d===0?this.renderFlags&=~S:this.renderFlags|=S}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(h){var d=m(h,0,1);this._alphaTL=d,d!==0&&(this.renderFlags|=S)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(h){var d=m(h,0,1);this._alphaTR=d,d!==0&&(this.renderFlags|=S)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(h){var d=m(h,0,1);this._alphaBL=d,d!==0&&(this.renderFlags|=S)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(h){var d=m(h,0,1);this._alphaBR=d,d!==0&&(this.renderFlags|=S)}}};E.exports=x},88509:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=2,x={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(h){return h===void 0&&(h=1),this.alpha=h,this},alpha:{get:function(){return this._alpha},set:function(h){var d=m(h,0,1);this._alpha=d,d===0?this.renderFlags&=~S:this.renderFlags|=S}}};E.exports=x},90065:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10312),S={_blendMode:m.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(x){typeof x=="string"&&(x=m[x]),x|=0,x>=-1&&(this._blendMode=x)}},setBlendMode:function(x){return this.blendMode=x,this}};E.exports=S},94215:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(n){this.scaleX=n/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(n){this.scaleY=n/this.height}},setSize:function(n,m){return this.width=n,this.height=m,this},setDisplaySize:function(n,m){return this.displayWidth=n,this.displayHeight=m,this}};E.exports=y},61683:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={texture:null,frame:null,isCropped:!1,setCrop:function(n,m,S,x){if(n===void 0)this.isCropped=!1;else if(this.frame){if(typeof n=="number")this.frame.setCropUVs(this._crop,n,m,S,x,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},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}}};E.exports=y},89272:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37105),S={_depth:0,depth:{get:function(){return this._depth},set:function(x){this.displayList&&this.displayList.queueDepthSort(),this._depth=x}},setDepth:function(x){return x===void 0&&(x=0),this.depth=x,this},setToTop:function(){var x=this.getDisplayList();return x&&m.BringToTop(x,this),this},setToBack:function(){var x=this.getDisplayList();return x&&m.SendToBack(x,this),this},setAbove:function(x){var h=this.getDisplayList();return h&&x&&m.MoveAbove(h,this,x),this},setBelow:function(x){var h=this.getDisplayList();return h&&x&&m.MoveBelow(h,this,x),this}};E.exports=S},3248:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={timeElapsed:0,timeElapsedResetPeriod:36e5,timePaused:!1,setTimerResetPeriod:function(n){return this.timeElapsedResetPeriod=n,this},setTimerPaused:function(n){return this.timePaused=!!n,this},resetTimer:function(n){return n===void 0&&(n=0),this.timeElapsed=n,this},updateTimer:function(n,m){return this.timePaused||(this.timeElapsed+=m,this.timeElapsed>=this.timeElapsedResetPeriod&&(this.timeElapsed-=this.timeElapsedResetPeriod)),this}};E.exports=y},53427:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(10189),x=n(16762),h=n(37597),d=n(88344),t=n(47564),e=n(77011),l=n(16898),i=n(42652),s=n(97797),r=null,o=n(29861),a=n(63785),u=n(62229),f=n(99534),v=new m({initialize:function(p){this.camera=p,this.list=[]},clear:function(){for(var g=0;g<this.list.length;g++){var p=this.list[g];p.ignoreDestroy||p.destroy()}return this.list.length=0,this},add:function(g,p){return p===void 0?this.list.push(g):this.list.splice(p,0,g),g},remove:function(g,p){var T=this.list.indexOf(g);return T!==-1&&(this.list.splice(T,1),(!g.ignoreDestroy||p)&&g.destroy()),this},getActive:function(){return this.list.filter(c)},addBarrel:function(g){return this.add(new S(this.camera,g))},addBlend:function(g,p,T,C){return this.add(new x(this.camera,g,p,T,C))},addBlocky:function(g){return this.add(new h(this.camera,g))},addBlur:function(g,p,T,C,M,A){return this.add(new d(this.camera,g,p,T,C,M,A))},addBokeh:function(g,p,T){return this.add(new t(this.camera,g,p,T))},addColorMatrix:function(){return this.add(new e(this.camera))},addDisplacement:function(g,p,T){return this.add(new l(this.camera,g,p,T))},addGlow:function(g,p,T,C,M,A,R){return this.add(new i(this.camera,g,p,T,C,M,A,R))},addMask:function(g,p,T,C,M){return this.add(new s(this.camera,g,p,T,C,M))},addParallelFilters:function(){return r||(r=n(2195)),this.add(new r(this.camera))},addPixelate:function(g){return this.add(new o(this.camera,g))},addSampler:function(g,p){return this.add(new a(this.camera,g,p))},addShadow:function(g,p,T,C,M,A,R){return this.add(new u(this.camera,g,p,T,C,M,A,R))},addThreshold:function(g,p,T){return this.add(new f(this.camera,g,p,T))},addTiltShift:function(g,p,T,C,M,A){return this.add(new t(this.camera,g,p,T,!0,C,M,A))},destroy:function(){this.clear(),this.camera=null}});function c(g){return g.active}E.exports=v},43102:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=null,S=n(26099),x=n(61340),h={};h={filterCamera:null,filters:{get:function(){return this.filterCamera?this.filterCamera.filters:null}},renderFilters:!0,maxFilterSize:null,filtersAutoFocus:!0,filtersFocusContext:!1,filtersForceComposite:!1,_filtersMatrix:null,_filtersViewMatrix:null,willRenderFilters:function(){return this.renderFilters&&this.filters&&(this.filters.internal.getActive().length>0||this.filters.external.getActive().length>0||this.filtersForceComposite)},enableFilters:function(){if(this.filterCamera||!this.scene.renderer.gl)return this;var d=this.scene;if(m||(m=n(38058)),this.filterCamera=new m(0,0,1,1).setScene(d,!1),this.filterCamera.isObjectInversion=!0,d.game.config.roundPixels&&(this.filterCamera.roundPixels=!0),!this.maxFilterSize){var t=d.renderer.getMaxTextureSize();this.maxFilterSize=new S(t,t)}return this._filtersMatrix=new x,this._filtersViewMatrix=new x,(!this.getBounds||this.width===void 0||this.height===void 0||this.width===0||this.height===0)&&(this.filtersFocusContext=!0),this.addRenderStep(this.renderWebGLFilters,0),this},renderWebGLFilters:function(d,t,e,l,i){if(!t.willRenderFilters()){t.renderWebGLStep(d,t,e,l,i+1);return}var s=e.camera,r=t.filtersAutoFocus,o=t.filtersFocusContext;r&&(o?t.focusFiltersOnCamera(s):t.focusFilters());var a=t.filterCamera;if(a.preRender(),r&&o){var u=t.parentContainer;if(u){var f=u.getWorldTransformMatrix();a.matrix.multiply(f)}}var v=t._filtersMatrix,c=t._filtersViewMatrix.copyWithScrollFactorFrom(s.getViewMatrix(!e.useCanvas),s.scrollX,s.scrollY,t.scrollFactorX,t.scrollFactorY);if(l&&c.multiply(l),o)v.loadIdentity();else{if(t.type==="Layer")v.loadIdentity();else{var g=t.flipX?-1:1,p=t.flipY?-1:1;v.applyITRS(t.x,t.y,t.rotation,t.scaleX*g,t.scaleY*p)}var T=a.width,C=a.height;v.translate(-T*a.originX,-C*a.originY),c.multiply(v,v)}var M=t.scrollFactorX,A=t.scrollFactorY;t.scrollFactorX=1,t.scrollFactorY=1,d.cameraRenderNode.run(e,[t],a,v,!0,i+1),t.scrollFactorX=M,t.scrollFactorY=A;for(var R=a.renderList.length,P=0;P<R;P++)s.addToRenderList(a.renderList[P])},focusFilters:function(){var d=this.x,t=this.y,e=this.originX,l=this.originY,i=this.width,s=this.height;if(this.type==="Layer"||isNaN(d)||isNaN(t)||isNaN(i)||isNaN(s)||isNaN(e)||isNaN(l)||i===0||s===0)return this.filtersFocusContext=!0,this;var r=this.rotation,o=this.scaleX,a=this.scaleY;this.flipX&&(o*=-1,e=1-e),this.flipY&&(a*=-1,l=1-l);var u=d+i*(.5-e),f=t+s*(.5-l);return this.setFilterSize(i,s),this.filterCamera.centerOn(u,f).setRotation(-r).setOrigin(e,l).setZoom(1/o,1/a),this},focusFiltersOnCamera:function(d){var t=d.width,e=d.height,l=d.scrollX,i=d.scrollY,s=d.rotation,r=d.zoomX,o=d.zoomY;return this.setFilterSize(t,e),this.filterCamera.setScroll(l,i),this.filterCamera.setRotation(s),this.filterCamera.setZoom(r,o),this},focusFiltersOverride:function(d,t,e,l){var i=this.filterCamera;e===void 0&&(e=i.width),l===void 0&&(l=i.height),d===void 0&&(d=e/2),t===void 0&&(t=l/2);var s=this.x,r=this.y;this.setFilterSize(e,l),i.setScroll(s-d,r-t);var o=d/e,a=t/l;return i.setOrigin(o,a),this.filtersAutoFocus=!1,this},setFilterSize:function(d,t){d=Math.max(1,Math.min(Math.ceil(d),this.maxFilterSize.x)),t=Math.max(1,Math.min(Math.ceil(t),this.maxFilterSize.y));var e=this.filterCamera;return e?(e.setSize(d,t),this):this},setFiltersAutoFocus:function(d){return this.filtersAutoFocus=d,this},setFiltersFocusContext:function(d){return this.filtersFocusContext=d,this},setFiltersForceComposite:function(d){return this.filtersForceComposite=d,this},setRenderFilters:function(d){return this.renderFilters=d,this}},E.exports=h},54434:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(n){return this.flipX=n,this},setFlipY:function(n){return this.flipY=n,this},setFlip:function(n,m){return this.flipX=n,this.flipY=m,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};E.exports=y},8004:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=n(11520),x=n(26099),h={prepareBoundsOutput:function(d,t){if(t===void 0&&(t=!1),this.rotation!==0&&S(d,this.x,this.y,this.rotation),t&&this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix();e.transformPoint(d.x,d.y,d)}return d},getCenter:function(d,t){return d===void 0&&(d=new x),d.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,d.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(d,t)},getTopLeft:function(d,t){return d||(d=new x),d.x=this.x-this.displayWidth*this.originX,d.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(d,t)},getTopCenter:function(d,t){return d||(d=new x),d.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,d.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(d,t)},getTopRight:function(d,t){return d||(d=new x),d.x=this.x-this.displayWidth*this.originX+this.displayWidth,d.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(d,t)},getLeftCenter:function(d,t){return d||(d=new x),d.x=this.x-this.displayWidth*this.originX,d.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(d,t)},getRightCenter:function(d,t){return d||(d=new x),d.x=this.x-this.displayWidth*this.originX+this.displayWidth,d.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(d,t)},getBottomLeft:function(d,t){return d||(d=new x),d.x=this.x-this.displayWidth*this.originX,d.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(d,t)},getBottomCenter:function(d,t){return d||(d=new x),d.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,d.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(d,t)},getBottomRight:function(d,t){return d||(d=new x),d.x=this.x-this.displayWidth*this.originX+this.displayWidth,d.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(d,t)},getBounds:function(d){d===void 0&&(d=new m);var t,e,l,i,s,r,o,a;if(this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(d),u.transformPoint(d.x,d.y,d),t=d.x,e=d.y,this.getTopRight(d),u.transformPoint(d.x,d.y,d),l=d.x,i=d.y,this.getBottomLeft(d),u.transformPoint(d.x,d.y,d),s=d.x,r=d.y,this.getBottomRight(d),u.transformPoint(d.x,d.y,d),o=d.x,a=d.y}else this.getTopLeft(d),t=d.x,e=d.y,this.getTopRight(d),l=d.x,i=d.y,this.getBottomLeft(d),s=d.x,r=d.y,this.getBottomRight(d),o=d.x,a=d.y;return d.x=Math.min(t,l,s,o),d.y=Math.min(e,i,r,a),d.width=Math.max(t,l,s,o)-d.x,d.height=Math.max(e,i,r,a)-d.y,d}};E.exports=h},73629:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={lighting:!1,selfShadow:{enabled:null,penumbra:.5,diffuseFlatThreshold:.3333333333333333},setLighting:function(n){return this.lighting=n,this},setSelfShadow:function(n,m,S){return n!==void 0&&(n===null?this.selfShadow.enabled=this.scene.sys.game.config.selfShadow:this.selfShadow.enabled=n),m!==void 0&&(this.selfShadow.penumbra=m),S!==void 0&&(this.selfShadow.diffuseFlatThreshold=S),this}};E.exports=y},8573:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8054),S=n(80661),x={mask:null,setMask:function(h){return this.scene.renderer.type===m.WEBGL?(console.warn("Phaser.GameObjects.Components.Mask.setMask: This method is not supported in WebGL. Create a Mask filter instead."),this):(this.mask=h,this)},clearMask:function(h){return h===void 0&&(h=!1),h&&this.mask&&this.mask.destroy(),this.mask=null,this},createGeometryMask:function(h){return h===void 0&&(this.type==="Graphics"||this.geom)&&(h=this),new S(this.scene,h)}};E.exports=x},27387:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(n){this._displayOriginX=n,this.originX=n/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(n){this._displayOriginY=n,this.originY=n/this.height}},setOrigin:function(n,m){return n===void 0&&(n=.5),m===void 0&&(m=n),this.originX=n,this.originY=m,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(n,m){return n===void 0&&(n=0),m===void 0&&(m=n),this.displayOriginX=n,this.displayOriginY=m,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};E.exports=y},37640:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39506),S=n(57355),x=n(35154),h=n(86353),d=n(26099),t={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:h.PLAYING_FORWARD,setPath:function(e,l){l===void 0&&(l=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=e,l&&this.startFollow(l),this},setRotateToPath:function(e,l){return l===void 0&&(l=0),this.rotateToPath=e,this.pathRotationOffset=l,this},isFollowing:function(){var e=this.pathTween;return e&&e.isPlaying()},startFollow:function(e,l){e===void 0&&(e={}),l===void 0&&(l=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),typeof e=="number"&&(e={duration:e}),e.from=x(e,"from",0),e.to=x(e,"to",1);var s=S(e,"positionOnPath",!1);this.rotateToPath=S(e,"rotateToPath",!1),this.pathRotationOffset=x(e,"rotationOffset",0);var r=x(e,"startAt",l);if(r&&(e.onStart=function(a){var u=a.data[0];u.progress=r,u.elapsed=u.duration*r;var f=u.ease(u.progress);u.current=u.start+(u.end-u.start)*f,u.setTargetValue()}),this.pathOffset||(this.pathOffset=new d(this.x,this.y)),this.pathVector||(this.pathVector=new d),this.pathDelta||(this.pathDelta=new d),this.pathDelta.reset(),e.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(e),this.path.getStartPoint(this.pathOffset),s&&(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=h.PLAYING_FORWARD,this.rotateToPath){var o=this.path.getPoint(.1);this.rotation=Math.atan2(o.y-this.y,o.x-this.x)+m(this.pathRotationOffset)}return this.pathConfig=e,this},pauseFollow:function(){var e=this.pathTween;return e&&e.isPlaying()&&e.pause(),this},resumeFollow:function(){var e=this.pathTween;return e&&e.isPaused()&&e.resume(),this},stopFollow:function(){var e=this.pathTween;return e&&e.isPlaying()&&e.stop(),this},pathUpdate:function(){var e=this.pathTween;if(e&&e.data){var l=e.data[0],i=this.pathDelta,s=this.pathVector;if(i.copy(s).negate(),l.state===h.COMPLETE){this.path.getPoint(l.end,s),i.add(s),s.add(this.pathOffset),this.setPosition(s.x,s.y);return}else if(l.state!==h.PLAYING_FORWARD&&l.state!==h.PLAYING_BACKWARD)return;this.path.getPoint(e.getValue(),s),i.add(s),s.add(this.pathOffset);var r=this.x,o=this.y;this.setPosition(s.x,s.y);var a=this.x-r,u=this.y-o;if(a===0&&u===0)return;if(l.state!==this._prevDirection){this._prevDirection=l.state;return}this.rotateToPath&&(this.rotation=Math.atan2(u,a)+m(this.pathRotationOffset))}}};E.exports=t},68680:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62644),S={customRenderNodes:null,defaultRenderNodes:null,renderNodeData:null,initRenderNodes:function(x){this.customRenderNodes={},this.defaultRenderNodes={},this.renderNodeData={};var h=this.scene.sys.renderer;if(h){var d=h.renderNodes;if(d&&x){var t=this.defaultRenderNodes;x.each(function(e,l){t[e]=d.getNode(l)})}}},setRenderNodeRole:function(x,h,d,t){var e=this.scene.sys.renderer;if(!e)return this;var l=e.renderNodes;if(!l)return this;if(h!==null){if(typeof h=="string"&&(h=l.getNode(h)),!h)return this;this.customRenderNodes[x]=h,d?this.renderNodeData[h.name]=t?m(d):d:this.renderNodeData[h.name]={}}else{var i=this.customRenderNodes[x];i&&(delete this.renderNodeData[i.name],delete this.customRenderNodes[x])}return this},setRenderNodeData:function(x,h,d){var t=x;typeof x!="string"&&(t=x.name);var e=this.renderNodeData[t];return d===void 0?delete e[h]:e[h]=d,this}};E.exports=S},86038:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={};y={_renderSteps:null,renderWebGLStep:function(n,m,S,x,h,d,t){h===void 0&&(h=0);var e=m._renderSteps[h];e&&(d?t===void 0&&(t=0):(d=[m],t=0),e(n,m,S,x,h,d,t))},addRenderStep:function(n,m){return this._renderSteps||(this._renderSteps=[]),m===void 0?(this._renderSteps.push(n),this):(this._renderSteps.splice(m,0,n),this)}},E.exports=y},80227:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(n,m){return m===void 0&&(m=n),this.scrollFactorX=n,this.scrollFactorY=m,this}};E.exports=y},16736:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(n){this.scaleX=n/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(n){this.scaleY=n/this.frame.realHeight}},setSizeToFrame:function(n){n||(n=this.frame),this.width=n.realWidth,this.height=n.realHeight;var m=this.input;return m&&!m.customHitArea&&(m.hitArea.width=this.width,m.hitArea.height=this.height),this},setSize:function(n,m){return this.width=n,this.height=m,this},setDisplaySize:function(n,m){return this.displayWidth=n,this.displayHeight=m,this}};E.exports=y},37726:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(4327),S=8,x={texture:null,frame:null,isCropped:!1,setTexture:function(h,d,t,e){return this.texture=this.scene.sys.textures.get(h),this.setFrame(d,t,e)},setFrame:function(h,d,t){return d===void 0&&(d=!0),t===void 0&&(t=!0),h instanceof m?(this.texture=this.scene.sys.textures.get(h.texture.key),this.frame=h):this.frame=this.texture.get(h),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~S:this.renderFlags|=S,this._sizeComponent&&d&&this.setSizeToFrame(),this._originComponent&&t&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};E.exports=x},79812:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(4327),S=8,x={texture:null,frame:null,isCropped:!1,setCrop:function(h,d,t,e){if(h===void 0)this.isCropped=!1;else if(this.frame){if(typeof h=="number")this.frame.setCropUVs(this._crop,h,d,t,e,this.flipX,this.flipY);else{var l=h;this.frame.setCropUVs(this._crop,l.x,l.y,l.width,l.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(h,d){return this.texture=this.scene.sys.textures.get(h),this.setFrame(d)},setFrame:function(h,d,t){return d===void 0&&(d=!0),t===void 0&&(t=!0),h instanceof m?(this.texture=this.scene.sys.textures.get(h.texture.key),this.frame=h):this.frame=this.texture.get(h),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~S:this.renderFlags|=S,this._sizeComponent&&d&&this.setSizeToFrame(),this._originComponent&&t&&(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}}};E.exports=x},27472:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(n,m,S,x){return n===void 0&&(n=16777215),m===void 0&&(m=n,S=n,x=n),this.tintTopLeft=n,this.tintTopRight=m,this.tintBottomLeft=S,this.tintBottomRight=x,this.tintFill=!1,this},setTintFill:function(n,m,S,x){return this.setTint(n,m,S,x),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(n){this.setTint(n,n,n,n)}},isTinted:{get:function(){var n=16777215;return this.tintFill||this.tintTopLeft!==n||this.tintTopRight!==n||this.tintBottomLeft!==n||this.tintBottomRight!==n}}};E.exports=y},53774:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m={name:n.name,type:n.type,x:n.x,y:n.y,depth:n.depth,scale:{x:n.scaleX,y:n.scaleY},origin:{x:n.originX,y:n.originY},flipX:n.flipX,flipY:n.flipY,rotation:n.rotation,alpha:n.alpha,visible:n.visible,blendMode:n.blendMode,textureKey:"",frameKey:"",data:{}};return n.texture&&(m.textureKey=n.texture.key,m.frameKey=n.frame.name),m};E.exports=y},16901:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=n(61340),x=n(85955),h=n(86554),d=n(30954),t=n(26099),e=4,l={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&=~e:this.renderFlags|=e}},scaleX:{get:function(){return this._scaleX},set:function(i){this._scaleX=i,i===0?this.renderFlags&=~e:this._scaleY!==0&&(this.renderFlags|=e)}},scaleY:{get:function(){return this._scaleY},set:function(i){this._scaleY=i,i===0?this.renderFlags&=~e:this._scaleX!==0&&(this.renderFlags|=e)}},angle:{get:function(){return d(this._rotation*m.RAD_TO_DEG)},set:function(i){this.rotation=d(i)*m.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(i){this._rotation=h(i)}},setPosition:function(i,s,r,o){return i===void 0&&(i=0),s===void 0&&(s=i),r===void 0&&(r=0),o===void 0&&(o=0),this.x=i,this.y=s,this.z=r,this.w=o,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,s,r,o){return i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=this.scene.sys.scale.width),o===void 0&&(o=this.scene.sys.scale.height),this.x=i+Math.random()*r,this.y=s+Math.random()*o,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,s){return i===void 0&&(i=1),s===void 0&&(s=i),this.scaleX=i,this.scaleY=s,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 S),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(i,s){i===void 0&&(i=new S);var r=this.parentContainer;if(!r)return this.getLocalTransformMatrix(i);var o=!1;for(s||(s=new S,o=!0),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);r;)s.applyITRS(r.x,r.y,r._rotation,r._scaleX,r._scaleY),s.multiply(i,i),r=r.parentContainer;return o&&s.destroy(),i},getLocalPoint:function(i,s,r,o){r||(r=new t),o||(o=this.scene.sys.cameras.main);var a=o.scrollX,u=o.scrollY,f=i+a*this.scrollFactorX-a,v=s+u*this.scrollFactorY-u;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(f,v,r):x(f,v,this.x,this.y,this.rotation,this.scaleX,this.scaleY,r),this._originComponent&&(r.x+=this._displayOriginX,r.y+=this._displayOriginY),r},getWorldPoint:function(i,s,r){i===void 0&&(i=new t);var o=this.parentContainer;if(!o)return i.x=this.x,i.y=this.y,i;var a=this.getWorldTransformMatrix(s,r);return i.x=a.tx,i.y=a.ty,i},getParentRotation:function(){for(var i=0,s=this.parentContainer;s;)i+=s.rotation,s=s.parentContainer;return i}};E.exports=l},61340:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(36383),x=n(26099),h=new m({initialize:function(t,e,l,i,s,r){t===void 0&&(t=1),e===void 0&&(e=0),l===void 0&&(l=0),i===void 0&&(i=1),s===void 0&&(s=0),r===void 0&&(r=0),this.matrix=new Float32Array([t,e,l,i,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(d){this.matrix[0]=d}},b:{get:function(){return this.matrix[1]},set:function(d){this.matrix[1]=d}},c:{get:function(){return this.matrix[2]},set:function(d){this.matrix[2]=d}},d:{get:function(){return this.matrix[3]},set:function(d){this.matrix[3]=d}},e:{get:function(){return this.matrix[4]},set:function(d){this.matrix[4]=d}},f:{get:function(){return this.matrix[5]},set:function(d){this.matrix[5]=d}},tx:{get:function(){return this.matrix[4]},set:function(d){this.matrix[4]=d}},ty:{get:function(){return this.matrix[5]},set:function(d){this.matrix[5]=d}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var d=this.matrix,t=d[0],e=d[1],l=d[2],i=d[3];return t||e?e>0?Math.acos(t/this.scaleX):-Math.acos(t/this.scaleX):l||i?S.PI_OVER_2-(i>0?Math.acos(-l/this.scaleY):-Math.acos(l/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 d=this.matrix;return d[0]=1,d[1]=0,d[2]=0,d[3]=1,d[4]=0,d[5]=0,this},translate:function(d,t){var e=this.matrix;return e[4]=e[0]*d+e[2]*t+e[4],e[5]=e[1]*d+e[3]*t+e[5],this},scale:function(d,t){var e=this.matrix;return e[0]*=d,e[1]*=d,e[2]*=t,e[3]*=t,this},rotate:function(d){var t=Math.sin(d),e=Math.cos(d),l=this.matrix,i=l[0],s=l[1],r=l[2],o=l[3];return l[0]=i*e+r*t,l[1]=s*e+o*t,l[2]=i*-t+r*e,l[3]=s*-t+o*e,this},multiply:function(d,t){var e=this.matrix,l=d.matrix,i=e[0],s=e[1],r=e[2],o=e[3],a=e[4],u=e[5],f=l[0],v=l[1],c=l[2],g=l[3],p=l[4],T=l[5],C=t===void 0?e:t.matrix;return C[0]=f*i+v*r,C[1]=f*s+v*o,C[2]=c*i+g*r,C[3]=c*s+g*o,C[4]=p*i+T*r+a,C[5]=p*s+T*o+u,C},multiplyWithOffset:function(d,t,e){var l=this.matrix,i=d.matrix,s=l[0],r=l[1],o=l[2],a=l[3],u=l[4],f=l[5],v=t*s+e*o+u,c=t*r+e*a+f,g=i[0],p=i[1],T=i[2],C=i[3],M=i[4],A=i[5];return l[0]=g*s+p*o,l[1]=g*r+p*a,l[2]=T*s+C*o,l[3]=T*r+C*a,l[4]=M*s+A*o+v,l[5]=M*r+A*a+c,this},transform:function(d,t,e,l,i,s){var r=this.matrix,o=r[0],a=r[1],u=r[2],f=r[3],v=r[4],c=r[5];return r[0]=d*o+t*u,r[1]=d*a+t*f,r[2]=e*o+l*u,r[3]=e*a+l*f,r[4]=i*o+s*u+v,r[5]=i*a+s*f+c,this},transformPoint:function(d,t,e){e===void 0&&(e={x:0,y:0});var l=this.matrix,i=l[0],s=l[1],r=l[2],o=l[3],a=l[4],u=l[5];return e.x=d*i+t*r+a,e.y=d*s+t*o+u,e},invert:function(){var d=this.matrix,t=d[0],e=d[1],l=d[2],i=d[3],s=d[4],r=d[5],o=t*i-e*l;return d[0]=i/o,d[1]=-e/o,d[2]=-l/o,d[3]=t/o,d[4]=(l*r-i*s)/o,d[5]=-(t*r-e*s)/o,this},copyFrom:function(d){var t=this.matrix;return t[0]=d.a,t[1]=d.b,t[2]=d.c,t[3]=d.d,t[4]=d.e,t[5]=d.f,this},copyFromArray:function(d){var t=this.matrix;return t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=d[3],t[4]=d[4],t[5]=d[5],this},copyWithScrollFactorFrom:function(d,t,e,l,i){var s=this.matrix;s[0]=d.a,s[1]=d.b,s[2]=d.c,s[3]=d.d;var r=t*(1-l),o=e*(1-i);return s[4]=d.a*r+d.c*o+d.e,s[5]=d.b*r+d.d*o+d.f,this},copyToContext:function(d){var t=this.matrix;return d.transform(t[0],t[1],t[2],t[3],t[4],t[5]),d},setToContext:function(d){return d.setTransform(this.a,this.b,this.c,this.d,this.e,this.f),d},copyToArray:function(d){var t=this.matrix;return d===void 0?d=[t[0],t[1],t[2],t[3],t[4],t[5]]:(d[0]=t[0],d[1]=t[1],d[2]=t[2],d[3]=t[3],d[4]=t[4],d[5]=t[5]),d},setTransform:function(d,t,e,l,i,s){var r=this.matrix;return r[0]=d,r[1]=t,r[2]=e,r[3]=l,r[4]=i,r[5]=s,this},decomposeMatrix:function(){var d=this.decomposedMatrix,t=this.matrix,e=t[0],l=t[1],i=t[2],s=t[3],r=e*s-l*i;if(d.translateX=t[4],d.translateY=t[5],e||l){var o=Math.sqrt(e*e+l*l);d.rotation=l>0?Math.acos(e/o):-Math.acos(e/o),d.scaleX=o,d.scaleY=r/o}else if(i||s){var a=Math.sqrt(i*i+s*s);d.rotation=Math.PI*.5-(s>0?Math.acos(-i/a):-Math.acos(i/a)),d.scaleX=r/a,d.scaleY=a}else d.rotation=0,d.scaleX=0,d.scaleY=0;return d},applyITRS:function(d,t,e,l,i){var s=this.matrix,r=Math.sin(e),o=Math.cos(e);return s[4]=d,s[5]=t,s[0]=o*l,s[1]=r*l,s[2]=-r*i,s[3]=o*i,this},applyInverse:function(d,t,e){e===void 0&&(e=new x);var l=this.matrix,i=l[0],s=l[1],r=l[2],o=l[3],a=l[4],u=l[5],f=1/(i*o+r*-s);return e.x=o*f*d+-r*f*t+(u*r-a*o)*f,e.y=i*f*t+-s*f*d+(-u*i+a*s)*f,e},setQuad:function(d,t,e,l,i){i===void 0&&(i=this.quad);var s=this.matrix,r=s[0],o=s[1],a=s[2],u=s[3],f=s[4],v=s[5];return i[0]=d*r+t*a+f,i[1]=d*o+t*u+v,i[2]=d*r+l*a+f,i[3]=d*o+l*u+v,i[4]=e*r+l*a+f,i[5]=e*o+l*u+v,i[6]=e*r+t*a+f,i[7]=e*o+t*u+v,i},getX:function(d,t){return d*this.a+t*this.c+this.e},getY:function(d,t){return d*this.b+t*this.d+this.f},getXRound:function(d,t,e){var l=this.getX(d,t);return e&&(l=Math.floor(l+.5)),l},getYRound:function(d,t,e){var l=this.getY(d,t);return e&&(l=Math.floor(l+.5)),l},getCSSMatrix:function(){var d=this.matrix;return"matrix("+d[0]+","+d[1]+","+d[2]+","+d[3]+","+d[4]+","+d[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});E.exports=h},59715:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=1,n={_visible:!0,visible:{get:function(){return this._visible},set:function(m){m?(this._visible=!0,this.renderFlags|=y):(this._visible=!1,this.renderFlags&=~y)}},setVisible:function(m){return this.visible=m,this}};E.exports=n},31401:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Alpha:n(16005),AlphaSingle:n(88509),BlendMode:n(90065),ComputedSize:n(94215),Crop:n(61683),Depth:n(89272),ElapseTimer:n(3248),FilterList:n(53427),Filters:n(43102),Flip:n(54434),GetBounds:n(8004),Lighting:n(73629),Mask:n(8573),Origin:n(27387),PathFollower:n(37640),RenderNodes:n(68680),RenderSteps:n(86038),ScrollFactor:n(80227),Size:n(16736),Texture:n(37726),TextureCrop:n(79812),Tint:n(27472),ToJSON:n(53774),Transform:n(16901),TransformMatrix:n(61340),Visible:n(59715)}},31559:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37105),S=n(10312),x=n(83419),h=n(31401),d=n(51708),t=n(95643),e=n(87841),l=n(29959),i=n(36899),s=n(26099),r=new h.TransformMatrix,o=new x({Extends:t,Mixins:[h.AlphaSingle,h.BlendMode,h.ComputedSize,h.Depth,h.Mask,h.Transform,h.Visible,l],initialize:function(u,f,v,c){t.call(this,u,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new h.TransformMatrix,this._sortKey="",this._sysEvents=u.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(f,v),this.setBlendMode(S.SKIP_CHECK),c&&this.add(c)},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(a){return a===void 0&&(a=!0),this.exclusive=a,this},getBounds:function(a){if(a===void 0&&(a=new e),a.setTo(this.x,this.y,0,0),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix(),f=u.transformPoint(this.x,this.y);a.setTo(f.x,f.y,0,0)}if(this.list.length>0){var v=this.list,c=new e,g=!1;a.setEmpty();for(var p=0;p<v.length;p++){var T=v[p];T.getBounds&&(T.getBounds(c),g?i(c,a,a):(a.setTo(c.x,c.y,c.width,c.height),g=!0))}}return a},addHandler:function(a){a.once(d.DESTROY,this.onChildDestroyed,this),this.exclusive&&(a.parentContainer&&a.parentContainer.remove(a),a.parentContainer=this,a.removeFromDisplayList(),a.addedToScene())},removeHandler:function(a){a.off(d.DESTROY,this.remove,this),this.exclusive&&(a.parentContainer=null,a.removedFromScene(),a.addToDisplayList())},pointToContainer:function(a,u){u===void 0&&(u=new s),this.parentContainer?this.parentContainer.pointToContainer(a,u):(u.x=a.x,u.y=a.y);var f=r;return f.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),f.invert(),f.transformPoint(a.x,a.y,u),u},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(r,this.localTransform)},add:function(a){return m.Add(this.list,a,this.maxSize,this.addHandler,this),this},addAt:function(a,u){return m.AddAt(this.list,a,u,this.maxSize,this.addHandler,this),this},getAt:function(a){return this.list[a]},getIndex:function(a){return this.list.indexOf(a)},sort:function(a,u){return a?(u===void 0&&(u=function(f,v){return f[a]-v[a]}),m.StableSort(this.list,u),this):this},getByName:function(a){return m.GetFirst(this.list,"name",a)},getRandom:function(a,u){return m.GetRandom(this.list,a,u)},getFirst:function(a,u,f,v){return m.GetFirst(this.list,a,u,f,v)},getAll:function(a,u,f,v){return m.GetAll(this.list,a,u,f,v)},count:function(a,u,f,v){return m.CountAllMatching(this.list,a,u,f,v)},swap:function(a,u){return m.Swap(this.list,a,u),this},moveTo:function(a,u){return m.MoveTo(this.list,a,u),this},moveAbove:function(a,u){return m.MoveAbove(this.list,a,u),this},moveBelow:function(a,u){return m.MoveBelow(this.list,a,u),this},remove:function(a,u){var f=m.Remove(this.list,a,this.removeHandler,this);if(u&&f){Array.isArray(f)||(f=[f]);for(var v=0;v<f.length;v++)f[v].destroy()}return this},removeAt:function(a,u){var f=m.RemoveAt(this.list,a,this.removeHandler,this);return u&&f&&f.destroy(),this},removeBetween:function(a,u,f){var v=m.RemoveBetween(this.list,a,u,this.removeHandler,this);if(f)for(var c=0;c<v.length;c++)v[c].destroy();return this},removeAll:function(a){var u=this.list;if(a){for(var f=0;f<u.length;f++)u[f]&&u[f].scene&&(u[f].off(d.DESTROY,this.onChildDestroyed,this),u[f].destroy());this.list=[]}else m.RemoveBetween(u,0,u.length,this.removeHandler,this);return this},bringToTop:function(a){return m.BringToTop(this.list,a),this},sendToBack:function(a){return m.SendToBack(this.list,a),this},moveUp:function(a){return m.MoveUp(this.list,a),this},moveDown:function(a){return m.MoveDown(this.list,a),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return m.Shuffle(this.list),this},replace:function(a,u,f){var v=m.Replace(this.list,a,u);return v&&(this.addHandler(u),this.removeHandler(a),f&&a.destroy()),this},exists:function(a){return this.list.indexOf(a)>-1},setAll:function(a,u,f,v){return m.SetAll(this.list,a,u,f,v),this},each:function(a,u){var f=[null],v,c=this.list.slice(),g=c.length;for(v=2;v<arguments.length;v++)f.push(arguments[v]);for(v=0;v<g;v++)f[0]=c[v],a.apply(u,f);return this},iterate:function(a,u){var f=[null],v;for(v=2;v<arguments.length;v++)f.push(arguments[v]);for(v=0;v<this.list.length;v++)f[0]=this.list[v],a.apply(u,f);return this},setScrollFactor:function(a,u,f){return u===void 0&&(u=a),f===void 0&&(f=!1),this.scrollFactorX=a,this.scrollFactorY=u,f&&(m.SetAll(this.list,"scrollFactorX",a),m.SetAll(this.list,"scrollFactorY",u)),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(a){m.Remove(this.list,a),this.exclusive&&(a.parentContainer=null,a.removedFromScene())}});E.exports=o},53584:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S.addToRenderList(m);var h=m.list;if(h.length!==0){var d=m.localTransform;x?(d.loadIdentity(),d.multiply(x),d.translate(m.x,m.y),d.rotate(m.rotation),d.scale(m.scaleX,m.scaleY)):d.applyITRS(m.x,m.y,m.rotation,m.scaleX,m.scaleY);var t=m.blendMode!==-1;t||n.setBlendMode(0);var e=m._alpha,l=m.scrollFactorX,i=m.scrollFactorY;m.mask&&m.mask.preRenderCanvas(n,null,S);for(var s=0;s<h.length;s++){var r=h[s];if(r.willRender(S)){var o=r.alpha,a=r.scrollFactorX,u=r.scrollFactorY;!t&&r.blendMode!==n.currentBlendMode&&n.setBlendMode(r.blendMode),r.setScrollFactor(a*l,u*i),r.setAlpha(o*e),r.renderCanvas(n,r,S,d),r.setAlpha(o),r.setScrollFactor(a,u)}}m.mask&&m.mask.postRenderCanvas(n)}};E.exports=y},77143:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(31559),x=n(44603),h=n(23568),d=n(95540);x.register("container",function(t,e){t===void 0&&(t={});var l=h(t,"x",0),i=h(t,"y",0),s=d(t,"children",null),r=new S(this.scene,l,i,s);return e!==void 0&&(t.add=e),m(this.scene,r,t),r})},24961:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(31559),S=n(39429);S.register("container",function(x,h,d){return this.displayList.add(new m(this.scene,x,h,d))})},29959:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(72249),x=n(53584),E.exports={renderWebGL:S,renderCanvas:x}},72249:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8054),S=function(x,h,d,t,e,l,i){var s=d.camera;s.addToRenderList(h);var r=h.list,o=r.length;if(o!==0){var a=d,u=h.localTransform;t?(u.loadIdentity(),u.multiply(t),u.translate(h.x,h.y),u.rotate(h.rotation),u.scale(h.scaleX,h.scaleY)):u.applyITRS(h.x,h.y,h.rotation,h.scaleX,h.scaleY);var f=h.blendMode!==-1;!f&&a.blendMode!==0&&(a=a.getClone(),a.setBlendMode(0),a.use());for(var v=a,c=h.alpha,g=h.scrollFactorX,p=h.scrollFactorY,T=0;T<o;T++){var C=r[T];if(C.willRender(s)){var M,A,R,P;if(C.alphaTopLeft!==void 0)M=C.alphaTopLeft,A=C.alphaTopRight,R=C.alphaBottomLeft,P=C.alphaBottomRight;else{var L=C.alpha;M=L,A=L,R=L,P=L}var F=C.scrollFactorX,w=C.scrollFactorY;!f&&C.blendMode!==v.blendMode&&C.blendMode!==m.BlendModes.SKIP_CHECK?(v=a.getClone(),v.setBlendMode(C.blendMode),v.use()):v=a,C.setScrollFactor(F*g,w*p),C.setAlpha(M*c,A*c,R*c,P*c),C.renderWebGLStep(x,C,v,u,void 0,r,T),C.setAlpha(M,A,R,P),C.setScrollFactor(F,w)}}v!==d&&v.release()}};E.exports=S},47407:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(31401),x=n(441),h=n(95643),d=n(41212),t=n(35846),e=n(44594),l=n(61369),i=new m({Extends:h,Mixins:[S.AlphaSingle,S.BlendMode,S.Depth,S.Origin,S.ScrollFactor,S.Transform,S.Visible,x],initialize:function(r,o,a,u,f,v){if(h.call(this,r,"DOMElement"),this.parent=r.sys.game.domContainer,!this.parent)throw new Error("No DOM Container set in game config");this.cache=r.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,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(o,a),typeof u=="string"?u[0]==="#"?this.setElement(u.substr(1),f,v):this.createElement(u,f,v):u&&this.setElement(u,f,v),r.sys.events.on(e.SLEEP,this.handleSceneEvent,this),r.sys.events.on(e.WAKE,this.handleSceneEvent,this),r.sys.events.on(e.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(s){var r=this.node,o=r.style;r&&(o.display=s.settings.visible?"block":"none")},setSkew:function(s,r){return s===void 0&&(s=0),r===void 0&&(r=s),this.skewX=s,this.skewY=r,this},setPerspective:function(s){return this.parent.style.perspective=s+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(s){this.parent.style.perspective=s+"px"}},addListener:function(s){if(this.node){s=s.split(" ");for(var r=0;r<s.length;r++)this.node.addEventListener(s[r],this.handler,!1)}return this},removeListener:function(s){if(this.node){s=s.split(" ");for(var r=0;r<s.length;r++)this.node.removeEventListener(s[r],this.handler)}return this},dispatchNativeEvent:function(s){this.emit(s.type,s)},createElement:function(s,r,o){return this.setElement(document.createElement(s),r,o)},setElement:function(s,r,o){this.removeElement();var a;if(typeof s=="string"?(s[0]==="#"&&(s=s.substr(1)),a=document.getElementById(s)):typeof s=="object"&&s.nodeType===1&&(a=s),!a)return this;if(this.node=a,r&&d(r))for(var u in r)a.style[u]=r[u];else typeof r=="string"&&(a.style=r);return a.style.zIndex="0",a.style.display="inline",a.style.position="absolute",a.phaser=this,this.parent.appendChild(a),o&&(a.innerText=o),this.updateSize()},createFromCache:function(s,r){var o=this.cache.get(s);return o&&this.createFromHTML(o,r),this},createFromHTML:function(s,r){r===void 0&&(r="div"),this.removeElement();var o=document.createElement(r);return this.node=o,o.style.zIndex="0",o.style.display="inline",o.style.position="absolute",o.phaser=this,this.parent.appendChild(o),o.innerHTML=s,this.updateSize()},removeElement:function(){return this.node&&(t(this.node),this.node=null),this},updateSize:function(){var s=this.node;return this.width=s.clientWidth,this.height=s.clientHeight,this.displayWidth=this.width*this.scaleX,this.displayHeight=this.height*this.scaleY,this},getChildByProperty:function(s,r){if(this.node){for(var o=this.node.querySelectorAll("*"),a=0;a<o.length;a++)if(o[a][s]===r)return o[a]}return null},getChildByID:function(s){return this.getChildByProperty("id",s)},getChildByName:function(s){return this.getChildByProperty("name",s)},setClassName:function(s){return this.node&&(this.node.className=s,this.updateSize()),this},setText:function(s){return this.node&&(this.node.innerText=s,this.updateSize()),this},setHTML:function(s){return this.node&&(this.node.innerHTML=s,this.updateSize()),this},preRender:function(){var s=this.parentContainer,r=this.node;r&&s&&!s.willRender()&&(r.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(e.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(e.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(e.PRE_RENDER,this.preRender,this)}});E.exports=i},49381:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(47407),S=n(95643),x=n(61340),h=new x,d=new x,t=new x,e=function(l,i,s,r){if(i.node){s.camera&&(s=s.camera);var o=i.node.style,a=i.scene.sys.settings;if(!o||!a.visible||S.RENDER_MASK!==i.renderFlags||i.cameraFilter!==0&&i.cameraFilter&s.id||i.parentContainer&&!i.parentContainer.willRender()){o.display="none";return}var u=i.parentContainer,f=s.alpha*i.alpha;u&&(f*=u.alpha);var v=h,c=d,g=t,p=i.width*i.originX,T=i.height*i.originY,C="0%",M="0%";v.copyWithScrollFactorFrom(s.matrix,s.scrollX,s.scrollY,i.scrollFactorX,i.scrollFactorY),r?(v.multiply(r),p*=i.scaleX,T*=i.scaleY):(C=100*i.originX+"%",M=100*i.originY+"%"),v.translate(-p,-T),c.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),v.multiply(c,g),i.transformOnly||(o.display="block",o.opacity=f,o.zIndex=i._depth,o.pointerEvents=i.pointerEvents,o.mixBlendMode=m[i._blendMode]),o.transform=g.getCSSMatrix()+" skew("+i.skewX+"rad, "+i.skewY+"rad) rotate3d("+i.rotate3d.x+","+i.rotate3d.y+","+i.rotate3d.z+","+i.rotate3d.w+i.rotate3dAngle+")",o.transformOrigin=C+" "+M}};E.exports=e},2611:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(3069),S=n(39429);S.register("dom",function(x,h,d,t,e){var l=new m(this.scene,x,h,d,t,e);return this.displayList.add(l),l})},441:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(49381),x=n(49381),E.exports={renderWebGL:S,renderCanvas:x}},62980:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="addedtoscene"},41337:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="destroy"},44947:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="removedfromscene"},49358:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="complete"},35163:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="created"},97249:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="error"},19483:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="locked"},56059:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="loop"},26772:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="metadata"},64437:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="playing"},83411:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="play"},75780:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="seeked"},67799:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="seeking"},63500:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="stalled"},55541:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="stop"},53208:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="textureready"},4992:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="unlocked"},12:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="unsupported"},51708:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ADDED_TO_SCENE:n(62980),DESTROY:n(41337),REMOVED_FROM_SCENE:n(44947),VIDEO_COMPLETE:n(49358),VIDEO_CREATED:n(35163),VIDEO_ERROR:n(97249),VIDEO_LOCKED:n(19483),VIDEO_LOOP:n(56059),VIDEO_METADATA:n(26772),VIDEO_PLAY:n(83411),VIDEO_PLAYING:n(64437),VIDEO_SEEKED:n(75780),VIDEO_SEEKING:n(67799),VIDEO_STALLED:n(63500),VIDEO_STOP:n(55541),VIDEO_TEXTURE:n(53208),VIDEO_UNLOCKED:n(4992),VIDEO_UNSUPPORTED:n(12)}},42421:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(31401),x=n(95643),h=n(64993),d=new m({Extends:x,Mixins:[S.Alpha,S.BlendMode,S.Depth,S.Flip,S.Origin,S.ScrollFactor,S.Size,S.Texture,S.Tint,S.Transform,S.Visible,h],initialize:function(e){x.call(this,e,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});E.exports=d},70217:()=>{},56315:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(42421),S=n(39429);S.register("extern",function(){var x=new m(this.scene);return this.displayList.add(x),x})},64993:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(80287),x=n(70217),E.exports={renderWebGL:S,renderCanvas:x}},80287:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=function(x,h,d,t,e,l,i){x.renderNodes.getNode("YieldContext").run(d);var s=m(h,d.camera,t,!d.useCanvas).calc;h.render.call(h,x,d,s,l,i),x.renderNodes.getNode("RebindContext").run(d)};E.exports=S},85592:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.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:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(71911),S=n(83419),x=n(85592),h=n(31401),d=n(8497),t=n(95643),e=n(87891),l=n(95540),i=n(35154),s=n(36383),r=n(84503),o=new S({Extends:t,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Lighting,h.Mask,h.RenderNodes,h.Transform,h.Visible,h.ScrollFactor,r],initialize:function(u,f){var v=i(f,"x",0),c=i(f,"y",0);t.call(this,u,"Graphics"),this.setPosition(v,c),this.initRenderNodes(this._defaultRenderNodesMap),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.pathDetailThreshold=-1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(f)},_defaultRenderNodesMap:{get:function(){return e}},setDefaultStyles:function(a){return i(a,"lineStyle",null)&&(this.defaultStrokeWidth=i(a,"lineStyle.width",1),this.defaultStrokeColor=i(a,"lineStyle.color",16777215),this.defaultStrokeAlpha=i(a,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),i(a,"fillStyle",null)&&(this.defaultFillColor=i(a,"fillStyle.color",16777215),this.defaultFillAlpha=i(a,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(a,u,f){return f===void 0&&(f=1),this.commandBuffer.push(x.LINE_STYLE,a,u,f),this._lineWidth=a,this},fillStyle:function(a,u){return u===void 0&&(u=1),this.commandBuffer.push(x.FILL_STYLE,a,u),this},fillGradientStyle:function(a,u,f,v,c,g,p,T){return c===void 0&&(c=1),g===void 0&&(g=c),p===void 0&&(p=c),T===void 0&&(T=c),this.commandBuffer.push(x.GRADIENT_FILL_STYLE,c,g,p,T,a,u,f,v),this},lineGradientStyle:function(a,u,f,v,c,g){return g===void 0&&(g=1),this.commandBuffer.push(x.GRADIENT_LINE_STYLE,a,g,u,f,v,c),this},beginPath:function(){return this.commandBuffer.push(x.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(x.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(x.FILL_PATH),this},fill:function(){return this.commandBuffer.push(x.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(x.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(x.STROKE_PATH),this},fillCircleShape:function(a){return this.fillCircle(a.x,a.y,a.radius)},strokeCircleShape:function(a){return this.strokeCircle(a.x,a.y,a.radius)},fillCircle:function(a,u,f){return this.beginPath(),this.arc(a,u,f,0,s.TAU),this.fillPath(),this},strokeCircle:function(a,u,f){return this.beginPath(),this.arc(a,u,f,0,s.TAU),this.strokePath(),this},fillRectShape:function(a){return this.fillRect(a.x,a.y,a.width,a.height)},strokeRectShape:function(a){return this.strokeRect(a.x,a.y,a.width,a.height)},fillRect:function(a,u,f,v){return this.commandBuffer.push(x.FILL_RECT,a,u,f,v),this},strokeRect:function(a,u,f,v){var c=this._lineWidth/2,g=a-c,p=a+c;return this.beginPath(),this.moveTo(a,u),this.lineTo(a,u+v),this.strokePath(),this.beginPath(),this.moveTo(a+f,u),this.lineTo(a+f,u+v),this.strokePath(),this.beginPath(),this.moveTo(g,u),this.lineTo(p+f,u),this.strokePath(),this.beginPath(),this.moveTo(g,u+v),this.lineTo(p+f,u+v),this.strokePath(),this},fillRoundedRect:function(a,u,f,v,c){c===void 0&&(c=20);var g=c,p=c,T=c,C=c;typeof c!="number"&&(g=l(c,"tl",20),p=l(c,"tr",20),T=l(c,"bl",20),C=l(c,"br",20));var M=g>=0,A=p>=0,R=T>=0,P=C>=0;return g=Math.abs(g),p=Math.abs(p),T=Math.abs(T),C=Math.abs(C),this.beginPath(),this.moveTo(a+g,u),this.lineTo(a+f-p,u),A?this.arc(a+f-p,u+p,p,-s.PI_OVER_2,0):this.arc(a+f,u,p,Math.PI,s.PI_OVER_2,!0),this.lineTo(a+f,u+v-C),P?this.arc(a+f-C,u+v-C,C,0,s.PI_OVER_2):this.arc(a+f,u+v,C,-s.PI_OVER_2,Math.PI,!0),this.lineTo(a+T,u+v),R?this.arc(a+T,u+v-T,T,s.PI_OVER_2,Math.PI):this.arc(a,u+v,T,0,-s.PI_OVER_2,!0),this.lineTo(a,u+g),M?this.arc(a+g,u+g,g,-Math.PI,-s.PI_OVER_2):this.arc(a,u,g,s.PI_OVER_2,0,!0),this.fillPath(),this},strokeRoundedRect:function(a,u,f,v,c){c===void 0&&(c=20);var g=c,p=c,T=c,C=c,M=Math.min(f,v)/2;typeof c!="number"&&(g=l(c,"tl",20),p=l(c,"tr",20),T=l(c,"bl",20),C=l(c,"br",20));var A=g>=0,R=p>=0,P=T>=0,L=C>=0;return g=Math.min(Math.abs(g),M),p=Math.min(Math.abs(p),M),T=Math.min(Math.abs(T),M),C=Math.min(Math.abs(C),M),this.beginPath(),this.moveTo(a+g,u),this.lineTo(a+f-p,u),this.moveTo(a+f-p,u),R?this.arc(a+f-p,u+p,p,-s.PI_OVER_2,0):this.arc(a+f,u,p,Math.PI,s.PI_OVER_2,!0),this.lineTo(a+f,u+v-C),this.moveTo(a+f,u+v-C),L?this.arc(a+f-C,u+v-C,C,0,s.PI_OVER_2):this.arc(a+f,u+v,C,-s.PI_OVER_2,Math.PI,!0),this.lineTo(a+T,u+v),this.moveTo(a+T,u+v),P?this.arc(a+T,u+v-T,T,s.PI_OVER_2,Math.PI):this.arc(a,u+v,T,0,-s.PI_OVER_2,!0),this.lineTo(a,u+g),this.moveTo(a,u+g),A?this.arc(a+g,u+g,g,-Math.PI,-s.PI_OVER_2):this.arc(a,u,g,s.PI_OVER_2,0,!0),this.strokePath(),this},fillPointShape:function(a,u){return this.fillPoint(a.x,a.y,u)},fillPoint:function(a,u,f){return!f||f<1?f=1:(a-=f/2,u-=f/2),this.commandBuffer.push(x.FILL_RECT,a,u,f,f),this},fillTriangleShape:function(a){return this.fillTriangle(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)},strokeTriangleShape:function(a){return this.strokeTriangle(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)},fillTriangle:function(a,u,f,v,c,g){return this.commandBuffer.push(x.FILL_TRIANGLE,a,u,f,v,c,g),this},strokeTriangle:function(a,u,f,v,c,g){return this.commandBuffer.push(x.STROKE_TRIANGLE,a,u,f,v,c,g),this},strokeLineShape:function(a){return this.lineBetween(a.x1,a.y1,a.x2,a.y2)},lineBetween:function(a,u,f,v){return this.beginPath(),this.moveTo(a,u),this.lineTo(f,v),this.strokePath(),this},lineTo:function(a,u){return this.commandBuffer.push(x.LINE_TO,a,u),this},moveTo:function(a,u){return this.commandBuffer.push(x.MOVE_TO,a,u),this},strokePoints:function(a,u,f,v){u===void 0&&(u=!1),f===void 0&&(f=!1),v===void 0&&(v=a.length),this.beginPath(),this.moveTo(a[0].x,a[0].y);for(var c=1;c<v;c++)this.lineTo(a[c].x,a[c].y);return u&&this.lineTo(a[0].x,a[0].y),f&&this.closePath(),this.strokePath(),this},fillPoints:function(a,u,f,v){u===void 0&&(u=!1),f===void 0&&(f=!1),v===void 0&&(v=a.length),this.beginPath(),this.moveTo(a[0].x,a[0].y);for(var c=1;c<v;c++)this.lineTo(a[c].x,a[c].y);return u&&this.lineTo(a[0].x,a[0].y),f&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(a,u){u===void 0&&(u=32);var f=a.getPoints(u);return this.strokePoints(f,!0)},strokeEllipse:function(a,u,f,v,c){c===void 0&&(c=32);var g=new d(a,u,f,v),p=g.getPoints(c);return this.strokePoints(p,!0)},fillEllipseShape:function(a,u){u===void 0&&(u=32);var f=a.getPoints(u);return this.fillPoints(f,!0)},fillEllipse:function(a,u,f,v,c){c===void 0&&(c=32);var g=new d(a,u,f,v),p=g.getPoints(c);return this.fillPoints(p,!0)},arc:function(a,u,f,v,c,g,p){return g===void 0&&(g=!1),p===void 0&&(p=0),this.commandBuffer.push(x.ARC,a,u,f,v,c,g,p),this},slice:function(a,u,f,v,c,g,p){return g===void 0&&(g=!1),p===void 0&&(p=0),this.commandBuffer.push(x.BEGIN_PATH),this.commandBuffer.push(x.MOVE_TO,a,u),this.commandBuffer.push(x.ARC,a,u,f,v,c,g,p),this.commandBuffer.push(x.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(x.SAVE),this},restore:function(){return this.commandBuffer.push(x.RESTORE),this},translateCanvas:function(a,u){return this.commandBuffer.push(x.TRANSLATE,a,u),this},scaleCanvas:function(a,u){return this.commandBuffer.push(x.SCALE,a,u),this},rotateCanvas:function(a){return this.commandBuffer.push(x.ROTATE,a),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(a,u,f){var v=this.scene.sys,c=v.game.renderer;u===void 0&&(u=v.scale.width),f===void 0&&(f=v.scale.height),o.TargetCamera.setScene(this.scene),o.TargetCamera.setViewport(0,0,u,f),o.TargetCamera.scrollX=this.x,o.TargetCamera.scrollY=this.y;var g,p,T={willReadFrequently:!0};if(typeof a=="string")if(v.textures.exists(a)){g=v.textures.get(a);var C=g.getSourceImage();C instanceof HTMLCanvasElement&&(p=C.getContext("2d",T))}else g=v.textures.createCanvas(a,u,f),p=g.getSourceImage().getContext("2d",T);else a instanceof HTMLCanvasElement&&(p=a.getContext("2d",T));return p&&(this.renderCanvas(c,this,o.TargetCamera,null,p,!1),g&&g.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});o.TargetCamera=new m,E.exports=o},32768:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(85592),S=n(20926),x=function(h,d,t,e,l,i){var s=d.commandBuffer,r=s.length,o=l||h.currentContext;if(!(r===0||!S(h,o,d,t,e))){t.addToRenderList(d);var a=1,u=1,f=0,v=0,c=1,g=0,p=0,T=0;o.beginPath();for(var C=0;C<r;++C){var M=s[C];switch(M){case m.ARC:o.arc(s[C+1],s[C+2],s[C+3],s[C+4],s[C+5],s[C+6]),C+=7;break;case m.LINE_STYLE:c=s[C+1],f=s[C+2],a=s[C+3],g=(f&16711680)>>>16,p=(f&65280)>>>8,T=f&255,o.strokeStyle="rgba("+g+","+p+","+T+","+a+")",o.lineWidth=c,C+=3;break;case m.FILL_STYLE:v=s[C+1],u=s[C+2],g=(v&16711680)>>>16,p=(v&65280)>>>8,T=v&255,o.fillStyle="rgba("+g+","+p+","+T+","+u+")",C+=2;break;case m.BEGIN_PATH:o.beginPath();break;case m.CLOSE_PATH:o.closePath();break;case m.FILL_PATH:i||o.fill();break;case m.STROKE_PATH:i||o.stroke();break;case m.FILL_RECT:i?o.rect(s[C+1],s[C+2],s[C+3],s[C+4]):o.fillRect(s[C+1],s[C+2],s[C+3],s[C+4]),C+=4;break;case m.FILL_TRIANGLE:o.beginPath(),o.moveTo(s[C+1],s[C+2]),o.lineTo(s[C+3],s[C+4]),o.lineTo(s[C+5],s[C+6]),o.closePath(),i||o.fill(),C+=6;break;case m.STROKE_TRIANGLE:o.beginPath(),o.moveTo(s[C+1],s[C+2]),o.lineTo(s[C+3],s[C+4]),o.lineTo(s[C+5],s[C+6]),o.closePath(),i||o.stroke(),C+=6;break;case m.LINE_TO:o.lineTo(s[C+1],s[C+2]),C+=2;break;case m.MOVE_TO:o.moveTo(s[C+1],s[C+2]),C+=2;break;case m.LINE_FX_TO:o.lineTo(s[C+1],s[C+2]),C+=5;break;case m.MOVE_FX_TO:o.moveTo(s[C+1],s[C+2]),C+=5;break;case m.SAVE:o.save();break;case m.RESTORE:o.restore();break;case m.TRANSLATE:o.translate(s[C+1],s[C+2]),C+=2;break;case m.SCALE:o.scale(s[C+1],s[C+2]),C+=2;break;case m.ROTATE:o.rotate(s[C+1]),C+=1;break;case m.GRADIENT_FILL_STYLE:C+=5;break;case m.GRADIENT_LINE_STYLE:C+=6;break}}o.restore()}};E.exports=x},87079:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(44603),S=n(43831);m.register("graphics",function(x,h){x===void 0&&(x={}),h!==void 0&&(x.add=h);var d=new S(this.scene,x);return x.add&&this.scene.sys.displayList.add(d),d})},1201:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43831),S=n(39429);S.register("graphics",function(x){return this.displayList.add(new m(this.scene,x))})},84503:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(77545),x=n(32768),x=n(32768),E.exports={renderWebGL:S,renderCanvas:x}},77545:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(85592),S=n(91296),x=n(70554),h=n(61340),d=function(u,f,v){this.x=u,this.y=f,this.width=v},t=function(u,f,v){this.points=[],this.points[0]=new d(u,f,v),this.addPoint=function(c,g,p){var T=this.points[this.points.length-1];T.x===c&&T.y===g||this.points.push(new d(c,g,p))}},e=[],l=new h,i=new h,s={TL:0,TR:0,BL:0,BR:0},r={TL:0,TR:0,BL:0,BR:0},o=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],a=function(u,f,v,c){if(f.commandBuffer.length!==0){var g=f.customRenderNodes,p=f.defaultRenderNodes,T=g.Submitter||p.Submitter,C=f.lighting,M=v,A=M.camera;A.addToRenderList(f);for(var R=S(f,A,c,!v.useCanvas).calc,P=l.loadIdentity(),L=f.commandBuffer,F=f.alpha,w=Math.max(f.pathDetailThreshold,u.config.pathDetailThreshold,0),O=1,B=0,I=0,D=0,N=.01,z=Math.PI*2,V,U=[],G=0,b=!0,Y=null,W=x.getTintAppendFloatAlpha,H=0;H<L.length;H++)switch(V=L[H],V){case m.BEGIN_PATH:{U.length=0,Y=null,b=!0;break}case m.CLOSE_PATH:{b=!1,Y&&Y.points.length&&Y.points.push(Y.points[0]);break}case m.FILL_PATH:{for(R.multiply(P,i),G=0;G<U.length;G++)(g.FillPath||p.FillPath).run(M,i,T,U[G].points,s.TL,s.TR,s.BL,w,C);break}case m.STROKE_PATH:{for(R.multiply(P,i),G=0;G<U.length;G++)(g.StrokePath||p.StrokePath).run(M,T,U[G].points,O,b,i,r.TL,r.TR,r.BL,r.BR,w,C);break}case m.LINE_STYLE:{O=L[++H];var X=L[++H],K=L[++H]*F,Z=W(X,K);r.TL=Z,r.TR=Z,r.BL=Z,r.BR=Z;break}case m.FILL_STYLE:{var Q=L[++H],j=L[++H]*F,J=W(Q,j);s.TL=J,s.TR=J,s.BL=J,s.BR=J;break}case m.GRADIENT_FILL_STYLE:{var tt=L[++H]*F,k=L[++H]*F,q=L[++H]*F,_=L[++H]*F;s.TL=W(L[++H],tt),s.TR=W(L[++H],k),s.BL=W(L[++H],q),s.BR=W(L[++H],_);break}case m.GRADIENT_LINE_STYLE:{O=L[++H];var rt=L[++H]*F;r.TL=W(L[++H],rt),r.TR=W(L[++H],rt),r.BL=W(L[++H],rt),r.BR=W(L[++H],rt);break}case m.ARC:{var at=0,ht=L[++H],ot=L[++H],nt=L[++H],it=L[++H],lt=L[++H],dt=L[++H],ct=L[++H];for(lt-=it,dt?lt<-z?lt=-z:lt>0&&(lt=-z+lt%z):lt>z?lt=z:lt<0&&(lt=z+lt%z),Y===null&&(Y=new t(ht+Math.cos(it)*nt,ot+Math.sin(it)*nt,O),U.push(Y),at+=N);at<1+ct;)D=lt*at+it,B=ht+Math.cos(D)*nt,I=ot+Math.sin(D)*nt,Y.addPoint(B,I,O),at+=N;D=lt+it,B=ht+Math.cos(D)*nt,I=ot+Math.sin(D)*nt,Y.addPoint(B,I,O);break}case m.FILL_RECT:{R.multiply(P,i),(g.FillRect||p.FillRect).run(M,i,T,L[++H],L[++H],L[++H],L[++H],s.TL,s.TR,s.BL,s.BR,C);break}case m.FILL_TRIANGLE:{R.multiply(P,i),(g.FillTri||p.FillTri).run(M,i,T,L[++H],L[++H],L[++H],L[++H],L[++H],L[++H],s.TL,s.TR,s.BL,C);break}case m.STROKE_TRIANGLE:{R.multiply(P,i),o[0].x=L[++H],o[0].y=L[++H],o[0].width=O,o[1].x=L[++H],o[1].y=L[++H],o[1].width=O,o[2].x=L[++H],o[2].y=L[++H],o[2].width=O,o[3].x=o[0].x,o[3].y=o[0].y,o[3].width=O,(g.StrokePath||p.StrokePath).run(M,T,o,O,!1,i,r.TL,r.TR,r.BL,r.BR,C);break}case m.LINE_TO:{ht=L[++H],ot=L[++H],Y!==null?Y.addPoint(ht,ot,O):(Y=new t(ht,ot,O),U.push(Y));break}case m.MOVE_TO:{Y=new t(L[++H],L[++H],O),U.push(Y);break}case m.SAVE:{e.push(P.copyToArray());break}case m.RESTORE:{P.copyFromArray(e.pop());break}case m.TRANSLATE:{ht=L[++H],ot=L[++H],P.translate(ht,ot);break}case m.SCALE:{ht=L[++H],ot=L[++H],P.scale(ht,ot);break}case m.ROTATE:{P.rotate(L[++H]);break}}}};E.exports=a},26479:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61061),S=n(83419),x=n(51708),h=n(50792),d=n(46710),t=n(95540),e=n(35154),l=n(97022),i=n(41212),s=n(88492),r=n(68287),o=new S({Extends:h,initialize:function(u,f,v){h.call(this),v?f&&!Array.isArray(f)&&(f=[f]):Array.isArray(f)?i(f[0])&&(v=f,f=null):i(f)&&(v=f,f=null),this.scene=u,this.children=new Set,this.isParent=!0,this.type="Group",this.classType=t(v,"classType",r),this.name=t(v,"name",""),this.active=t(v,"active",!0),this.maxSize=t(v,"maxSize",-1),this.defaultKey=t(v,"defaultKey",null),this.defaultFrame=t(v,"defaultFrame",null),this.runChildUpdate=t(v,"runChildUpdate",!1),this.createCallback=t(v,"createCallback",null),this.removeCallback=t(v,"removeCallback",null),this.createMultipleCallback=t(v,"createMultipleCallback",null),this.internalCreateCallback=t(v,"internalCreateCallback",null),this.internalRemoveCallback=t(v,"internalRemoveCallback",null),f&&this.addMultiple(f),v&&this.createMultiple(v),this.on(x.ADDED_TO_SCENE,this.addedToScene,this),this.on(x.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(a,u,f,v,c,g){if(a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=this.defaultKey),v===void 0&&(v=this.defaultFrame),c===void 0&&(c=!0),g===void 0&&(g=!0),this.isFull())return null;var p=new this.classType(this.scene,a,u,f,v);return p.addToDisplayList(this.scene.sys.displayList),p.addToUpdateList(),p.visible=c,p.setActive(g),this.add(p),p},createMultiple:function(a){if(this.isFull())return[];Array.isArray(a)||(a=[a]);var u=[];if(a[0].key)for(var f=0;f<a.length;f++){var v=this.createFromConfig(a[f]);u=u.concat(v)}return u},createFromConfig:function(a){if(this.isFull())return[];this.classType=t(a,"classType",this.classType);var u=t(a,"key",void 0),f=t(a,"frame",null),v=t(a,"visible",!0),c=t(a,"active",!0),g=[];if(u===void 0)return g;Array.isArray(u)||(u=[u]),Array.isArray(f)||(f=[f]);var p=t(a,"repeat",0),T=t(a,"randomKey",!1),C=t(a,"randomFrame",!1),M=t(a,"yoyo",!1),A=t(a,"quantity",!1),R=t(a,"frameQuantity",1),P=t(a,"max",0),L=s(u,f,{max:P,qty:A||R,random:T,randomB:C,repeat:p,yoyo:M});a.createCallback&&(this.createCallback=a.createCallback),a.removeCallback&&(this.removeCallback=a.removeCallback),a.internalCreateCallback&&(this.internalCreateCallback=a.internalCreateCallback),a.internalRemoveCallback&&(this.internalRemoveCallback=a.internalRemoveCallback);for(var F=0;F<L.length;F++){var w=this.create(0,0,L[F].a,L[F].b,v,c);if(!w)break;g.push(w)}if(l(a,"setXY")){var O=e(a,"setXY.x",0),B=e(a,"setXY.y",0),I=e(a,"setXY.stepX",0),D=e(a,"setXY.stepY",0);m.SetXY(g,O,B,I,D)}if(l(a,"setRotation")){var N=e(a,"setRotation.value",0),z=e(a,"setRotation.step",0);m.SetRotation(g,N,z)}if(l(a,"setScale")){var V=e(a,"setScale.x",1),U=e(a,"setScale.y",V),G=e(a,"setScale.stepX",0),b=e(a,"setScale.stepY",0);m.SetScale(g,V,U,G,b)}if(l(a,"setOrigin")){var Y=e(a,"setOrigin.x",.5),W=e(a,"setOrigin.y",Y),H=e(a,"setOrigin.stepX",0),X=e(a,"setOrigin.stepY",0);m.SetOrigin(g,Y,W,H,X)}if(l(a,"setAlpha")){var K=e(a,"setAlpha.value",1),Z=e(a,"setAlpha.step",0);m.SetAlpha(g,K,Z)}if(l(a,"setDepth")){var Q=e(a,"setDepth.value",0),j=e(a,"setDepth.step",0);m.SetDepth(g,Q,j)}if(l(a,"setScrollFactor")){var J=e(a,"setScrollFactor.x",1),tt=e(a,"setScrollFactor.y",J),k=e(a,"setScrollFactor.stepX",0),q=e(a,"setScrollFactor.stepY",0);m.SetScrollFactor(g,J,tt,k,q)}var _=t(a,"hitArea",null),rt=t(a,"hitAreaCallback",null);_&&m.SetHitArea(g,_,rt);var at=t(a,"gridAlign",!1);return at&&m.GridAlign(g,at),this.createMultipleCallback&&this.createMultipleCallback.call(this,g),g},preUpdate:function(a,u){!this.runChildUpdate||this.children.size===0||this.children.forEach(function(f){f.active&&f.update(a,u)})},add:function(a,u){return u===void 0&&(u=!1),this.isFull()?this:(this.children.add(a),this.internalCreateCallback&&this.internalCreateCallback.call(this,a),this.createCallback&&this.createCallback.call(this,a),u&&(a.addToDisplayList(this.scene.sys.displayList),a.addToUpdateList()),a.on(x.DESTROY,this.remove,this),this)},addMultiple:function(a,u){if(u===void 0&&(u=!1),Array.isArray(a))for(var f=0;f<a.length;f++)this.add(a[f],u);return this},remove:function(a,u,f){return u===void 0&&(u=!1),f===void 0&&(f=!1),this.children.has(a)?(this.children.delete(a),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,a),this.removeCallback&&this.removeCallback.call(this,a),a.off(x.DESTROY,this.remove,this),f?a.destroy():u&&(a.removeFromDisplayList(),a.removeFromUpdateList()),this):this},clear:function(a,u){a===void 0&&(a=!1),u===void 0&&(u=!1);var f=this.children;return f.forEach(function(v){v.off(x.DESTROY,this.remove,this),u?v.destroy():a&&(v.removeFromDisplayList(),v.removeFromUpdateList())},this),f.clear(),this},contains:function(a){return this.children.has(a)},getChildren:function(){return Array.from(this.children)},getLength:function(){return this.children.size},getMatching:function(a,u,f,v){return d(Array.from(this.children),a,u,f,v)},getFirst:function(a,u,f,v,c,g,p){return this.getHandler(!0,1,a,u,f,v,c,g,p)},getFirstNth:function(a,u,f,v,c,g,p,T){return this.getHandler(!0,a,u,f,v,c,g,p,T)},getLast:function(a,u,f,v,c,g,p){return this.getHandler(!1,1,a,u,f,v,c,g,p)},getLastNth:function(a,u,f,v,c,g,p,T){return this.getHandler(!1,a,u,f,v,c,g,p,T)},getHandler:function(a,u,f,v,c,g,p,T,C){f===void 0&&(f=!1),v===void 0&&(v=!1);var M,A,R=0,P=Array.from(this.children);if(a)for(A=0;A<P.length;A++)if(M=P[A],M.active===f){if(R++,R===u)break}else M=null;else for(A=P.length-1;A>=0;A--)if(M=P[A],M.active===f){if(R++,R===u)break}else M=null;return M?(typeof c=="number"&&(M.x=c),typeof g=="number"&&(M.y=g),M):v?this.create(c,g,p,T,C):null},get:function(a,u,f,v,c){return this.getFirst(!1,!0,a,u,f,v,c)},getFirstAlive:function(a,u,f,v,c,g){return this.getFirst(!0,a,u,f,v,c,g)},getFirstDead:function(a,u,f,v,c,g){return this.getFirst(!1,a,u,f,v,c,g)},playAnimation:function(a,u){return m.PlayAnimation(Array.from(this.children),a,u),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(a){a===void 0&&(a=!0);var u=0;return this.children.forEach(function(f){f.active===a&&u++}),u},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var a=this.getTotalUsed(),u=this.maxSize===-1?999999999999:this.maxSize;return u-a},setActive:function(a){return this.active=a,this},setName:function(a){return this.name=a,this},propertyValueSet:function(a,u,f,v,c){return m.PropertyValueSet(Array.from(this.children),a,u,f,v,c),this},propertyValueInc:function(a,u,f,v,c){return m.PropertyValueInc(Array.from(this.children),a,u,f,v,c),this},setX:function(a,u){return m.SetX(Array.from(this.children),a,u),this},setY:function(a,u){return m.SetY(Array.from(this.children),a,u),this},setXY:function(a,u,f,v){return m.SetXY(Array.from(this.children),a,u,f,v),this},incX:function(a,u){return m.IncX(Array.from(this.children),a,u),this},incY:function(a,u){return m.IncY(Array.from(this.children),a,u),this},incXY:function(a,u,f,v){return m.IncXY(Array.from(this.children),a,u,f,v),this},shiftPosition:function(a,u,f){return m.ShiftPosition(Array.from(this.children),a,u,f),this},angle:function(a,u){return m.Angle(Array.from(this.children),a,u),this},rotate:function(a,u){return m.Rotate(Array.from(this.children),a,u),this},rotateAround:function(a,u){return m.RotateAround(Array.from(this.children),a,u),this},rotateAroundDistance:function(a,u,f){return m.RotateAroundDistance(Array.from(this.children),a,u,f),this},setAlpha:function(a,u){return m.SetAlpha(Array.from(this.children),a,u),this},setTint:function(a,u,f,v){return m.SetTint(Array.from(this.children),a,u,f,v),this},setOrigin:function(a,u,f,v){return m.SetOrigin(Array.from(this.children),a,u,f,v),this},scaleX:function(a,u){return m.ScaleX(Array.from(this.children),a,u),this},scaleY:function(a,u){return m.ScaleY(Array.from(this.children),a,u),this},scaleXY:function(a,u,f,v){return m.ScaleXY(Array.from(this.children),a,u,f,v),this},setDepth:function(a,u){return m.SetDepth(Array.from(this.children),a,u),this},setBlendMode:function(a){return m.SetBlendMode(Array.from(this.children),a),this},setHitArea:function(a,u){return m.SetHitArea(Array.from(this.children),a,u),this},shuffle:function(){return m.Shuffle(Array.from(this.children)),this},kill:function(a){this.children.has(a)&&a.setActive(!1)},killAndHide:function(a){this.children.has(a)&&(a.setActive(!1),a.setVisible(!1))},setVisible:function(a,u,f){return m.SetVisible(Array.from(this.children),a,u,f),this},toggleVisible:function(){return m.ToggleVisible(Array.from(this.children)),this},destroy:function(a,u){a===void 0&&(a=!1),u===void 0&&(u=!1),!(!this.scene||this.ignoreDestroy)&&(this.emit(x.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(u,a),this.scene=void 0,this.children=void 0)}});E.exports=o},94975:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(44603),S=n(26479);m.register("group",function(x){return new S(this.scene,null,x)})},3385:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26479),S=n(39429);S.register("group",function(x,h){return this.updateList.add(new m(this.scene,x,h))})},88571:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40939),S=n(83419),x=n(31401),h=n(95643),d=n(59819),t=new S({Extends:h,Mixins:[x.Alpha,x.BlendMode,x.Depth,x.Flip,x.GetBounds,x.Lighting,x.Mask,x.Origin,x.RenderNodes,x.ScrollFactor,x.Size,x.TextureCrop,x.Tint,x.Transform,x.Visible,d],initialize:function(l,i,s,r,o){h.call(this,l,"Image"),this._crop=this.resetCropObject(),this.setTexture(r,o),this.setPosition(i,s),this.setSizeToFrame(),this.setOriginFromFrame(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return m}}});E.exports=t},40652:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S.addToRenderList(m),n.batchSprite(m,m.frame,S,x)};E.exports=y},82459:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(88571);S.register("image",function(d,t){d===void 0&&(d={});var e=x(d,"key",null),l=x(d,"frame",null),i=new h(this.scene,0,0,e,l);return t!==void 0&&(d.add=t),m(this.scene,i,d),i})},2117:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(88571),S=n(39429);S.register("image",function(x,h,d,t){return this.displayList.add(new m(this.scene,x,h,d,t))})},59819:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(99517),x=n(40652),E.exports={renderWebGL:S,renderCanvas:x}},99517:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S.camera.addToRenderList(m);var h=m.customRenderNodes,d=m.defaultRenderNodes;(h.Submitter||d.Submitter).run(S,m,x,0,h.Texturer||d.Texturer,h.Transformer||d.Transformer)};E.exports=y},77856:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={Events:n(51708),DisplayList:n(8050),GameObjectCreator:n(44603),GameObjectFactory:n(39429),UpdateList:n(45027),Components:n(31401),GetCalcMatrix:n(91296),BuildGameObject:n(25305),BuildGameObjectAnimation:n(13059),GameObject:n(95643),BitmapText:n(22186),Blitter:n(6107),Bob:n(46590),Container:n(31559),DOMElement:n(3069),DynamicBitmapText:n(2638),Extern:n(42421),Graphics:n(43831),Group:n(26479),Image:n(88571),Layer:n(93595),Particles:n(18404),PathFollower:n(1159),RenderTexture:n(591),RetroFont:n(196),Rope:n(77757),Sprite:n(68287),Stamp:n(14727),Text:n(50171),GetTextSize:n(14220),MeasureText:n(79557),TextStyle:n(35762),TileSprite:n(20839),Zone:n(41481),Video:n(18471),Shape:n(17803),Arc:n(23629),Curve:n(89),Ellipse:n(19921),Grid:n(30479),IsoBox:n(61475),IsoTriangle:n(16933),Line:n(57847),Polygon:n(24949),Rectangle:n(74561),Star:n(55911),Triangle:n(36931),Factories:{Blitter:n(12709),Container:n(24961),DOMElement:n(2611),DynamicBitmapText:n(72566),Extern:n(56315),Graphics:n(1201),Group:n(3385),Image:n(2117),Layer:n(20005),Particles:n(676),PathFollower:n(90145),RenderTexture:n(60505),Rope:n(96819),Sprite:n(46409),Stamp:n(85326),StaticBitmapText:n(34914),Text:n(68005),TileSprite:n(91681),Zone:n(84175),Video:n(89025),Arc:n(42563),Curve:n(40511),Ellipse:n(1543),Grid:n(34137),IsoBox:n(3933),IsoTriangle:n(49803),Line:n(2481),Polygon:n(64827),Rectangle:n(87959),Star:n(93697),Triangle:n(45245)},Creators:{Blitter:n(9403),Container:n(77143),DynamicBitmapText:n(11164),Graphics:n(87079),Group:n(94975),Image:n(82459),Layer:n(25179),Particles:n(92730),RenderTexture:n(34495),Rope:n(26209),Sprite:n(15567),Stamp:n(31479),StaticBitmapText:n(57336),Text:n(71259),TileSprite:n(14167),Zone:n(95261),Video:n(11511)}};m.CaptureFrame=n(43451),m.Shader=n(20071),m.NineSlice=n(28103),m.PointLight=n(80321),m.SpriteGPULayer=n(76573),m.Factories.CaptureFrame=n(20421),m.Factories.Shader=n(74177),m.Factories.NineSlice=n(47521),m.Factories.PointLight=n(71255),m.Factories.SpriteGPULayer=n(96019),m.Creators.CaptureFrame=n(23675),m.Creators.Shader=n(54935),m.Creators.NineSlice=n(28279),m.Creators.PointLight=n(39829),m.Creators.SpriteGPULayer=n(16193),m.Light=n(41432),m.LightsManager=n(61356),m.LightsPlugin=n(88992),E.exports=m},93595:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10312),S=n(83419),x=n(31401),h=n(53774),d=n(45893),t=n(50792),e=n(51708),l=n(73162),i=n(33963),s=n(44594),r=n(19186),o=new S({Extends:l,Mixins:[x.AlphaSingle,x.BlendMode,x.Depth,x.Filters,x.Mask,x.RenderSteps,x.Visible,t,i],initialize:function(u,f){l.call(this,u),t.call(this),this.scene=u,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=u.sys,this.events=u.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.clearAlpha(),this.setBlendMode(m.SKIP_CHECK),f&&this.add(f),this.addRenderStep&&this.addRenderStep(this.renderWebGL),u.sys.queueDepthSort()},setActive:function(a){return this.active=a,this},setName:function(a){return this.name=a,this},setState:function(a){return this.state=a,this},setDataEnabled:function(){return this.data||(this.data=new d(this)),this},setData:function(a,u){return this.data||(this.data=new d(this)),this.data.set(a,u),this},incData:function(a,u){return this.data||(this.data=new d(this)),this.data.inc(a,u),this},toggleData:function(a){return this.data||(this.data=new d(this)),this.data.toggle(a),this},getData:function(a){return this.data||(this.data=new d(this)),this.data.get(a)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return h(this)},willRender:function(a){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&a.id)},getIndexList:function(){for(var a=this,u=this.parentContainer,f=[];u&&(f.unshift(u.getIndex(a)),a=u,u.parentContainer);)u=u.parentContainer;return f.unshift(this.displayList.getIndex(a)),f},addChildCallback:function(a){var u=a.displayList;u&&u!==this&&a.removeFromDisplayList(),a.displayList||(this.queueDepthSort(),a.displayList=this,a.emit(e.ADDED_TO_SCENE,a,this.scene),this.events.emit(s.ADDED_TO_SCENE,a,this.scene))},removeChildCallback:function(a){this.queueDepthSort(),a.displayList=null,a.emit(e.REMOVED_FROM_SCENE,a,this.scene),this.events.emit(s.REMOVED_FROM_SCENE,a,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(r(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(a,u){return a._depth-u._depth},getChildren:function(){return this.list},addToDisplayList:function(a){return a===void 0&&(a=this.scene.sys.displayList),this.displayList&&this.displayList!==a&&this.removeFromDisplayList(),a.exists(this)||(this.displayList=a,a.add(this,!0),a.queueDepthSort(),this.emit(e.ADDED_TO_SCENE,this,this.scene),a.events.emit(s.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var a=this.displayList||this.scene.sys.displayList;return a.exists(this)&&(a.remove(this,!0),a.queueDepthSort(),this.displayList=null,this.emit(e.REMOVED_FROM_SCENE,this,this.scene),a.events.emit(s.REMOVED_FROM_SCENE,this,this.scene)),this},getDisplayList:function(){var a=null;return this.parentContainer?a=this.parentContainer.list:this.displayList&&(a=this.displayList.list),a},destroy:function(a){if(!(!this.scene||this.ignoreDestroy)){this.emit(e.DESTROY,this);for(var u=this.list;u.length;)u[0].destroy(a);this.removeAllListeners(),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.filterCamera&&(this.filterCamera.destroy(),this.filterCamera=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}}});E.exports=o},2956:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=m.list;if(x.length!==0){m.depthSort();var h=m.blendMode!==-1;h||n.setBlendMode(0);var d=m._alpha;m.mask&&m.mask.preRenderCanvas(n,null,S);for(var t=0;t<x.length;t++){var e=x[t];if(e.willRender(S)){var l=e.alpha;!h&&e.blendMode!==n.currentBlendMode&&n.setBlendMode(e.blendMode),e.setAlpha(l*d),e.renderCanvas(n,e,S),e.setAlpha(l)}}m.mask&&m.mask.postRenderCanvas(n)}};E.exports=y},25179:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(93595),x=n(44603),h=n(23568);x.register("layer",function(d,t){d===void 0&&(d={});var e=h(d,"children",null),l=new S(this.scene,e);return t!==void 0&&(d.add=t),m(this.scene,l,d),l})},20005:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(93595),S=n(39429);S.register("layer",function(x){return this.displayList.add(new m(this.scene,x))})},33963:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(15869),x=n(2956),E.exports={renderWebGL:S,renderCanvas:x}},15869:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8054),S=function(x,h,d,t,e,l,i){var s=h.list,r=s.length;if(r!==0){var o=d,a=o.camera;h.depthSort();var u=h.blendMode!==m.BlendModes.SKIP_CHECK;!u&&o.blendMode!==0&&(o=o.getClone(),o.setBlendMode(0),o.use());for(var f=h.alpha,v=0;v<r;v++){var c=s[v];if(c.willRender(a)){var g,p,T,C;if(c.alphaTopLeft!==void 0)g=c.alphaTopLeft,p=c.alphaTopRight,T=c.alphaBottomLeft,C=c.alphaBottomRight;else{var M=c.alpha;g=M,p=M,T=M,C=M}!u&&c.blendMode!==o.blendMode&&c.blendMode!==m.BlendModes.SKIP_CHECK&&(o=o.getClone(),o.setBlendMode(c.blendMode),o.use()),c.setAlpha(g*f,p*f,T*f,C*f),c.renderWebGLStep(x,c,o,void 0,void 0,s,v),c.setAlpha(g,p,T,C)}}o!==d&&o.release()}};E.exports=S},41432:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(96503),S=n(83419),x=n(31401),h=n(51767),d=n(70554),t=new S({Extends:m,Mixins:[x.Origin,x.ScrollFactor,x.Visible],initialize:function(l,i,s,r,o,a,u,f){m.call(this,l,i,s),this.color=new h(r,o,a),this.intensity=u,this.z=f===void 0?s*.1:f,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(s)},displayWidth:{get:function(){return this.diameter},set:function(e){this.diameter=e}},displayHeight:{get:function(){return this.diameter},set:function(e){this.diameter=e}},width:{get:function(){return this.diameter},set:function(e){this.diameter=e}},height:{get:function(){return this.diameter},set:function(e){this.diameter=e}},zNormal:{get:function(){return this.z/this.radius},set:function(e){this.z=e*this.radius}},willRender:function(e){return!(t.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&e.id)},setColor:function(e){var l=d.getFloatsFromUintRGB(e);return this.color.set(l[0],l[1],l[2]),this},setIntensity:function(e){return this.intensity=e,this},setRadius:function(e){return this.radius=e,this},setZ:function(e){return this.z=e,this},setZNormal:function(e){return this.z=e*this.radius,this}});t.RENDER_MASK=15,E.exports=t},61356:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(81491),S=n(83419),x=n(20339),h=n(41432),d=n(80321),t=n(51767),e=n(19133),l=n(19186),i=n(70554),s=new S({initialize:function(){this.lights=[],this.ambientColor=new t(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(r,o,a,u,f,v){return this.systems.displayList.add(new d(this.scene,r,o,a,u,f,v))},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(r){for(var o=this.lights,a=r.worldView,u=[],f=0;f<o.length;f++){var v=o[f];v.willRender(r)&&m(v,a)&&u.push({light:v,distance:x(v.x,v.y,a.centerX,a.centerY)})}return u.length>this.maxLights&&(l(u,this.sortByDistance),u=u.slice(0,this.maxLights)),this.visibleLights=u.length,u},sortByDistance:function(r,o){return r.distance>=o.distance},setAmbientColor:function(r){var o=i.getFloatsFromUintRGB(r);return this.ambientColor.set(o[0],o[1],o[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(r,o,a,u,f,v){r===void 0&&(r=0),o===void 0&&(o=0),a===void 0&&(a=128),u===void 0&&(u=16777215),f===void 0&&(f=1),v===void 0&&(v=a*.1);var c=i.getFloatsFromUintRGB(u),g=new h(r,o,a,c[0],c[1],c[2],f,v);return this.lights.push(g),g},removeLight:function(r){var o=this.lights.indexOf(r);return o>=0&&e(this.lights,o),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});E.exports=s},88992:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(61356),x=n(37277),h=n(44594),d=new m({Extends:S,initialize:function(e){this.scene=e,this.systems=e.sys,e.sys.settings.isBooted||e.sys.events.once(h.BOOT,this.boot,this),S.call(this)},boot:function(){var t=this.systems.events;t.on(h.SHUTDOWN,this.shutdown,this),t.on(h.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});x.register("LightsPlugin",d,"lights"),E.exports=d},28103:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(30529),S=n(83419),x=n(31401),h=n(95643),d=n(78023),t=n(82513),e=new S({Extends:h,Mixins:[x.AlphaSingle,x.BlendMode,x.Depth,x.GetBounds,x.Mask,x.Origin,x.RenderNodes,x.ScrollFactor,x.Texture,x.Transform,x.Visible,d],initialize:function(i,s,r,o,a,u,f,v,c,g,p){h.call(this,i,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var T=i.textures.getFrame(o,a);this.is3Slice=!g&&!p,T&&T.scale9&&(this.is3Slice=T.is3Slice);for(var C=this.is3Slice?18:54,M=0;M<C;M++)this.vertices.push(new t);this.setPosition(s,r),this.setTexture(o,a),this.setSlices(u,f,v,c,g,p,!1),this.updateDisplayOrigin(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return m}},setSlices:function(l,i,s,r,o,a,u){s===void 0&&(s=10),r===void 0&&(r=10),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=!1);var f=this.frame,v=!1;if(this.is3Slice&&u&&o!==0&&a!==0&&(v=!0),v)console.warn("Cannot change 9 slice to 3 slice");else{if(f&&f.scale9&&!u){var c=f.data.scale9Borders,g=c.x,p=c.y;s=g,r=f.width-c.w-g,o=p,a=f.height-c.h-p,l===void 0&&(l=f.width),i===void 0&&(i=f.height)}else l===void 0&&(l=256),i===void 0&&(i=256);this._width=l,this._height=i,this.leftWidth=s,this.rightWidth=r,this.topHeight=o,this.bottomHeight=a,this.is3Slice&&(i=f.height,this._height=i,this.topHeight=i,this.bottomHeight=0),this.updateVertices(),this.updateUVs()}return this},updateUVs:function(){var l=this.leftWidth,i=this.rightWidth,s=this.topHeight,r=this.bottomHeight,o=this.frame.width,a=this.frame.height;this.updateQuadUVs(0,0,0,l/o,s/a),this.updateQuadUVs(6,l/o,0,1-i/o,s/a),this.updateQuadUVs(12,1-i/o,0,1,s/a),this.is3Slice||(this.updateQuadUVs(18,0,s/a,l/o,1-r/a),this.updateQuadUVs(24,l/o,s/a,1-i/o,1-r/a),this.updateQuadUVs(30,1-i/o,s/a,1,1-r/a),this.updateQuadUVs(36,0,1-r/a,l/o,1),this.updateQuadUVs(42,l/o,1-r/a,1-i/o,1),this.updateQuadUVs(48,1-i/o,1-r/a,1,1))},updateVertices:function(){var l=this.leftWidth,i=this.rightWidth,s=this.topHeight,r=this.bottomHeight,o=this.width,a=this.height;this.updateQuad(0,-.5,.5,-.5+l/o,.5-s/a),this.updateQuad(6,-.5+l/o,.5,.5-i/o,.5-s/a),this.updateQuad(12,.5-i/o,.5,.5,.5-s/a),this.is3Slice||(this.updateQuad(18,-.5,.5-s/a,-.5+l/o,-.5+r/a),this.updateQuad(24,-.5+l/o,.5-s/a,.5-i/o,-.5+r/a),this.updateQuad(30,.5-i/o,.5-s/a,.5,-.5+r/a),this.updateQuad(36,-.5,-.5+r/a,-.5+l/o,-.5),this.updateQuad(42,-.5+l/o,-.5+r/a,.5-i/o,-.5),this.updateQuad(48,.5-i/o,-.5+r/a,.5,-.5))},updateQuad:function(l,i,s,r,o){var a=this.width,u=this.height,f=this.originX,v=this.originY,c=this.vertices;c[l+0].resize(i,s,a,u,f,v),c[l+1].resize(i,o,a,u,f,v),c[l+2].resize(r,s,a,u,f,v),c[l+3].resize(i,o,a,u,f,v),c[l+4].resize(r,o,a,u,f,v),c[l+5].resize(r,s,a,u,f,v)},updateQuadUVs:function(l,i,s,r,o){var a=this.vertices,u=this.frame,f=u.u0,v=u.v0,c=u.u1,g=u.v1;if(f!==0||c!==1){var p=c-f;i=f+i*p,r=f+r*p}if(v!==0||g!==1){var T=g-v;s=v+s*T,o=v+o*T}a[l+0].setUVs(i,s),a[l+1].setUVs(i,o),a[l+2].setUVs(r,s),a[l+3].setUVs(i,o),a[l+4].setUVs(r,o),a[l+5].setUVs(r,s)},clearTint:function(){return this.setTint(16777215),this},setTint:function(l){return l===void 0&&(l=16777215),this.tint=l,this.tintFill=!1,this},setTintFill:function(l){return this.setTint(l),this.tintFill=!0,this},isTinted:{get:function(){return this.tint!==16777215}},width:{get:function(){return this._width},set:function(l){this._width=Math.max(l,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(l){this.is3Slice||(this._height=Math.max(l,this.topHeight+this.bottomHeight),this.updateVertices())}},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,i){this.width=l,this.height=i,this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=this.width,s.hitArea.height=this.height),this},setDisplaySize:function(l,i){return this.displayWidth=l,this.displayHeight=i,this},originX:{get:function(){return this._originX},set:function(l){this._originX=l,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(l){this._originY=l,this.updateVertices()}},setOrigin:function(l,i){return l===void 0&&(l=.5),i===void 0&&(i=l),this._originX=l,this._originY=i,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var l=this.frame.height;this._height=l,this.topHeight=l,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}});E.exports=e},28279:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(35154),d=n(28103);S.register("nineslice",function(t,e){t===void 0&&(t={});var l=x(t,"key",null),i=x(t,"frame",null),s=h(t,"width",256),r=h(t,"height",256),o=h(t,"leftWidth",10),a=h(t,"rightWidth",10),u=h(t,"topHeight",0),f=h(t,"bottomHeight",0),v=new d(this.scene,0,0,l,i,s,r,o,a,u,f);return e!==void 0&&(t.add=e),m(this.scene,v,t),v})},47521:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(28103),S=n(39429);S.register("nineslice",function(x,h,d,t,e,l,i,s,r,o){return this.displayList.add(new m(this.scene,x,h,d,t,e,l,i,s,r,o))})},78023:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(52230),E.exports={renderWebGL:S,renderCanvas:x}},82513:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(26099),x=new m({Extends:S,initialize:function(d,t,e,l){S.call(this,d,t),this.vx=0,this.vy=0,this.u=e,this.v=l},setUVs:function(h,d){return this.u=h,this.v=d,this},resize:function(h,d,t,e,l,i){return this.x=h,this.y=d,this.vx=this.x*t,this.vy=-this.y*e,l<.5?this.vx+=t*(.5-l):l>.5&&(this.vx-=t*(l-.5)),i<.5?this.vy+=e*(.5-i):i>.5&&(this.vy-=e*(i-.5)),this}});E.exports=x},52230:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=n(70554),x={multiTexturing:!0},h=function(d,t,e,l){var i=t.vertices,s=i.length;if(s!==0){var r=e.camera;r.addToRenderList(t);for(var o=t.alpha,a=t.customRenderNodes.BatchHandler||t.defaultRenderNodes.BatchHandler,u=m(t,r,l,!e.useCanvas).calc,f=S.getTintAppendFloatAlpha(t.tint,o),v=t.frame.source.glTexture,c=t.tintFill,g,p,T,C=0;C<s;C+=6)p=i[C+1],T=i[C+2],g=u.setQuad(p.vx,p.vy,T.vx,T.vy),a.batch(e,v,g[0],g[1],g[2],g[3],g[6],g[7],g[4],g[5],p.u,p.v,T.u-p.u,T.v-p.v,c,f,f,f,f,x)}};E.exports=h},76472:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(44777),x=n(37589),h=n(6113),d=n(91389),t=n(90664),e=new m({Extends:S,initialize:function(i){S.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 l=this.propertyValue,i=l,s=this.defaultEmit,r=this.defaultUpdate;if(this.method===9){this.start=l[0],this.ease=h("Linear"),this.interpolation=d("linear"),s=this.easedValueEmit,r=this.easeValueUpdate,i=l[0],this.active=!0,this.r.length=0,this.g.length=0,this.b.length=0;for(var o=0;o<l.length;o++){var a=t(l[o]);this.r.push(a.r),this.g.push(a.g),this.b.push(a.b)}}return this.onEmit=s,this.onUpdate=r,this.current=i,this},setEase:function(l){this.easeName=l,this.ease=h(l)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(l,i,s){var r=this.ease(s),o=this.interpolation(this.r,r),a=this.interpolation(this.g,r),u=this.interpolation(this.b,r),f=x(o,a,u);return this.current=f,f}});E.exports=e},44777:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(30976),S=n(45319),x=n(83419),h=n(99472),d=n(6113),t=n(95540),e=n(91389),l=n(77720),i=n(15994),s=new x({initialize:function(o,a,u){u===void 0&&(u=!1),this.propertyKey=o,this.propertyValue=a,this.defaultValue=a,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=u,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(r,o){r===void 0&&(r={}),o&&(this.propertyKey=o),this.propertyValue=t(r,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(r){var o;switch(this.method){case 1:case 3:case 8:o=r;break;case 2:this.propertyValue.indexOf(r)>=0&&(o=r);break;case 4:var a=(this.end-this.start)/this.steps;o=l(r,a),this.counter=o;break;case 5:case 6:case 7:o=S(r,this.start,this.end);break;case 9:o=this.start[0];break}return this.current=o,this},getMethod:function(){var r=this.propertyValue;if(r===null)return 0;var o=typeof r;if(o==="number")return 1;if(Array.isArray(r))return 2;if(o==="function")return 3;if(o==="object"){if(this.hasBoth(r,"start","end"))return this.has(r,"steps")?4:5;if(this.hasBoth(r,"min","max"))return 6;if(this.has(r,"random"))return 7;if(this.hasEither(r,"onEmit","onUpdate"))return 8;if(this.hasEither(r,"values","interpolation"))return 9}return 0},setMethods:function(){var r=this.propertyValue,o=r,a=this.defaultEmit,u=this.defaultUpdate;switch(this.method){case 1:a=this.staticValueEmit;break;case 2:a=this.randomStaticValueEmit,o=r[0];break;case 3:this._onEmit=r,a=this.proxyEmit,o=this.defaultValue;break;case 4:this.start=r.start,this.end=r.end,this.steps=r.steps,this.counter=this.start,this.yoyo=this.has(r,"yoyo")?r.yoyo:!1,this.direction=0,a=this.steppedEmit,o=this.start;break;case 5:this.start=r.start,this.end=r.end;var f=this.has(r,"ease")?r.ease:"Linear";this.ease=d(f,r.easeParams),a=this.has(r,"random")&&r.random?this.randomRangedValueEmit:this.easedValueEmit,u=this.easeValueUpdate,o=this.start;break;case 6:this.start=r.min,this.end=r.max,a=this.has(r,"int")&&r.int?this.randomRangedIntEmit:this.randomRangedValueEmit,o=this.start;break;case 7:var v=r.random;Array.isArray(v)&&(this.start=v[0],this.end=v[1]),a=this.randomRangedIntEmit,o=this.start;break;case 8:this._onEmit=this.has(r,"onEmit")?r.onEmit:this.defaultEmit,this._onUpdate=this.has(r,"onUpdate")?r.onUpdate:this.defaultUpdate,a=this.proxyEmit,u=this.proxyUpdate,o=this.defaultValue;break;case 9:this.start=r.values;var c=this.has(r,"ease")?r.ease:"Linear";this.ease=d(c,r.easeParams),this.interpolation=e(r.interpolation),a=this.easedValueEmit,u=this.easeValueUpdate,o=this.start[0];break}return this.onEmit=a,this.onUpdate=u,this.current=o,this},has:function(r,o){return r.hasOwnProperty(o)},hasBoth:function(r,o,a){return r.hasOwnProperty(o)&&r.hasOwnProperty(a)},hasEither:function(r,o,a){return r.hasOwnProperty(o)||r.hasOwnProperty(a)},defaultEmit:function(){return this.defaultValue},defaultUpdate:function(r,o,a,u){return u},proxyEmit:function(r,o,a){var u=this._onEmit(r,o,a);return this.current=u,u},proxyUpdate:function(r,o,a,u){var f=this._onUpdate(r,o,a,u);return this.current=f,f},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var r=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[r],this.current},randomRangedValueEmit:function(r,o){var a=h(this.start,this.end);return r&&r.data[o]&&(r.data[o].min=a,r.data[o].max=this.end),this.current=a,a},randomRangedIntEmit:function(r,o){var a=m(this.start,this.end);return r&&r.data[o]&&(r.data[o].min=a,r.data[o].max=this.end),this.current=a,a},steppedEmit:function(){var r=this.counter,o=r,a=(this.end-this.start)/this.steps;if(this.yoyo){var u;this.direction===0?(o+=a,o>=this.end&&(u=o-this.end,o=this.end-u,this.direction=1)):(o-=a,o<=this.start&&(u=this.start-o,o=this.start+u,this.direction=0)),this.counter=o}else this.counter=i(o+a,this.start,this.end);return this.current=r,r},easedValueEmit:function(r,o){if(r&&r.data[o]){var a=r.data[o];a.min=this.start,a.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(r,o,a){var u=r.data[o],f,v=this.ease(a);return this.interpolation?f=this.interpolation(this.start,v):f=(u.max-u.min)*v+u.min,this.current=f,f},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});E.exports=s},24502:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(95540),x=n(20286),h=new m({Extends:x,initialize:function(t,e,l,i,s){if(typeof t=="object"){var r=t;t=S(r,"x",0),e=S(r,"y",0),l=S(r,"power",0),i=S(r,"epsilon",100),s=S(r,"gravity",50)}else t===void 0&&(t=0),e===void 0&&(e=0),l===void 0&&(l=0),i===void 0&&(i=100),s===void 0&&(s=50);x.call(this,t,e,!0),this._gravity=s,this._power=l*s,this._epsilon=i*i},update:function(d,t){var e=this.x-d.x,l=this.y-d.y,i=e*e+l*l;if(i!==0){var s=Math.sqrt(i);i<this._epsilon&&(i=this._epsilon);var r=this._power*t/(i*s)*100;d.velocityX+=e*r,d.velocityY+=l*r}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(d){this._epsilon=d*d}},power:{get:function(){return this._power/this._gravity},set:function(d){this._power=d*this._gravity}},gravity:{get:function(){return this._gravity},set:function(d){var t=this.power;this._gravity=d,this.power=t}}});E.exports=h},56480:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(9674),S=n(45319),x=n(83419),h=n(39506),d=n(87841),t=n(11520),e=n(26099),l=new x({initialize:function(s){this.emitter=s,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new e,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=s.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new m(this)),this.bounds=new d},emit:function(i,s,r,o,a,u){return this.emitter.emit(i,s,r,o,a,u)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(i,s){i===void 0&&(i=0),s===void 0&&(s=0),this.x=i,this.y=s},fire:function(i,s){var r=this.emitter,o=r.ops,a=r.getAnim();if(a?this.anims.play(a):(this.frame=r.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(r.getEmitZone(this),i===void 0?this.x+=o.x.onEmit(this,"x"):o.x.steps>0?this.x+=i+o.x.onEmit(this,"x"):this.x+=i,s===void 0?this.y+=o.y.onEmit(this,"y"):o.y.steps>0?this.y+=s+o.y.onEmit(this,"y"):this.y+=s,this.life=o.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=o.delay.onEmit(this,"delay"),this.holdCurrent=o.hold.onEmit(this,"hold"),this.scaleX=o.scaleX.onEmit(this,"scaleX"),this.scaleY=o.scaleY.active?o.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=o.rotate.onEmit(this,"rotate"),this.rotation=h(this.angle),r.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&r.getDeathZone(this))return this.lifeCurrent=0,!1;var u=o.speedX.onEmit(this,"speedX"),f=o.speedY.active?o.speedY.onEmit(this,"speedY"):u;if(r.radial){var v=h(o.angle.onEmit(this,"angle"));this.velocityX=Math.cos(v)*Math.abs(u),this.velocityY=Math.sin(v)*Math.abs(f)}else if(r.moveTo){var c=o.moveToX.onEmit(this,"moveToX"),g=o.moveToY.onEmit(this,"moveToY"),p=this.life/1e3;this.velocityX=(c-this.x)/p,this.velocityY=(g-this.y)/p}else this.velocityX=u,this.velocityY=f;return r.acceleration&&(this.accelerationX=o.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=o.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=o.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=o.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=o.bounce.onEmit(this,"bounce"),this.alpha=o.alpha.onEmit(this,"alpha"),o.color.active?this.tint=o.color.onEmit(this,"tint"):this.tint=o.tint.onEmit(this,"tint"),!0},update:function(i,s,r){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 o=this.emitter,a=o.ops,u=1-this.lifeCurrent/this.life;if(this.lifeT=u,this.x=a.x.onUpdate(this,"x",u,this.x),this.y=a.y.onUpdate(this,"y",u,this.y),o.moveTo){var f=a.moveToX.onUpdate(this,"moveToX",u,o.moveToX),v=a.moveToY.onUpdate(this,"moveToY",u,o.moveToY),c=this.lifeCurrent/1e3;this.velocityX=(f-this.x)/c,this.velocityY=(v-this.y)/c}return this.computeVelocity(o,i,s,r,u),this.scaleX=a.scaleX.onUpdate(this,"scaleX",u,this.scaleX),a.scaleY.active?this.scaleY=a.scaleY.onUpdate(this,"scaleY",u,this.scaleY):this.scaleY=this.scaleX,this.angle=a.rotate.onUpdate(this,"rotate",u,this.angle),this.rotation=h(this.angle),o.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=S(a.alpha.onUpdate(this,"alpha",u,this.alpha),0,1),a.color.active?this.tint=a.color.onUpdate(this,"color",u,this.tint):this.tint=a.tint.onUpdate(this,"tint",u,this.tint),this.lifeCurrent-=i,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(i,s,r,o,a){var u=i.ops,f=this.velocityX,v=this.velocityY,c=u.accelerationX.onUpdate(this,"accelerationX",a,this.accelerationX),g=u.accelerationY.onUpdate(this,"accelerationY",a,this.accelerationY),p=u.maxVelocityX.onUpdate(this,"maxVelocityX",a,this.maxVelocityX),T=u.maxVelocityY.onUpdate(this,"maxVelocityY",a,this.maxVelocityY);this.bounce=u.bounce.onUpdate(this,"bounce",a,this.bounce),f+=i.gravityX*r+c*r,v+=i.gravityY*r+g*r,f=S(f,-p,p),v=S(v,-T,T),this.velocityX=f,this.velocityY=v,this.x+=f*r,this.y+=v*r,i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var C=0;C<o.length;C++){var M=o[C];M.active&&M.update(this,s,r,a)}},setSizeToFrame:function(){},getBounds:function(i){i===void 0&&(i=this.emitter.getWorldTransformMatrix());var s=Math.abs(i.scaleX)*this.scaleX,r=Math.abs(i.scaleY)*this.scaleY,o=this.x,a=this.y,u=this.rotation,f=this.frame.width*s/2,v=this.frame.height*r/2,c=this.bounds,g=new e(o-f,a-v),p=new e(o+f,a-v),T=new e(o-f,a+v),C=new e(o+f,a+v);return u!==0&&(t(g,o,a,u),t(p,o,a,u),t(T,o,a,u),t(C,o,a,u)),i.transformPoint(g.x,g.y,g),i.transformPoint(p.x,p.y,p),i.transformPoint(T.x,T.y,T),i.transformPoint(C.x,C.y,C),c.x=Math.min(g.x,p.x,T.x,C.x),c.y=Math.min(g.y,p.y,T.y,C.y),c.width=Math.max(g.x,p.x,T.x,C.x)-c.x,c.height=Math.max(g.y,p.y,T.y,C.y)-c.y,c},destroy:function(){this.anims&&this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});E.exports=l},69601:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(20286),x=n(87841),h=new m({Extends:S,initialize:function(t,e,l,i,s,r,o,a){s===void 0&&(s=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=!0),S.call(this,t,e,!0),this.bounds=new x(t,e,l,i),this.collideLeft=s,this.collideRight=r,this.collideTop=o,this.collideBottom=a},update:function(d){var t=this.bounds,e=-d.bounce,l=d.worldPosition;l.x<t.x&&this.collideLeft?(d.x+=t.x-l.x,d.velocityX*=e):l.x>t.right&&this.collideRight&&(d.x-=l.x-t.right,d.velocityX*=e),l.y<t.y&&this.collideTop?(d.y+=t.y-l.y,d.velocityY*=e):l.y>t.bottom&&this.collideBottom&&(d.y-=l.y-t.bottom,d.velocityY*=e)}});E.exports=h},31600:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(68668),S=n(83419),x=n(31401),h=n(53774),d=n(43459),t=n(26388),e=n(19909),l=n(76472),i=n(44777),s=n(20696),r=n(95643),o=n(95540),a=n(26546),u=n(24502),f=n(69036),v=n(1985),c=n(97022),g=n(86091),p=n(73162),T=n(20074),C=n(269),M=n(56480),A=n(69601),R=n(68875),P=n(87841),L=n(59996),F=n(72905),w=n(90668),O=n(19186),B=n(61340),I=n(26099),D=n(15994),N=["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"],z=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],V=new S({Extends:r,Mixins:[x.AlphaSingle,x.BlendMode,x.Depth,x.Lighting,x.Mask,x.RenderNodes,x.ScrollFactor,x.Texture,x.Transform,x.Visible,w],initialize:function(G,b,Y,W,H){r.call(this,G,"ParticleEmitter"),this.particleClass=M,this.config=null,this.ops={accelerationX:new i("accelerationX",0),accelerationY:new i("accelerationY",0),alpha:new i("alpha",1),angle:new i("angle",{min:0,max:360},!0),bounce:new i("bounce",0),color:new l("color"),delay:new i("delay",0,!0),hold:new i("hold",0,!0),lifespan:new i("lifespan",1e3,!0),maxVelocityX:new i("maxVelocityX",1e4),maxVelocityY:new i("maxVelocityY",1e4),moveToX:new i("moveToX",0),moveToY:new i("moveToY",0),quantity:new i("quantity",1,!0),rotate:new i("rotate",0),scaleX:new i("scaleX",1),scaleY:new i("scaleY",1),speedX:new i("speedX",0,!0),speedY:new i("speedY",0,!0),tint:new i("tint",16777215),x:new i("x",0),y:new i("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 I,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 B,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new p(this),this.tintFill=!1,this.initRenderNodes(this._defaultRenderNodesMap),this.setPosition(b,Y),this.setTexture(W),H&&this.setConfig(H)},_defaultRenderNodesMap:{get:function(){return m}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(U){if(!U)return this;this.config=U;var G=0,b="",Y=this.ops;for(G=0;G<z.length;G++)b=z[G],Y[b].loadConfig(U);for(G=0;G<N.length;G++)b=N[G],c(U,b)&&(this[b]=o(U,b));if(this.acceleration=this.accelerationX!==0||this.accelerationY!==0,this.moveTo=f(U,["moveToX","moveToY"]),c(U,"speed")&&(Y.speedX.loadConfig(U,"speed"),Y.speedY.active=!1),(v(U,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),c(U,"scale")&&(Y.scaleX.loadConfig(U,"scale"),Y.scaleY.active=!1),c(U,"callbackScope")){var W=o(U,"callbackScope",null);this.emitCallbackScope=W,this.deathCallbackScope=W}if(c(U,"emitZone")&&this.addEmitZone(U.emitZone),c(U,"deathZone")&&this.addDeathZone(U.deathZone),c(U,"bounds")){var H=this.addParticleBounds(U.bounds);H.collideLeft=o(U,"collideLeft",!0),H.collideRight=o(U,"collideRight",!0),H.collideTop=o(U,"collideTop",!0),H.collideBottom=o(U,"collideBottom",!0)}return c(U,"followOffset")&&this.followOffset.setFromObject(o(U,"followOffset",0)),c(U,"texture")&&this.setTexture(U.texture),c(U,"frame")?this.setEmitterFrame(U.frame):c(U,"anim")&&this.setAnim(U.anim),c(U,"reserve")&&this.reserve(U.reserve),c(U,"advance")&&this.fastForward(U.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit(s.START,this),this},updateConfig:function(U){return U&&(this.config?this.setConfig(C(this.config,U)):this.setConfig(U)),this},toJSON:function(){var U=h(this),G=0,b="";for(G=0;G<N.length;G++)b=N[G],U[b]=this[b];var Y=this.ops;for(G=0;G<z.length;G++)b=z[G],Y[b]&&(U[b]=Y[b].toJSON());return Y.speedY.active||(delete U.speedX,U.speed=Y.speedX.toJSON()),this.scaleX===this.scaleY&&(delete U.scaleX,delete U.scaleY,U.scale=Y.scaleX.toJSON()),U},resetCounters:function(U,G){var b=this.counters;b.fill(0),b[0]=U,G&&(b[5]=1)},startFollow:function(U,G,b,Y){return G===void 0&&(G=0),b===void 0&&(b=0),Y===void 0&&(Y=!1),this.follow=U,this.followOffset.set(G,b),this.trackVisible=Y,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var U=this.frames,G=U.length,b;return G===1?b=U[0]:this.randomFrame?b=a(U):(b=U[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===G&&(this.currentFrame=0))),this.texture.get(b)},setEmitterFrame:function(U,G,b){G===void 0&&(G=!0),b===void 0&&(b=1),this.randomFrame=G,this.frameQuantity=b,this.currentFrame=0;var Y=typeof U;if(this.frames.length=0,Array.isArray(U))this.frames=this.frames.concat(U);else if(Y==="string"||Y==="number")this.frames.push(U);else if(Y==="object"){var W=U;U=o(W,"frames",null),U&&(this.frames=this.frames.concat(U));var H=o(W,"cycle",!1);this.randomFrame=!H,this.frameQuantity=o(W,"quantity",b)}return this.frames.length===1&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var U=this.anims,G=U.length;if(G===0)return null;if(G===1)return U[0];if(this.randomAnim)return a(U);var b=U[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=D(this.currentAnim+1,0,G)),b},setAnim:function(U,G,b){G===void 0&&(G=!0),b===void 0&&(b=1),this.randomAnim=G,this.animQuantity=b,this.currentAnim=0;var Y=typeof U;if(this.anims.length=0,Array.isArray(U))this.anims=this.anims.concat(U);else if(Y==="string")this.anims.push(U);else if(Y==="object"){var W=U;U=o(W,"anims",null),U&&(this.anims=this.anims.concat(U));var H=o(W,"cycle",!1);this.randomAnim=!H,this.animQuantity=o(W,"quantity",b)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(U){return U===void 0&&(U=!0),this.radial=U,this},addParticleBounds:function(U,G,b,Y,W,H,X,K){if(typeof U=="object"){var Z=U;U=Z.x,G=Z.y,b=c(Z,"w")?Z.w:Z.width,Y=c(Z,"h")?Z.h:Z.height}return this.addParticleProcessor(new A(U,G,b,Y,W,H,X,K))},setParticleSpeed:function(U,G){return G===void 0&&(G=U),this.ops.speedX.onChange(U),U===G?this.ops.speedY.active=!1:this.ops.speedY.onChange(G),this.radial=!0,this},setParticleScale:function(U,G){return U===void 0&&(U=1),G===void 0&&(G=U),this.ops.scaleX.onChange(U),this.ops.scaleY.onChange(G),this},setParticleGravity:function(U,G){return this.gravityX=U,this.gravityY=G,this},setParticleAlpha:function(U){return this.ops.alpha.onChange(U),this},setParticleTint:function(U){return this.ops.tint.onChange(U),this},setEmitterAngle:function(U){return this.ops.angle.onChange(U),this},setParticleLifespan:function(U){return this.ops.lifespan.onChange(U),this},setQuantity:function(U){return this.quantity=U,this},setFrequency:function(U,G){return this.frequency=U,this.flowCounter=U>0?U:0,G&&(this.quantity=G),this},addDeathZone:function(U){Array.isArray(U)||(U=[U]);for(var G,b=[],Y=0;Y<U.length;Y++)if(G=U[Y],G instanceof t)b.push(G);else if(typeof G.contains=="function")G=new t(G,!0),b.push(G);else{var W=o(G,"type","onEnter"),H=o(G,"source",null);if(H&&typeof H.contains=="function"){var X=W==="onEnter";G=new t(H,X),b.push(G)}}return this.deathZones=this.deathZones.concat(b),b},removeDeathZone:function(U){return F(this.deathZones,U),this},clearDeathZones:function(){return this.deathZones.length=0,this},addEmitZone:function(U){Array.isArray(U)||(U=[U]);for(var G,b=[],Y=0;Y<U.length;Y++)if(G=U[Y],G instanceof R||G instanceof e)b.push(G);else{var W=o(G,"source",null);if(W){var H=o(G,"type","random");if(H==="random"&&typeof W.getRandomPoint=="function")G=new R(W),b.push(G);else if(H==="edge"&&typeof W.getPoints=="function"){var X=o(G,"quantity",1),K=o(G,"stepRate",0),Z=o(G,"yoyo",!1),Q=o(G,"seamless",!0),j=o(G,"total",-1);G=new e(W,X,K,Z,Q,j),b.push(G)}}}return this.emitZones=this.emitZones.concat(b),b},removeEmitZone:function(U){return F(this.emitZones,U),this.zoneIndex=0,this},clearEmitZones:function(){return this.emitZones.length=0,this.zoneIndex=0,this},getEmitZone:function(U){var G=this.emitZones,b=G.length;if(b!==0){var Y=G[this.zoneIndex];Y.getPoint(U),Y.total>-1&&(this.zoneTotal++,this.zoneTotal===Y.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===b&&(this.zoneIndex=0)))}},getDeathZone:function(U){for(var G=this.deathZones,b=0;b<G.length;b++){var Y=G[b];if(Y.willKill(U))return this.emit(s.DEATH_ZONE,this,U,Y),!0}return!1},setEmitZone:function(U){var G;return isFinite(U)?G=U:G=this.emitZones.indexOf(U),G>=0&&(this.zoneIndex=G),this},addParticleProcessor:function(U){return this.processors.exists(U)||(U.emitter&&U.emitter.removeParticleProcessor(U),this.processors.add(U),U.emitter=this),U},removeParticleProcessor:function(U){return this.processors.exists(U)&&(this.processors.remove(U,!0),U.emitter=null),U},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(U){return this.addParticleProcessor(new u(U))},reserve:function(U){var G=this.dead;if(this.maxParticles>0){var b=this.getParticleCount();b+U>this.maxParticles&&(U=this.maxParticles-(b+U))}for(var Y=0;Y<U;Y++)G.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(U,G){return U===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof U=="function"&&(this.emitCallback=U,G&&(this.emitCallbackScope=G)),this},onParticleDeath:function(U,G){return U===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof U=="function"&&(this.deathCallback=U,G&&(this.deathCallbackScope=G)),this},killAll:function(){for(var U=this.dead,G=this.alive;G.length>0;)U.push(G.pop());return this},forEachAlive:function(U,G){for(var b=this.alive,Y=b.length,W=0;W<Y;W++)U.call(G,b[W],this);return this},forEachDead:function(U,G){for(var b=this.dead,Y=b.length,W=0;W<Y;W++)U.call(G,b[W],this);return this},start:function(U,G){return U===void 0&&(U=0),this.emitting||(U>0&&this.fastForward(U),this.emitting=!0,this.resetCounters(this.frequency,!0),G!==void 0&&(this.duration=Math.abs(G)),this.emit(s.START,this)),this},stop:function(U){return U===void 0&&(U=!1),this.emitting&&(this.emitting=!1,U&&this.killAll(),this.emit(s.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(U,G){return U===void 0&&(U=""),G===void 0&&(G=this.true),this.sortProperty=U,this.sortOrderAsc=G,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(U){return this.sortProperty!==""?U=this.depthSortCallback:U=null,this.sortCallback=U,this},depthSort:function(){return O(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(U,G){var b=this.sortProperty;return this.sortOrderAsc?U[b]-G[b]:G[b]-U[b]},flow:function(U,G,b){return G===void 0&&(G=1),this.emitting=!1,this.frequency=U,this.quantity=G,b!==void 0&&(this.stopAfter=b),this.start()},explode:function(U,G,b){this.frequency=-1,this.resetCounters(-1,!0);var Y=this.emitParticle(U,G,b);return this.emit(s.EXPLODE,this,Y),Y},emitParticleAt:function(U,G,b){return this.emitParticle(b,U,G)},emitParticle:function(U,G,b){if(!this.atLimit()){U===void 0&&(U=this.ops.quantity.onEmit());for(var Y=this.dead,W=this.stopAfter,H=this.follow?this.follow.x+this.followOffset.x:G,X=this.follow?this.follow.y+this.followOffset.y:b,K=0;K<U;K++){var Z=Y.pop();if(Z||(Z=new this.particleClass(this)),Z.fire(H,X)?(this.particleBringToTop?this.alive.push(Z):this.alive.unshift(Z),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,Z,this)):this.dead.push(Z),W>0&&(this.stopCounter++,this.stopCounter>=W)||this.atLimit())break}return Z}},fastForward:function(U,G){G===void 0&&(G=1e3/60);var b=0;for(this.skipping=!0;b<Math.abs(U);)this.preUpdate(0,G),b+=G;return this.skipping=!1,this},preUpdate:function(U,G){G*=this.timeScale;var b=G/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var Y=this.getProcessors(),W=this.alive,H=this.dead,X=0,K=[],Z=W.length;for(X=0;X<Z;X++){var Q=W[X];Q.update(G,b,Y)&&K.push({index:X,particle:Q})}if(Z=K.length,Z>0){var j=this.deathCallback,J=this.deathCallbackScope;for(X=Z-1;X>=0;X--){var tt=K[X];W.splice(tt.index,1),H.push(tt.particle),j&&j.call(J,tt.particle),tt.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&W.length===0&&(this.completeFlag=0,this.emit(s.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=G;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=G,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(U){for(var G=this.getWorldTransformMatrix(),b=this.alive,Y=b.length,W=[],H=0;H<Y;H++){var X=b[H];L(U,X.getBounds(G))&&W.push(X)}return W},getBounds:function(U,G,b,Y){U===void 0&&(U=0),G===void 0&&(G=0),b===void 0&&(b=1e3/60),Y===void 0&&(Y=new P);var W=this.getWorldTransformMatrix(),H,X,K=this.alive,Z=!1;if(Y.setTo(0,0,0,0),G>0){var Q=0;for(this.skipping=!0;Q<Math.abs(G);){for(this.preUpdate(0,b),H=0;H<K.length;H++)X=K[H].getBounds(W),Z?T(Y,X):(Z=!0,d(X,Y));Q+=b}this.skipping=!1}else for(H=0;H<K.length;H++)X=K[H].getBounds(W),Z?T(Y,X):(Z=!0,d(X,Y));return U>0&&g(Y,U,U),Y},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(U){this.ops.x.onChange(U)}},particleY:{get:function(){return this.ops.y.current},set:function(U){this.ops.y.onChange(U)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(U){this.ops.accelerationX.onChange(U)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(U){this.ops.accelerationY.onChange(U)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(U){this.ops.maxVelocityX.onChange(U)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(U){this.ops.maxVelocityY.onChange(U)}},speed:{get:function(){return this.ops.speedX.current},set:function(U){this.ops.speedX.onChange(U),this.ops.speedY.onChange(U)}},speedX:{get:function(){return this.ops.speedX.current},set:function(U){this.ops.speedX.onChange(U)}},speedY:{get:function(){return this.ops.speedY.current},set:function(U){this.ops.speedY.onChange(U)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(U){this.ops.moveToX.onChange(U)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(U){this.ops.moveToY.onChange(U)}},bounce:{get:function(){return this.ops.bounce.current},set:function(U){this.ops.bounce.onChange(U)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(U){this.ops.scaleX.onChange(U)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(U){this.ops.scaleY.onChange(U)}},particleColor:{get:function(){return this.ops.color.current},set:function(U){this.ops.color.onChange(U)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(U){this.ops.color.setEase(U)}},particleTint:{get:function(){return this.ops.tint.current},set:function(U){this.ops.tint.onChange(U)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(U){this.ops.alpha.onChange(U)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(U){this.ops.lifespan.onChange(U)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(U){this.ops.angle.onChange(U)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(U){this.ops.rotate.onChange(U)}},quantity:{get:function(){return this.ops.quantity.current},set:function(U){this.ops.quantity.onChange(U)}},delay:{get:function(){return this.ops.delay.current},set:function(U){this.ops.delay.onChange(U)}},hold:{get:function(){return this.ops.hold.current},set:function(U){this.ops.hold.onChange(U)}},flowCounter:{get:function(){return this.counters[0]},set:function(U){this.counters[0]=U}},frameCounter:{get:function(){return this.counters[1]},set:function(U){this.counters[1]=U}},animCounter:{get:function(){return this.counters[2]},set:function(U){this.counters[2]=U}},elapsed:{get:function(){return this.counters[3]},set:function(U){this.counters[3]=U}},stopCounter:{get:function(){return this.counters[4]},set:function(U){this.counters[4]=U}},completeFlag:{get:function(){return this.counters[5]},set:function(U){this.counters[5]=U}},zoneIndex:{get:function(){return this.counters[6]},set:function(U){this.counters[6]=U}},zoneTotal:{get:function(){return this.counters[7]},set:function(U){this.counters[7]=U}},currentFrame:{get:function(){return this.counters[8]},set:function(U){this.counters[8]=U}},currentAnim:{get:function(){return this.counters[9]},set:function(U){this.counters[9]=U}},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 U,G=this.ops;for(U=0;U<z.length;U++){var b=z[U];G[b].destroy()}for(U=0;U<this.alive.length;U++)this.alive[U].destroy();for(U=0;U<this.dead.length;U++)this.dead[U].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}});E.exports=V},9871:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(59996),S=n(61340),x=new S,h=new S,d=new S,t=new S,e=function(l,i,s,r){s.addToRenderList(i),x.copyWithScrollFactorFrom(s.matrix,s.scrollX,s.scrollY,i.scrollFactorX,i.scrollFactorY),r&&x.multiply(r),t.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),x.multiply(t);var o=l.currentContext,a=s.roundPixels,u=s.alpha,f=i.alpha,v=i.alive,c=v.length,g=i.viewBounds;if(!(!i.visible||c===0||g&&!m(g,s.worldView))){i.sortCallback&&i.depthSort(),o.save(),o.globalCompositeOperation=l.blendModes[i.blendMode];for(var p=0;p<c;p++){var T=v[p],C=T.alpha*f*u;if(!(C<=0||T.scaleX===0||T.scaleY===0)){d.applyITRS(T.x,T.y,T.rotation,T.scaleX,T.scaleY),x.multiply(d,h);var M=T.frame,A=M.canvasData;if(A.width>0&&A.height>0){var R=-M.halfWidth,P=-M.halfHeight;o.globalAlpha=C,o.save(),h.setToContext(o),a&&(R=Math.round(R),P=Math.round(P)),o.imageSmoothingEnabled=!M.source.scaleMode,o.drawImage(M.source.image,A.x,A.y,A.width,A.height,R,P,A.width,A.height),o.restore()}}}o.restore()}};E.exports=e},92730:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(95540),d=n(31600);S.register("particles",function(t,e){t===void 0&&(t={});var l=x(t,"key",null),i=h(t,"config",null),s=new d(this.scene,0,0,l);return e!==void 0&&(t.add=e),m(this.scene,s,t),i&&s.setConfig(i),s})},676:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(31600);m.register("particles",function(x,h,d,t){return x!==void 0&&typeof x=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new S(this.scene,x,h,d,t))})},90668:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(21188),x=n(9871),E.exports={renderWebGL:S,renderCanvas:x}},21188:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(59996),S=n(61340),x=n(70554),h=new S,d=new S,t=new S,e=new S,l={},i={},s={quad:new Float32Array(8)},r=function(o,a,u,f){var v=u.camera;v.addToRenderList(a),h.copyWithScrollFactorFrom(v.getViewMatrix(!u.useCanvas),v.scrollX,v.scrollY,a.scrollFactorX,a.scrollFactorY),f&&h.multiply(f),e.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY),h.multiply(e);var c=x.getTintAppendFloatAlpha,g=a.alpha,p=a.alive,T=p.length,C=a.viewBounds;if(!(T===0||C&&!m(C,v.worldView))){a.sortCallback&&a.depthSort();for(var M=a.tintFill,A=0;A<T;A++){var R=p[A],P=R.alpha*g;if(!(P<=0||R.scaleX===0||R.scaleY===0)){t.applyITRS(R.x,R.y,R.rotation,R.scaleX,R.scaleY),h.multiply(t,d);var L=R.frame,F=-L.halfWidth,w=-L.halfHeight;d.setQuad(F,w,F+L.width,w+L.height,s.quad),l.frame!==L&&(l.frame=L,l.uvSource=L);var O=c(R.tint,P);i.tintTopLeft=O,i.tintBottomLeft=O,i.tintTopRight=O,i.tintBottomRight=O,i.tintFill=M;var B,I;if(a.lighting&&(R.texture&&(B=L.texture.dataSource[L.sourceIndex]),I=R.rotation,a.parentContainer)){var D=a.getWorldTransformMatrix(h,d).rotate(R.rotation);I=D.rotationNormalized}var N=a.customRenderNodes,z=a.defaultRenderNodes;(N.Submitter||z.Submitter).run(u,a,f,0,l,s,i,B,I)}}}};E.exports=r},20286:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t){h===void 0&&(h=0),d===void 0&&(d=0),t===void 0&&(t=!0),this.emitter,this.x=h,this.y=d,this.active=t},update:function(){},destroy:function(){this.emitter=null}});E.exports=S},9774:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="complete"},812:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="deathzone"},30522:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="explode"},96695:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="start"},18677:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="stop"},20696:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={COMPLETE:n(9774),DEATH_ZONE:n(812),EXPLODE:n(30522),START:n(96695),STOP:n(18677)}},18404:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={EmitterColorOp:n(76472),EmitterOp:n(44777),Events:n(20696),GravityWell:n(24502),Particle:n(56480),ParticleBounds:n(69601),ParticleEmitter:n(31600),ParticleProcessor:n(20286),Zones:n(21024)}},26388:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d){this.source=h,this.killOnEnter=d},willKill:function(x){var h=x.worldPosition,d=this.source.contains(h.x,h.y);return d&&this.killOnEnter||!d&&!this.killOnEnter}});E.exports=S},19909:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t,e,l,i){e===void 0&&(e=!1),l===void 0&&(l=!0),i===void 0&&(i=-1),this.source=h,this.points=[],this.quantity=d,this.stepRate=t,this.yoyo=e,this.counter=-1,this.seamless=l,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 x=this.points[0],h=this.points[this.points.length-1];x.x===h.x&&x.y===h.y&&this.points.pop()}var d=this._length;return this._length=this.points.length,this._length<d&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(x){return this.source=x,this.updateSource()},getPoint:function(x){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 h=this.points[this.counter];h&&(x.x=h.x,x.y=h.y)}});E.exports=S},68875:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(26099),x=new m({initialize:function(d){this.source=d,this._tempVec=new S,this.total=-1},getPoint:function(h){var d=this._tempVec;this.source.getRandomPoint(d),h.x=d.x,h.y=d.y}});E.exports=x},21024:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={DeathZone:n(26388),EdgeZone:n(19909),RandomZone:n(68875)}},1159:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(31401),x=n(68287),h=new m({Extends:x,Mixins:[S.PathFollower],initialize:function(t,e,l,i,s,r){x.call(this,t,l,i,s,r),this.path=e},preUpdate:function(d,t){this.anims.update(d,t),this.pathUpdate(d)}});E.exports=h},90145:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(1159);m.register("follower",function(x,h,d,t,e){var l=new S(this.scene,x,h,d,t,e);return this.displayList.add(l),this.updateList.add(l),l})},80321:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43246),S=n(83419),x=n(31401),h=n(95643),d=n(30100),t=n(67277),e=new S({Extends:h,Mixins:[x.AlphaSingle,x.BlendMode,x.Depth,x.Mask,x.RenderNodes,x.ScrollFactor,x.Transform,x.Visible,t],initialize:function(i,s,r,o,a,u,f){o===void 0&&(o=16777215),a===void 0&&(a=128),u===void 0&&(u=1),f===void 0&&(f=.1),h.call(this,i,"PointLight"),this.initRenderNodes(this._defaultRenderNodesMap),this.setPosition(s,r),this.color=d(o),this.intensity=u,this.attenuation=f,this.width=a*2,this.height=a*2,this._radius=a},_defaultRenderNodesMap:{get:function(){return m}},radius:{get:function(){return this._radius},set:function(l){this._radius=l,this.width=l*2,this.height=l*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});E.exports=e},39829:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(80321);S.register("pointlight",function(d,t){d===void 0&&(d={});var e=x(d,"color",16777215),l=x(d,"radius",128),i=x(d,"intensity",1),s=x(d,"attenuation",.1),r=new h(this.scene,0,0,e,l,i,s);return t!==void 0&&(d.add=t),m(this.scene,r,d),r})},71255:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(80321);m.register("pointlight",function(x,h,d,t,e,l){return this.displayList.add(new S(this.scene,x,h,d,t,e,l))})},67277:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(57787),E.exports={renderWebGL:S,renderCanvas:x}},57787:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=function(x,h,d,t){var e=d.camera;e.addToRenderList(h);var l=m(h,e,t,!d.useCanvas).calc,i=h.width,s=h.height,r=-h._radius,o=-h._radius,a=r+i,u=o+s,f=l.getX(0,0),v=l.getY(0,0),c=l.getX(r,o),g=l.getY(r,o),p=l.getX(r,u),T=l.getY(r,u),C=l.getX(a,u),M=l.getY(a,u),A=l.getX(a,o),R=l.getY(a,o);(h.customRenderNodes.BatchHandler||h.defaultRenderNodes.BatchHandler).batch(d,h,c,g,p,T,A,R,C,M,f,v)};E.exports=S},591:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(45650),x=n(88571),h=n(83999),d=n(58855),t=new m({Extends:x,Mixins:[h],initialize:function(l,i,s,r,o,a){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=32),o===void 0&&(o=32),a===void 0&&(a=!0);var u=l.sys.textures.addDynamicTexture(S(),r,o,a);x.call(this,l,i,s,u),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1,this.renderMode=d.RENDER,this.isCurrentlyRendering=!1},setSize:function(e,l){this.width=e,this.height=l,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=e,i.hitArea.height=l),this},resize:function(e,l,i){return this.texture.setSize(e,l,i),this.setSize(this.texture.width,this.texture.height),this},saveTexture:function(e){var l=this.texture;return l.key=e,l.manager.addDynamicTexture(l)&&(this._saved=!0),l},setRenderMode:function(e,l){return this.renderMode=e,l&&this.texture.preserve(!0),this},render:function(){return this.texture.render(),this},fill:function(e,l,i,s,r,o){return this.texture.fill(e,l,i,s,r,o),this},clear:function(e,l,i,s){return this.texture.clear(e,l,i,s),this},stamp:function(e,l,i,s,r){return this.texture.stamp(e,l,i,s,r),this},erase:function(e,l,i){return this.texture.erase(e,l,i),this},draw:function(e,l,i,s,r){return this.texture.draw(e,l,i,s,r),this},capture:function(e,l){return this.texture.capture(e,l),this},repeat:function(e,l,i,s,r,o,a){return this.texture.repeat(e,l,i,s,r,o,a),this},preserve:function(e){return this.texture.preserve(e),this},callback:function(e){return this.texture.callback(e),this},snapshotArea:function(e,l,i,s,r,o,a){return this.texture.snapshotArea(e,l,i,s,r,o,a),this},snapshot:function(e,l,i){return this.texture.snapshot(e,l,i)},snapshotPixel:function(e,l,i){return this.texture.snapshotPixel(e,l,i)},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});E.exports=t},97272:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40652),S=n(58855),x=function(h,d,t,e){var l=!0,i=!0;d.renderMode===S.REDRAW?i=!1:d.renderMode===S.RENDER&&(l=!1),l&&d.render(),i&&m(h,d,t,e)};E.exports=x},34495:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(591);S.register("renderTexture",function(d,t){d===void 0&&(d={});var e=x(d,"x",0),l=x(d,"y",0),i=x(d,"width",32),s=x(d,"height",32),r=new h(this.scene,e,l,i,s);return t!==void 0&&(d.add=t),m(this.scene,r,d),r})},60505:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(591);m.register("renderTexture",function(x,h,d,t){return this.displayList.add(new S(this.scene,x,h,d,t))})},83999:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(53937),x=n(97272),E.exports={renderWebGL:S,renderCanvas:x}},58855:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={RENDER:"render",REDRAW:"redraw",ALL:"all"}},53937:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(99517),S=n(58855),x=function(h,d,t,e){if(!d.isCurrentlyRendering){d.isCurrentlyRendering=!0;var l=!0,i=!0;d.renderMode===S.REDRAW?i=!1:d.renderMode===S.RENDER&&(l=!1),l&&d.render(),i&&m(h,d,t,e),d.isCurrentlyRendering=!1}};E.exports=x},77757:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(9674),S=n(85760),x=n(83419),h=n(31401),d=n(95643),t=n(38745),e=n(26099),l=new x({Extends:d,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Flip,h.Mask,h.RenderNodes,h.Size,h.Texture,h.Transform,h.Visible,h.ScrollFactor,t],initialize:function(s,r,o,a,u,f,v,c,g){a===void 0&&(a="__DEFAULT"),f===void 0&&(f=2),v===void 0&&(v=!0),d.call(this,s,"Rope"),this.anims=new m(this),this.points=f,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=a==="__DEFAULT",this.dirty=!1,this.horizontal=v,this._flipX=!1,this._flipY=!1,this._perp=new e,this.debugCallback=null,this.debugGraphic=null,this.setTexture(a,u),this.setPosition(r,o),this.setSizeToFrame(),this.initRenderNodes(this._defaultRenderNodesMap),Array.isArray(f)&&this.resizeArrays(f.length),this.setPoints(f,c,g),this.updateVertices()},_defaultRenderNodesMap:{get:function(){return S}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,s){var r=this.anims.currentFrame;this.anims.update(i,s),this.anims.currentFrame!==r&&(this.updateUVs(),this.updateVertices())},play:function(i,s,r){return this.anims.play(i,s,r),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(i,s,r){return i===void 0&&(i=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(i,s,r))},setVertical:function(i,s,r){return i===void 0&&(i=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(i,s,r)):this},setTintFill:function(i){return i===void 0&&(i=!1),this.tintFill=i,this},setAlphas:function(i,s){var r=this.points.length;if(r<1)return this;var o=this.alphas;i===void 0?i=[1]:!Array.isArray(i)&&s===void 0&&(i=[i]);var a,u=0;if(s!==void 0)for(a=0;a<r;a++)u=a*2,o[u]=i,o[u+1]=s;else if(i.length===r)for(a=0;a<r;a++)u=a*2,o[u]=i[a],o[u+1]=i[a];else{var f=i[0];for(a=0;a<r;a++)u=a*2,i.length>u&&(f=i[u]),o[u]=f,i.length>u+1&&(f=i[u+1]),o[u+1]=f}return this},setColors:function(i){var s=this.points.length;if(s<1)return this;var r=this.colors;i===void 0?i=[16777215]:Array.isArray(i)||(i=[i]);var o,a=0;if(i.length===s)for(o=0;o<s;o++)a=o*2,r[a]=i[o],r[a+1]=i[o];else{var u=i[0];for(o=0;o<s;o++)a=o*2,i.length>a&&(u=i[a]),r[a]=u,i.length>a+1&&(u=i[a+1]),r[a+1]=u}return this},setPoints:function(i,s,r){if(i===void 0&&(i=2),typeof i=="number"){var o=i;o<2&&(o=2),i=[];var a,u,f;if(this.horizontal)for(f=-this.frame.halfWidth,u=this.frame.width/(o-1),a=0;a<o;a++)i.push({x:f+a*u,y:0});else for(f=-this.frame.halfHeight,u=this.frame.height/(o-1),a=0;a<o;a++)i.push({x:0,y:f+a*u})}var v=i.length,c=this.points.length;return v<1?(console.warn("Rope: Not enough points given"),this):(v===1&&(i.unshift({x:0,y:0}),v++),c!==v&&this.resizeArrays(v),this.dirty=!0,this.points=i,this.updateUVs(),s!=null&&this.setColors(s),r!=null&&this.setAlphas(r),this)},updateUVs:function(){for(var i=this.uv,s=this.points.length,r=this.frame.u0,o=this.frame.v0,a=this.frame.u1,u=this.frame.v1,f=(a-r)/(s-1),v=(u-o)/(s-1),c=0;c<s;c++){var g=c*4,p,T,C,M;this.horizontal?(this._flipX?(p=a-c*f,C=a-c*f):(p=r+c*f,C=r+c*f),this._flipY?(T=u,M=o):(T=o,M=u)):(this._flipX?(p=r,C=a):(p=a,C=r),this._flipY?(T=u-c*v,M=u-c*v):(T=o+c*v,M=o+c*v)),i[g+0]=p,i[g+1]=T,i[g+2]=C,i[g+3]=M}return this},resizeArrays:function(i){var s=this.colors,r=this.alphas;this.vertices=new Float32Array(i*4),this.uv=new Float32Array(i*4),s=new Uint32Array(i*2),r=new Float32Array(i*2);for(var o=0;o<i*2;o++)s[o]=16777215,r[o]=1;return this.colors=s,this.alphas=r,this.dirty=!0,this},updateVertices:function(){var i=this._perp,s=this.points,r=this.vertices,o=s.length;if(this.dirty=!1,!(o<1)){for(var a,u=s[0],f=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,v=0;v<o;v++){var c=s[v],g=v*4;v<o-1?a=s[v+1]:a=c,i.x=a.y-u.y,i.y=-(a.x-u.x);var p=i.length();i.x/=p,i.y/=p,i.x*=f,i.y*=f,r[g]=c.x+i.x,r[g+1]=c.y+i.y,r[g+2]=c.x-i.x,r[g+3]=c.y-i.y,u=c}return this}},setDebug:function(i,s){return this.debugGraphic=i,!i&&!s?this.debugCallback=null:s?this.debugCallback=s:this.debugCallback=this.renderDebugVerts,this},renderDebugVerts:function(i,s,r){var o=i.debugGraphic,a=r[0],u=r[1],f=r[2],v=r[3];o.lineBetween(a,u,f,v);for(var c=4;c<s;c+=4){var g=r[c+0],p=r[c+1],T=r[c+2],C=r[c+3];o.lineBetween(a,u,g,p),o.lineBetween(f,v,T,C),o.lineBetween(f,v,g,p),o.lineBetween(g,p,T,C),a=g,u=p,f=T,v=C}},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()}}});E.exports=l},95262:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(){};E.exports=y},26209:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(35154),d=n(77757);S.register("rope",function(t,e){t===void 0&&(t={});var l=x(t,"key",null),i=x(t,"frame",null),s=x(t,"horizontal",!0),r=h(t,"points",void 0),o=h(t,"colors",void 0),a=h(t,"alphas",void 0),u=new d(this.scene,0,0,l,i,r,s,o,a);return e!==void 0&&(t.add=e),m(this.scene,u,t),u})},96819:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(77757),S=n(39429);S.register("rope",function(x,h,d,t,e,l,i,s){return this.displayList.add(new m(this.scene,x,h,d,t,e,l,i,s))})},38745:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(20439),x=n(95262),E.exports={renderWebGL:S,renderCanvas:x}},20439:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S={multiTexturing:!1,smoothPixelArt:!1},x=function(h,d,t,e){var l=t.camera;l.addToRenderList(d);var i=m(d,l,e,!t.useCanvas).calc;d.dirty&&d.updateVertices();var s,r=d.texture;r&&r.smoothPixelArt!==null?s=r.smoothPixelArt:s=d.scene.sys.game.config.smoothPixelArt,S.smoothPixelArt=s,(d.customRenderNodes.BatchHandler||d.defaultRenderNodes.BatchHandler).batchStrip(t,d,i,d.texture.source[0].glTexture,d.vertices,d.uv,d.colors,d.alphas,d.alpha,d.tintFill,S,d.debugCallback)};E.exports=x},20071:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(71911),S=n(26099),x=n(55403),h=n(87774),d=n(83419),t=n(95540),e=n(31401),l=n(95643),i=n(25479),s=new d({Extends:l,Mixins:[e.BlendMode,e.ComputedSize,e.Depth,e.GetBounds,e.Origin,e.ScrollFactor,e.Transform,e.Visible,i],initialize:function(o,a,u,f,v,c,g){a===void 0&&(a={}),typeof a=="string"&&(a={fragmentKey:a}),u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=128),c===void 0&&(c=128),l.call(this,o,"Shader");var p=o.sys.renderer;this.textures=[],this.renderNode=new x(p.renderNodes,a),this.setupUniforms=t(a,"setupUniforms",function(){}),a.updateShaderConfig&&(this.renderNode.updateShaderConfig=a.updateShaderConfig);var T=t(a,"initialUniforms",{});Object.entries(T).forEach(function(C){this.setUniform(C[0],C[1])},this),this.drawingContext=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.textureCoordinateTopLeft=new S(0,1),this.textureCoordinateTopRight=new S(1,1),this.textureCoordinateBottomLeft=new S(0,0),this.textureCoordinateBottomRight=new S(1,0),this.setTextures(g),this.setPosition(u,f),this.setSize(v,c),this.setOrigin(.5,.5)},getUniform:function(r){return this.renderNode.programManager.uniforms[r]},setUniform:function(r,o){return this.renderNode.programManager.setUniform(r,o),this},setTextures:function(r){r===void 0&&(r=[]),this.textures.length=0;for(var o=0;o<r.length;o++){var a=r[o];typeof a=="string"&&(a=this.scene.textures.get(a)),this.textures.push(a)}return this},setRenderToTexture:function(r){if(this.renderToTexture)return this;var o=this.width,a=this.height,u=this.scene.sys.renderer,f=this.scene,v=new m(0,0,o,a).setScene(f.game.scene.systemScene,!1);return this.drawingContext=new h(u,{width:o,height:a,camera:v}),this.glTexture=this.drawingContext.texture,r&&(this.texture=f.sys.textures.addGLTexture(r,this.glTexture)),this.renderToTexture=!0,this.renderWebGLStep(u,this,this.drawingContext),this},renderImmediate:function(){return this.renderWebGLStep(this.scene.renderer,this,this.drawingContext),this},setupUniforms:function(r,o){},setAlpha:function(){return this},setTextureCoordinates:function(r,o,a,u,f,v,c,g){return r===void 0&&(r=0),o===void 0&&(o=1),a===void 0&&(a=1),u===void 0&&(u=1),f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=1),g===void 0&&(g=0),this.textureCoordinateTopLeft.set(r,o),this.textureCoordinateTopRight.set(a,u),this.textureCoordinateBottomLeft.set(f,v),this.textureCoordinateBottomRight.set(c,g),this},setTextureCoordinatesFromFrame:function(r,o){typeof r=="string"&&(o?typeof o=="string"&&(o=this.scene.textures.get(o)):o=this.textures[0],r=o.get(r));var a=r.u0,u=r.v0,f=r.u1,v=r.v1;this.setTextureCoordinates(a,u,f,u,a,v,f,v)},preDestroy:function(){this.renderNode=null,this.textures.length=0,this.drawingContext&&(this.drawingContext.destroy(),this.texture&&this.texture.destroy(),this.drawingContext=null,this.glTexture=null,this.texture=null)}});E.exports=s},80464:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(){};E.exports=y},54935:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(20071);S.register("shader",function(d,t){d===void 0&&(d={});var e=x(d,"config",null),l=x(d,"x",0),i=x(d,"y",0),s=x(d,"width",128),r=x(d,"height",128),o=new h(this.scene,e,l,i,s,r);return t!==void 0&&(d.add=t),m(this.scene,o,d),o})},74177:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20071),S=n(39429);S.register("shader",function(x,h,d,t,e,l,i){return this.displayList.add(new m(this.scene,x,h,d,t,e,l,i))})},25479:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(19257),x=n(80464),E.exports={renderWebGL:S,renderCanvas:x}},19257:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=S.camera;if(h.addToRenderList(m),m.renderToTexture){if(S=m.drawingContext,S.width!==m.width||S.height!==m.height){var d=m.width,t=m.height;S.resize(d,t),S.camera.setSize(d,t)}S.use()}m.renderNode.run(S,m,x),m.renderToTexture&&S.release()};E.exports=y},10441:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70554),S=function(x,h,d,t,e,l,i){var s=m.getTintAppendFloatAlpha(t.fillColor,t.fillAlpha*e),r=t.pathData,o=t.pathIndexes,a=r.length,u,f,v,c,g,p=Array(a*2),T=Array(a),C=0,M=0;for(u=0;u<a;u+=2)f=r[u]-l,v=r[u+1]-i,c=d.getX(f,v),g=d.getY(f,v),p[C++]=c,p[C++]=g,T[M++]=s;h.batch(x,o,p,T)};E.exports=S},65960:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=S||m.fillColor,d=x||m.fillAlpha,t=(h&16711680)>>>16,e=(h&65280)>>>8,l=h&255;n.fillStyle="rgba("+t+","+e+","+l+","+d+")"};E.exports=y},75177:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=S||m.strokeColor,d=x||m.strokeAlpha,t=(h&16711680)>>>16,e=(h&65280)>>>8,l=h&255;n.strokeStyle="rgba("+t+","+e+","+l+","+d+")",n.lineWidth=m.lineWidth};E.exports=y},17803:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87891),S=n(83419),x=n(31401),h=n(95643),d=n(23031),t=new S({Extends:h,Mixins:[x.AlphaSingle,x.BlendMode,x.Depth,x.GetBounds,x.Lighting,x.Mask,x.Origin,x.RenderNodes,x.ScrollFactor,x.Transform,x.Visible],initialize:function(l,i,s){i===void 0&&(i="Shape"),h.call(this,l,i),this.geom=s,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 d,this.width=0,this.height=0,this.enableFilters&&(this.filtersFocusContext=!0),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return m}},setFillStyle:function(e,l){return l===void 0&&(l=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=l,this.isFilled=!0),this},setStrokeStyle:function(e,l,i){return i===void 0&&(i=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=l,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,l){return this.width=e,this.height=l,this},setDisplaySize:function(e,l){return this.displayWidth=e,this.displayHeight=l,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});E.exports=t},34682:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70554),S=function(x,h,d,t,e,l,i){var s=m.getTintAppendFloatAlpha(t.strokeColor,t.strokeAlpha*e),r=t.pathData,o=r.length-1,a=t.lineWidth,u=!t.closePath,f=t.customRenderNodes.StrokePath||t.defaultRenderNodes.StrokePath,v=[];u&&(o-=2);for(var c=0;c<o;c+=2){var g=r[c]-l,p=r[c+1]-i;c>0&&g===r[c-2]&&p===r[c-1]||v.push({x:g,y:p,width:a})}f.run(x,h,v,a,u,d,s,s,s,s)};E.exports=S},23629:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(13609),S=n(83419),x=n(39506),h=n(94811),d=n(96503),t=n(36383),e=n(17803),l=new S({Extends:e,Mixins:[m],initialize:function(s,r,o,a,u,f,v,c,g){r===void 0&&(r=0),o===void 0&&(o=0),a===void 0&&(a=128),u===void 0&&(u=0),f===void 0&&(f=360),v===void 0&&(v=!1),e.call(this,s,"Arc",new d(0,0,a)),this._startAngle=u,this._endAngle=f,this._anticlockwise=v,this._iterations=.01,this.setPosition(r,o);var p=this.geom.radius*2;this.setSize(p,p),c!==void 0&&this.setFillStyle(c,g),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 s=i*2;this.setSize(s,s),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,s){return this._startAngle=i,s!==void 0&&(this._anticlockwise=s),this.updateData()},setEndAngle:function(i,s){return this._endAngle=i,s!==void 0&&(this._anticlockwise=s),this.updateData()},updateData:function(){var i=this._iterations,s=i,r=this.geom.radius,o=x(this._startAngle),a=x(this._endAngle),u=this._anticlockwise,f=r,v=r;a-=o,u?a<-t.TAU?a=-t.TAU:a>0&&(a=-t.TAU+a%t.TAU):a>t.TAU?a=t.TAU:a<0&&(a=t.TAU+a%t.TAU);for(var c=[f+Math.cos(o)*r,v+Math.sin(o)*r],g;s<1;)g=a*s+o,c.push(f+Math.cos(g)*r,v+Math.sin(g)*r),s+=i;return g=a+o,c.push(f+Math.cos(g)*r,v+Math.sin(g)*r),c.push(f+Math.cos(o)*r,v+Math.sin(o)*r),this.pathIndexes=h(c),this.pathData=c,this}});E.exports=l},42542:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39506),S=n(65960),x=n(75177),h=n(20926),d=function(t,e,l,i){l.addToRenderList(e);var s=t.currentContext;if(h(t,s,e,l,i)){var r=e.radius;s.beginPath(),s.arc(r-e.originX*(r*2),r-e.originY*(r*2),r,m(e._startAngle),m(e._endAngle),e.anticlockwise),e.closePath&&s.closePath(),e.isFilled&&(S(s,e),s.fill()),e.isStroked&&(x(s,e),s.stroke()),s.restore()}};E.exports=d},42563:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(23629),S=n(39429);S.register("arc",function(x,h,d,t,e,l,i,s){return this.displayList.add(new m(this.scene,x,h,d,t,e,l,i,s))}),S.register("circle",function(x,h,d,t,e){return this.displayList.add(new m(this.scene,x,h,d,0,360,!1,t,e))})},13609:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(41447),x=n(42542),E.exports={renderWebGL:S,renderCanvas:x}},41447:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=n(10441),x=n(34682),h=function(d,t,e,l){var i=e.camera;i.addToRenderList(t);var s=m(t,i,l,!e.useCanvas).calc,r=t._displayOriginX,o=t._displayOriginY,a=t.alpha,u=t.customRenderNodes.Submitter||t.defaultRenderNodes.Submitter;t.isFilled&&S(e,u,s,t,a,r,o),t.isStroked&&x(e,u,s,t,a,r,o)};E.exports=h},89:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(33141),x=n(94811),h=n(87841),d=n(17803),t=new m({Extends:d,Mixins:[S],initialize:function(l,i,s,r,o,a){i===void 0&&(i=0),s===void 0&&(s=0),d.call(this,l,"Curve",r),this._smoothness=32,this._curveBounds=new h,this.closePath=!1,this.setPosition(i,s),o!==void 0&&this.setFillStyle(o,a),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(e){this._smoothness=e,this.updateData()}},setSmoothness:function(e){return this._smoothness=e,this.updateData()},updateData:function(){var e=this._curveBounds,l=this._smoothness;this.geom.getBounds(e,l),this.setSize(e.width,e.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(l),r=0;r<s.length;r++)i.push(s[r].x,s[r].y);return i.push(s[0].x,s[0].y),this.pathIndexes=x(i),this.pathData=i,this}});E.exports=t},3170:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(75177),x=n(20926),h=function(d,t,e,l){e.addToRenderList(t);var i=d.currentContext;if(x(d,i,t,e,l)){var s=t._displayOriginX+t._curveBounds.x,r=t._displayOriginY+t._curveBounds.y,o=t.pathData,a=o.length-1,u=o[0]-s,f=o[1]-r;i.beginPath(),i.moveTo(u,f),t.closePath||(a-=2);for(var v=2;v<a;v+=2){var c=o[v]-s,g=o[v+1]-r;i.lineTo(c,g)}t.closePath&&i.closePath(),t.isFilled&&(m(i,t),i.fill()),t.isStroked&&(S(i,t),i.stroke()),i.restore()}};E.exports=h},40511:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(89);m.register("curve",function(x,h,d,t,e){return this.displayList.add(new S(this.scene,x,h,d,t,e))})},33141:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(53987),x=n(3170),E.exports={renderWebGL:S,renderCanvas:x}},53987:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10441),S=n(91296),x=n(34682),h=function(d,t,e,l){var i=e.camera;i.addToRenderList(t);var s=S(t,i,l,!e.useCanvas).calc,r=t._displayOriginX+t._curveBounds.x,o=t._displayOriginY+t._curveBounds.y,a=t.alpha,u=t.customRenderNodes.Submitter||t.defaultRenderNodes.Submitter;t.isFilled&&m(e,u,s,t,a,r,o),t.isStroked&&x(e,u,s,t,a,r,o)};E.exports=h},19921:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(94811),x=n(54205),h=n(8497),d=n(17803),t=new m({Extends:d,Mixins:[x],initialize:function(l,i,s,r,o,a,u){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=128),o===void 0&&(o=128),d.call(this,l,"Ellipse",new h(r/2,o/2,r,o)),this._smoothness=64,this.setPosition(i,s),this.width=r,this.height=o,a!==void 0&&this.setFillStyle(a,u),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(e){this._smoothness=e,this.updateData()}},setSize:function(e,l){return this.width=e,this.height=l,this.geom.setPosition(e/2,l/2),this.geom.setSize(e,l),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(e){return this._smoothness=e,this.updateData()},updateData:function(){for(var e=[],l=this.geom.getPoints(this._smoothness),i=0;i<l.length;i++)e.push(l[i].x,l[i].y);return e.push(l[0].x,l[0].y),this.pathIndexes=S(e),this.pathData=e,this}});E.exports=t},7930:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(75177),x=n(20926),h=function(d,t,e,l){e.addToRenderList(t);var i=d.currentContext;if(x(d,i,t,e,l)){var s=t._displayOriginX,r=t._displayOriginY,o=t.pathData,a=o.length-1,u=o[0]-s,f=o[1]-r;i.beginPath(),i.moveTo(u,f),t.closePath||(a-=2);for(var v=2;v<a;v+=2){var c=o[v]-s,g=o[v+1]-r;i.lineTo(c,g)}i.closePath(),t.isFilled&&(m(i,t),i.fill()),t.isStroked&&(S(i,t),i.stroke()),i.restore()}};E.exports=h},1543:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19921),S=n(39429);S.register("ellipse",function(x,h,d,t,e,l){return this.displayList.add(new m(this.scene,x,h,d,t,e,l))})},54205:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(19467),x=n(7930),E.exports={renderWebGL:S,renderCanvas:x}},19467:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10441),S=n(91296),x=n(34682),h=function(d,t,e,l){var i=e.camera;i.addToRenderList(t);var s=S(t,i,l,!e.useCanvas).calc,r=t._displayOriginX,o=t._displayOriginY,a=t.alpha,u=t.customRenderNodes.Submitter||t.defaultRenderNodes.Submitter;t.isFilled&&m(e,u,s,t,a,r,o),t.isStroked&&x(e,u,s,t,a,r,o)};E.exports=h},30479:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(17803),x=n(26015),h=new m({Extends:S,Mixins:[x],initialize:function(t,e,l,i,s,r,o,a,u,f,v){e===void 0&&(e=0),l===void 0&&(l=0),i===void 0&&(i=128),s===void 0&&(s=128),r===void 0&&(r=32),o===void 0&&(o=32),S.call(this,t,"Grid",null),this.cellWidth=r,this.cellHeight=o,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.cellPadding=.5,this.strokeOutside=!1,this.strokeOutsideIncomplete=!0,this.setPosition(e,l),this.setSize(i,s),this.setFillStyle(a,u),f!==void 0&&this.setStrokeStyle(1,f,v),this.updateDisplayOrigin()},setAltFillStyle:function(d,t){return t===void 0&&(t=1),d===void 0?this.showAltCells=!1:(this.altFillColor=d,this.altFillAlpha=t,this.showAltCells=!0),this},setCellPadding:function(d){return this.cellPadding=d||0,this},setStrokeOutside:function(d,t){return this.strokeOutside=d,t!==void 0&&(this.strokeOutsideIncomplete=t),this}});E.exports=h},49912:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(75177),x=n(20926),h=function(d,t,e,l){e.addToRenderList(t);var i=d.currentContext;if(x(d,i,t,e,l)){var s=-t._displayOriginX,r=-t._displayOriginY,o=e.alpha*t.alpha,a=t.width,u=t.height,f=t.cellWidth,v=t.cellHeight,c=Math.ceil(a/f),g=Math.ceil(u/v),p=f,T=v,C=f-(c*f-a),M=v-(g*v-u),A=t.isFilled,R=t.showAltCells,P=t.isStroked,L=t.cellPadding,F=t.lineWidth,w=F/2,O=0,B=0,I=0,D=0,N=0;if(L&&(p-=L*2,T-=L*2,C-=L*2,M-=L*2),A&&t.fillAlpha>0)for(m(i,t),B=0;B<g;B++)for(R&&(I=B%2),O=0;O<c;O++){if(R&&I){I=0;continue}I++,D=O<c-1?p:C,N=B<g-1?T:M,D>0&&N>0&&i.fillRect(s+O*f+L,r+B*v+L,D,N)}if(R&&t.altFillAlpha>0)for(m(i,t,t.altFillColor,t.altFillAlpha*o),B=0;B<g;B++)for(R&&(I=B%2),O=0;O<c;O++){if(R&&!I){I=1;continue}I=0,D=O<c-1?p:C,N=B<g-1?T:M,D>0&&N>0&&i.fillRect(s+O*f+L,r+B*v+L,D,N)}if(P&&t.strokeAlpha>0){S(i,t,t.strokeColor,t.strokeAlpha*o);var z=t.strokeOutside?0:1;for(O=z;O<c;O++){var V=O*f;i.beginPath(),i.moveTo(V+s,r),i.lineTo(V+s,u+r),i.stroke()}for(B=z;B<g;B++){var U=B*v;i.beginPath(),i.moveTo(s,U+r),i.lineTo(s+a,U+r),i.stroke()}t.strokeOutside&&(a>w&&(i.beginPath(),i.moveTo(a+s,r),i.lineTo(a+s,u+r),i.stroke()),u>w&&(i.beginPath(),i.moveTo(s,u+r),i.lineTo(a+s,u+r),i.stroke()))}i.restore()}};E.exports=h},34137:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(30479);m.register("grid",function(x,h,d,t,e,l,i,s,r,o){return this.displayList.add(new S(this.scene,x,h,d,t,e,l,i,s,r,o))})},26015:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(46161),x=n(49912),E.exports={renderWebGL:S,renderCanvas:x}},46161:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=n(70554),x=function(h,d,t,e){var l=t.camera;l.addToRenderList(d);var i=d.customRenderNodes.FillRect||d.defaultRenderNodes.FillRect,s=d.customRenderNodes.Submitter||d.defaultRenderNodes.Submitter,r=m(d,l,e,!t.useCanvas).calc;r.translate(-d._displayOriginX,-d._displayOriginY);var o=d.alpha,a=d.width,u=d.height,f=d.cellWidth,v=d.cellHeight,c=Math.ceil(a/f),g=Math.ceil(u/v),p=f,T=v,C=f-(c*f-a),M=v-(g*v-u),A,R=d.isFilled,P=d.showAltCells,L=d.isStroked,F=d.cellPadding,w=d.lineWidth,O=w/2,B=0,I=0,D=0,N=0,z=0;if(F&&(p-=F*2,T-=F*2,C-=F*2,M-=F*2),R&&d.fillAlpha>0)for(A=S.getTintAppendFloatAlpha(d.fillColor,d.fillAlpha*o),I=0;I<g;I++)for(P&&(D=I%2),B=0;B<c;B++){if(P&&D){D=0;continue}D++,N=B<c-1?p:C,z=I<g-1?T:M,N>0&&z>0&&i.run(t,r,s,B*f+F,I*v+F,N,z,A,A,A,A)}if(P&&d.altFillAlpha>0)for(A=S.getTintAppendFloatAlpha(d.altFillColor,d.altFillAlpha*o),I=0;I<g;I++)for(P&&(D=I%2),B=0;B<c;B++){if(P&&!D){D=1;continue}D=0,N=B<c-1?p:C,z=I<g-1?T:M,N>0&&z>0&&i.run(t,r,s,B*f+F,I*v+F,N,z,A,A,A,A)}if(L&&d.strokeAlpha>0){var V=S.getTintAppendFloatAlpha(d.strokeColor,d.strokeAlpha*o),U=d.strokeOutside?0:1;for(B=U;B<c;B++){var G=B*f-O;i.run(t,r,s,G,0,w,u,V,V,V,V)}for(I=U;I<g;I++){var b=I*v-O;i.run(t,r,s,0,b,a,w,V,V,V,V)}d.strokeOutside&&d.strokeOutsideIncomplete&&(a>O&&i.run(t,r,s,a-O,0,w,u,V,V,V,V),u>O&&i.run(t,r,s,0,u-O,a,w,V,V,V,V))}};E.exports=x},61475:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(99651),S=n(83419),x=n(17803),h=new S({Extends:x,Mixins:[m],initialize:function(t,e,l,i,s,r,o,a){e===void 0&&(e=0),l===void 0&&(l=0),i===void 0&&(i=48),s===void 0&&(s=32),r===void 0&&(r=15658734),o===void 0&&(o=10066329),a===void 0&&(a=13421772),x.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=r,this.fillLeft=o,this.fillRight=a,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,l),this.setSize(i,s),this.updateDisplayOrigin()},setProjection:function(d){return this.projection=d,this},setFaces:function(d,t,e){return d===void 0&&(d=!0),t===void 0&&(t=!0),e===void 0&&(e=!0),this.showTop=d,this.showLeft=t,this.showRight=e,this},setFillStyle:function(d,t,e){return this.fillTop=d,this.fillLeft=t,this.fillRight=e,this.isFilled=!0,this}});E.exports=h},11508:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(20926),x=function(h,d,t,e){t.addToRenderList(d);var l=h.currentContext;if(S(h,l,d,t,e)&&d.isFilled){var i=d.width,s=d.height,r=i/2,o=i/d.projection;d.showTop&&(m(l,d,d.fillTop),l.beginPath(),l.moveTo(-r,-s),l.lineTo(0,-o-s),l.lineTo(r,-s),l.lineTo(r,-1),l.lineTo(0,o-1),l.lineTo(-r,-1),l.lineTo(-r,-s),l.fill()),d.showLeft&&(m(l,d,d.fillLeft),l.beginPath(),l.moveTo(-r,0),l.lineTo(0,o),l.lineTo(0,o-s),l.lineTo(-r,-s),l.lineTo(-r,0),l.fill()),d.showRight&&(m(l,d,d.fillRight),l.beginPath(),l.moveTo(r,0),l.lineTo(0,o),l.lineTo(0,o-s),l.lineTo(r,-s),l.lineTo(r,0),l.fill()),l.restore()}};E.exports=x},3933:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(61475);m.register("isobox",function(x,h,d,t,e,l,i){return this.displayList.add(new S(this.scene,x,h,d,t,e,l,i))})},99651:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(68149),x=n(11508),E.exports={renderWebGL:S,renderCanvas:x}},68149:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=n(70554),x=function(h,d,t,e){if(d.isFilled){var l=t.camera;l.addToRenderList(d);var i=d.customRenderNodes.FillTri||d.defaultRenderNodes.FillTri,s=d.customRenderNodes.Submitter||d.defaultRenderNodes.Submitter,r=m(d,l,e,!t.useCanvas).calc,o=d.width,a=d.height,u=o/2,f=o/d.projection,v=d.alpha,c,g,p,T,C,M,A,R,P;d.showTop&&(c=S.getTintAppendFloatAlpha(d.fillTop,v),g=-u,p=-a,T=0,C=-f-a,M=u,A=-a,R=0,P=f-a,i.run(t,r,s,g,p,T,C,M,A,c,c,c),i.run(t,r,s,M,A,R,P,g,p,c,c,c)),d.showLeft&&(c=S.getTintAppendFloatAlpha(d.fillLeft,v),g=-u,p=0,T=0,C=f,M=0,A=f-a,R=-u,P=-a,i.run(t,r,s,g,p,T,C,M,A,c,c,c),i.run(t,r,s,M,A,R,P,g,p,c,c,c)),d.showRight&&(c=S.getTintAppendFloatAlpha(d.fillRight,v),g=u,p=0,T=0,C=f,M=0,A=f-a,R=u,P=-a,i.run(t,r,s,g,p,T,C,M,A,c,c,c),i.run(t,r,s,M,A,R,P,g,p,c,c,c))}};E.exports=x},16933:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(60561),x=n(17803),h=new m({Extends:x,Mixins:[S],initialize:function(t,e,l,i,s,r,o,a,u){e===void 0&&(e=0),l===void 0&&(l=0),i===void 0&&(i=48),s===void 0&&(s=32),r===void 0&&(r=!1),o===void 0&&(o=15658734),a===void 0&&(a=10066329),u===void 0&&(u=13421772),x.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=u,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=r,this.isFilled=!0,this.setPosition(e,l),this.setSize(i,s),this.updateDisplayOrigin()},setProjection:function(d){return this.projection=d,this},setReversed:function(d){return this.isReversed=d,this},setFaces:function(d,t,e){return d===void 0&&(d=!0),t===void 0&&(t=!0),e===void 0&&(e=!0),this.showTop=d,this.showLeft=t,this.showRight=e,this},setFillStyle:function(d,t,e){return this.fillTop=d,this.fillLeft=t,this.fillRight=e,this.isFilled=!0,this}});E.exports=h},79590:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(20926),x=function(h,d,t,e){t.addToRenderList(d);var l=h.currentContext;if(S(h,l,d,t,e)&&d.isFilled){var i=d.width,s=d.height,r=i/2,o=i/d.projection,a=d.isReversed;d.showTop&&a&&(m(l,d,d.fillTop),l.beginPath(),l.moveTo(-r,-s),l.lineTo(0,-o-s),l.lineTo(r,-s),l.lineTo(0,o-s),l.fill()),d.showLeft&&(m(l,d,d.fillLeft),l.beginPath(),a?(l.moveTo(-r,-s),l.lineTo(0,o),l.lineTo(0,o-s)):(l.moveTo(-r,0),l.lineTo(0,o),l.lineTo(0,o-s)),l.fill()),d.showRight&&(m(l,d,d.fillRight),l.beginPath(),a?(l.moveTo(r,-s),l.lineTo(0,o),l.lineTo(0,o-s)):(l.moveTo(r,0),l.lineTo(0,o),l.lineTo(0,o-s)),l.fill()),l.restore()}};E.exports=x},49803:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(16933);m.register("isotriangle",function(x,h,d,t,e,l,i,s){return this.displayList.add(new S(this.scene,x,h,d,t,e,l,i,s))})},60561:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(51503),x=n(79590),E.exports={renderWebGL:S,renderCanvas:x}},51503:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=n(70554),x=function(h,d,t,e){if(d.isFilled){var l=t.camera;l.addToRenderList(d);var i=d.customRenderNodes.FillTri||d.defaultRenderNodes.FillTri,s=d.customRenderNodes.Submitter||d.defaultRenderNodes.Submitter,r=m(d,l,e,!t.useCanvas).calc,o=d.width,a=d.height,u=o/2,f=o/d.projection,v=d.isReversed,c=d.alpha,g,p,T,C,M,A,R;if(d.showTop&&v){g=S.getTintAppendFloatAlpha(d.fillTop,c),p=-u,T=-a,C=0,M=-f-a,A=u,R=-a;var P=0,L=f-a;i.run(t,r,s,p,T,C,M,A,R,g,g,g),i.run(t,r,s,A,R,P,L,p,T,g,g,g)}d.showLeft&&(g=S.getTintAppendFloatAlpha(d.fillLeft,c),v?(p=-u,T=-a,C=0,M=f,A=0,R=f-a):(p=-u,T=0,C=0,M=f,A=0,R=f-a),i.run(t,r,s,p,T,C,M,A,R,g,g,g)),d.showRight&&(g=S.getTintAppendFloatAlpha(d.fillRight,c),v?(p=u,T=-a,C=0,M=f,A=0,R=f-a):(p=u,T=0,C=0,M=f,A=0,R=f-a),i.run(t,r,s,p,T,C,M,A,R,g,g,g))}};E.exports=x},57847:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(17803),x=n(23031),h=n(36823),d=new m({Extends:S,Mixins:[h],initialize:function(e,l,i,s,r,o,a,u,f){l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=128),a===void 0&&(a=0),S.call(this,e,"Line",new x(s,r,o,a));var v=Math.max(1,this.geom.right-this.geom.left),c=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(l,i),this.setSize(v,c),u!==void 0&&this.setStrokeStyle(1,u,f),this.updateDisplayOrigin()},setLineWidth:function(t,e){return e===void 0&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,l,i){return this.geom.setTo(t,e,l,i),this}});E.exports=d},17440:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(75177),S=n(20926),x=function(h,d,t,e){t.addToRenderList(d);var l=h.currentContext;if(S(h,l,d,t,e)){var i=d._displayOriginX,s=d._displayOriginY;d.isStroked&&(m(l,d),l.beginPath(),l.moveTo(d.geom.x1-i,d.geom.y1-s),l.lineTo(d.geom.x2-i,d.geom.y2-s),l.stroke()),l.restore()}};E.exports=x},2481:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(57847);m.register("line",function(x,h,d,t,e,l,i,s){return this.displayList.add(new S(this.scene,x,h,d,t,e,l,i,s))})},36823:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(77385),x=n(17440),E.exports={renderWebGL:S,renderCanvas:x}},77385:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=n(70554),x=[{x:0,y:0,width:0},{x:0,y:0,width:0}],h=function(d,t,e,l){var i=e.camera;i.addToRenderList(t);var s=m(t,i,l,!e.useCanvas).calc,r=t._displayOriginX,o=t._displayOriginY,a=t.alpha;if(t.isStroked){var u=S.getTintAppendFloatAlpha(t.strokeColor,t.strokeAlpha*a);x[0].x=t.geom.x1-r,x[0].y=t.geom.y1-o,x[0].width=t._startWidth,x[1].x=t.geom.x2-r,x[1].y=t.geom.y2-o,x[1].width=t._endWidth,(t.customRenderNodes.StrokePath||t.defaultRenderNodes.StrokePath).run(e,t.customRenderNodes.Submitter||t.defaultRenderNodes.Submitter,x,1,!0,s,u,u,u,u)}};E.exports=h},24949:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90273),S=n(83419),x=n(94811),h=n(13829),d=n(25717),t=n(17803),e=n(5469),l=new S({Extends:t,Mixins:[m],initialize:function(s,r,o,a,u,f){r===void 0&&(r=0),o===void 0&&(o=0),t.call(this,s,"Polygon",new d(a));var v=h(this.geom);this.setPosition(r,o),this.setSize(v.width,v.height),u!==void 0&&this.setFillStyle(u,f),this.updateDisplayOrigin(),this.updateData()},smooth:function(i){i===void 0&&(i=1);for(var s=0;s<i;s++)e(this.geom);return this.updateData()},setTo:function(i){this.geom.setTo(i);var s=h(this.geom);return this.setSize(s.width,s.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var i=[],s=this.geom.points,r=0;r<s.length;r++)i.push(s[r].x,s[r].y);return i.push(s[0].x,s[0].y),this.pathIndexes=x(i),this.pathData=i,this}});E.exports=l},38710:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(75177),x=n(20926),h=function(d,t,e,l){e.addToRenderList(t);var i=d.currentContext;if(x(d,i,t,e,l)){var s=t._displayOriginX,r=t._displayOriginY,o=t.pathData,a=o.length-1,u=o[0]-s,f=o[1]-r;i.beginPath(),i.moveTo(u,f),t.closePath||(a-=2);for(var v=2;v<a;v+=2){var c=o[v]-s,g=o[v+1]-r;i.lineTo(c,g)}t.closePath&&i.closePath(),t.isFilled&&(m(i,t),i.fill()),t.isStroked&&(S(i,t),i.stroke()),i.restore()}};E.exports=h},64827:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(24949);m.register("polygon",function(x,h,d,t,e){return this.displayList.add(new S(this.scene,x,h,d,t,e))})},90273:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(73695),x=n(38710),E.exports={renderWebGL:S,renderCanvas:x}},73695:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10441),S=n(91296),x=n(34682),h=function(d,t,e,l){var i=e.camera;i.addToRenderList(t);var s=S(t,i,l,!e.useCanvas).calc,r=t._displayOriginX,o=t._displayOriginY,a=t.alpha,u=t.customRenderNodes.Submitter||t.defaultRenderNodes.Submitter;t.isFilled&&m(e,u,s,t,a,r,o),t.isStroked&&x(e,u,s,t,a,r,o)};E.exports=h},74561:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(94811),x=n(87841),h=n(17803),d=n(95597),t=new m({Extends:h,Mixins:[d],initialize:function(l,i,s,r,o,a,u){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=128),o===void 0&&(o=128),h.call(this,l,"Rectangle",new x(0,0,r,o)),this.radius=20,this.isRounded=!1,this.setPosition(i,s),this.setSize(r,o),a!==void 0&&this.setFillStyle(a,u),this.updateDisplayOrigin(),this.updateData()},setRounded:function(e){return e===void 0&&(e=16),this.radius=e,this.isRounded=e>0,this.updateRoundedData()},setSize:function(e,l){this.width=e,this.height=l,this.geom.setSize(e,l),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=e,i.hitArea.height=l),this},updateData:function(){if(this.isRounded)return this.updateRoundedData();var e=[],l=this.geom,i=this._tempLine;return l.getLineA(i),e.push(i.x1,i.y1,i.x2,i.y2),l.getLineB(i),e.push(i.x2,i.y2),l.getLineC(i),e.push(i.x2,i.y2),l.getLineD(i),e.push(i.x2,i.y2),this.pathData=e,this},updateRoundedData:function(){var e=[],l=this.width/2,i=this.height/2,s=Math.min(l,i),r=Math.min(this.radius,s),o=l,a=i,u=Math.max(4,Math.min(16,Math.ceil(r/2)));return this.arcTo(e,o-l+r,a-i+r,r,Math.PI,Math.PI*1.5,u),e.push(o+l-r,a-i),this.arcTo(e,o+l-r,a-i+r,r,Math.PI*1.5,Math.PI*2,u),e.push(o+l,a+i-r),this.arcTo(e,o+l-r,a+i-r,r,0,Math.PI*.5,u),e.push(o-l+r,a+i),this.arcTo(e,o-l+r,a+i-r,r,Math.PI*.5,Math.PI,u),e.push(o-l,a-i+r),this.pathIndexes=S(e),this.pathData=e,this},arcTo:function(e,l,i,s,r,o,a){for(var u=(o-r)/a,f=0;f<=a;f++){var v=r+u*f;e.push(l+Math.cos(v)*s,i+Math.sin(v)*s)}}});E.exports=t},48682:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(75177),x=n(20926),h=function(t,e,l,i,s,r){var o=Math.min(i/2,s/2),a=Math.min(r,o);if(a===0){t.rect(e,l,i,s);return}t.moveTo(e+a,l),t.lineTo(e+i-a,l),t.arcTo(e+i,l,e+i,l+a,a),t.lineTo(e+i,l+s-a),t.arcTo(e+i,l+s,e+i-a,l+s,a),t.lineTo(e+a,l+s),t.arcTo(e,l+s,e,l+s-a,a),t.lineTo(e,l+a),t.arcTo(e,l,e+a,l,a),t.closePath()},d=function(t,e,l,i){l.addToRenderList(e);var s=t.currentContext;if(x(t,s,e,l,i)){var r=e._displayOriginX,o=e._displayOriginY;e.isFilled&&(m(s,e),e.isRounded?(s.beginPath(),h(s,-r,-o,e.width,e.height,e.radius),s.fill()):s.fillRect(-r,-o,e.width,e.height)),e.isStroked&&(S(s,e),s.beginPath(),e.isRounded?h(s,-r,-o,e.width,e.height,e.radius):s.rect(-r,-o,e.width,e.height),s.stroke()),s.restore()}};E.exports=d},87959:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(74561);m.register("rectangle",function(x,h,d,t,e,l){return this.displayList.add(new S(this.scene,x,h,d,t,e,l))})},95597:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(52059),x=n(48682),E.exports={renderWebGL:S,renderCanvas:x}},52059:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10441),S=n(91296),x=n(34682),h=n(70554),d=function(t,e,l,i){var s=l.camera;s.addToRenderList(e);var r=S(e,s,i,!l.useCanvas).calc,o=e._displayOriginX,a=e._displayOriginY,u=e.alpha,f=e.customRenderNodes,v=e.defaultRenderNodes,c=f.Submitter||v.Submitter;if(e.isFilled)if(e.isRounded)m(l,c,r,e,u,o,a);else{var g=h.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u);(f.FillRect||v.FillRect).run(l,r,c,-o,-a,e.width,e.height,g,g,g,g)}e.isStroked&&x(l,c,r,e,u,o,a)};E.exports=d},55911:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(81991),S=n(83419),x=n(94811),h=n(17803),d=new S({Extends:h,Mixins:[m],initialize:function(e,l,i,s,r,o,a,u){l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=5),r===void 0&&(r=32),o===void 0&&(o=64),h.call(this,e,"Star",null),this._points=s,this._innerRadius=r,this._outerRadius=o,this.setPosition(l,i),this.setSize(o*2,o*2),a!==void 0&&this.setFillStyle(a,u),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,l=this._innerRadius,i=this._outerRadius,s=Math.PI/2*3,r=Math.PI/e,o=i,a=i;t.push(o,a+-i);for(var u=0;u<e;u++)t.push(o+Math.cos(s)*i,a+Math.sin(s)*i),s+=r,t.push(o+Math.cos(s)*l,a+Math.sin(s)*l),s+=r;return t.push(o,a+-i),this.pathIndexes=x(t),this.pathData=t,this}});E.exports=d},64272:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(75177),x=n(20926),h=function(d,t,e,l){e.addToRenderList(t);var i=d.currentContext;if(x(d,i,t,e,l)){var s=t._displayOriginX,r=t._displayOriginY,o=t.pathData,a=o.length-1,u=o[0]-s,f=o[1]-r;i.beginPath(),i.moveTo(u,f),t.closePath||(a-=2);for(var v=2;v<a;v+=2){var c=o[v]-s,g=o[v+1]-r;i.lineTo(c,g)}i.closePath(),t.isFilled&&(m(i,t),i.fill()),t.isStroked&&(S(i,t),i.stroke()),i.restore()}};E.exports=h},93697:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(55911),S=n(39429);S.register("star",function(x,h,d,t,e,l,i){return this.displayList.add(new m(this.scene,x,h,d,t,e,l,i))})},81991:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(57017),x=n(64272),E.exports={renderWebGL:S,renderCanvas:x}},57017:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10441),S=n(91296),x=n(34682),h=function(d,t,e,l){var i=e.camera;i.addToRenderList(t);var s=S(t,i,l,!e.useCanvas).calc,r=t._displayOriginX,o=t._displayOriginY,a=t.alpha,u=t.customRenderNodes.Submitter||t.defaultRenderNodes.Submitter;t.isFilled&&m(e,u,s,t,a,r,o),t.isStroked&&x(e,u,s,t,a,r,o)};E.exports=h},36931:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(17803),x=n(16483),h=n(96195),d=new m({Extends:S,Mixins:[h],initialize:function(e,l,i,s,r,o,a,u,f,v,c){l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=128),o===void 0&&(o=64),a===void 0&&(a=0),u===void 0&&(u=128),f===void 0&&(f=128),S.call(this,e,"Triangle",new x(s,r,o,a,u,f));var g=this.geom.right-this.geom.left,p=this.geom.bottom-this.geom.top;this.setPosition(l,i),this.setSize(g,p),v!==void 0&&this.setFillStyle(v,c),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,l,i,s,r){return this.geom.setTo(t,e,l,i,s,r),this.updateData()},updateData:function(){var t=[],e=this.geom,l=this._tempLine;return e.getLineA(l),t.push(l.x1,l.y1,l.x2,l.y2),e.getLineB(l),t.push(l.x2,l.y2),e.getLineC(l),t.push(l.x2,l.y2),this.pathData=t,this}});E.exports=d},85172:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(65960),S=n(75177),x=n(20926),h=function(d,t,e,l){e.addToRenderList(t);var i=d.currentContext;if(x(d,i,t,e,l)){var s=t._displayOriginX,r=t._displayOriginY,o=t.geom.x1-s,a=t.geom.y1-r,u=t.geom.x2-s,f=t.geom.y2-r,v=t.geom.x3-s,c=t.geom.y3-r;i.beginPath(),i.moveTo(o,a),i.lineTo(u,f),i.lineTo(v,c),i.closePath(),t.isFilled&&(m(i,t),i.fill()),t.isStroked&&(S(i,t),i.stroke()),i.restore()}};E.exports=h},45245:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(36931);m.register("triangle",function(x,h,d,t,e,l,i,s,r,o){return this.displayList.add(new S(this.scene,x,h,d,t,e,l,i,s,r,o))})},96195:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(83253),x=n(85172),E.exports={renderWebGL:S,renderCanvas:x}},83253:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=n(34682),x=n(70554),h=function(d,t,e,l){var i=e.camera;i.addToRenderList(t);var s=m(t,i,l,!e.useCanvas).calc,r=t._displayOriginX,o=t._displayOriginY,a=t.alpha,u=t.customRenderNodes,f=t.defaultRenderNodes,v=u.Submitter||f.Submitter;if(t.isFilled){var c=x.getTintAppendFloatAlpha(t.fillColor,t.fillAlpha*a),g=t.geom.x1-r,p=t.geom.y1-o,T=t.geom.x2-r,C=t.geom.y2-o,M=t.geom.x3-r,A=t.geom.y3-o;(u.FillTri||f.FillTri).run(e,s,v,g,p,T,C,M,A,c,c,c)}t.isStroked&&S(e,v,s,t,a,r,o)};E.exports=h},68287:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(9674),S=n(40939),x=n(83419),h=n(31401),d=n(95643),t=n(92751),e=new x({Extends:d,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.Flip,h.GetBounds,h.Lighting,h.Mask,h.Origin,h.RenderNodes,h.ScrollFactor,h.Size,h.TextureCrop,h.Tint,h.Transform,h.Visible,t],initialize:function(i,s,r,o,a){d.call(this,i,"Sprite"),this._crop=this.resetCropObject(),this.anims=new m(this),this.setTexture(o,a),this.setPosition(s,r),this.setSizeToFrame(),this.setOriginFromFrame(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return S}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(l,i){this.anims.update(l,i)},play:function(l,i){return this.anims.play(l,i)},playReverse:function(l,i){return this.anims.playReverse(l,i)},playAfterDelay:function(l,i){return this.anims.playAfterDelay(l,i)},playAfterRepeat:function(l,i){return this.anims.playAfterRepeat(l,i)},chain:function(l){return this.anims.chain(l)},stop:function(){return this.anims.stop()},stopAfterDelay:function(l){return this.anims.stopAfterDelay(l)},stopAfterRepeat:function(l){return this.anims.stopAfterRepeat(l)},stopOnFrame:function(l){return this.anims.stopOnFrame(l)},toJSON:function(){return h.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});E.exports=e},76552:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S.addToRenderList(m),n.batchSprite(m,m.frame,S,x)};E.exports=y},15567:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(13059),x=n(44603),h=n(23568),d=n(68287);x.register("sprite",function(t,e){t===void 0&&(t={});var l=h(t,"key",null),i=h(t,"frame",null),s=new d(this.scene,0,0,l,i);return e!==void 0&&(t.add=e),m(this.scene,s,t),S(s,t),s})},46409:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(68287);m.register("sprite",function(x,h,d,t){return this.displayList.add(new S(this.scene,x,h,d,t))})},92751:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(9409),x=n(76552),E.exports={renderWebGL:S,renderCanvas:x}},9409:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S.camera.addToRenderList(m);var h=m.customRenderNodes,d=m.defaultRenderNodes;(h.Submitter||d.Submitter).run(S,m,x,0,h.Texturer||d.Texturer,h.Transformer||d.Transformer)};E.exports=y},18207:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={None:0,Power0:1,Power1:10,Power2:20,Power3:30,Power4:40,Linear:1,Gravity:2,Quad:10,"Quad.easeOut":10,"Quad.easeIn":11,"Quad.easeInOut":12,Cubic:20,"Cubic.easeOut":20,"Cubic.easeIn":21,"Cubic.easeInOut":22,Quart:30,"Quart.easeOut":30,"Quart.easeIn":31,"Quart.easeInOut":32,Quint:40,"Quint.easeOut":40,"Quint.easeIn":41,"Quint.easeInOut":42,Sine:50,"Sine.easeOut":50,"Sine.easeIn":51,"Sine.easeInOut":52,Expo:60,"Expo.easeOut":60,"Expo.easeIn":61,"Expo.easeInOut":62,Circ:70,"Circ.easeOut":70,"Circ.easeIn":71,"Circ.easeInOut":72,Back:90,"Back.easeOut":90,"Back.easeIn":91,"Back.easeInOut":92,Bounce:100,"Bounce.easeOut":100,"Bounce.easeIn":101,"Bounce.easeInOut":102,Stepped:110,Smoothstep:120,"Smoothstep.easeOut":120,"Smoothstep.easeIn":121,"Smoothstep.easeInOut":122};E.exports=y},68218:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/for(var m=n(18207),S={},x=Object.keys(m),h=x.length,d=0;d<h;d++){var t=x[d],e=m[t];S[e]=t}E.exports=S},76573:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(31401),x=n(95643),h=n(53384),d=n(70554),t=n(18207),e=n(68218),l=n(71238),i=d.getTintAppendFloatAlpha,s=new m({Extends:x,Mixins:[S.Alpha,S.BlendMode,S.Depth,S.ElapseTimer,S.Lighting,S.Mask,S.RenderNodes,S.TextureCrop,S.Visible,l],initialize:function(o,a,u){x.call(this,o,"SpriteGPULayer"),this.memberCount=0,this.size=Math.max(u,0),this._segments=24,this.MAX_BUFFER_UPDATE_SEGMENTS_FULL=16777215,this.bufferUpdateSegments=0,this.bufferUpdateSegmentSize=Math.ceil(this.size/this._segments),this.gravity=1024,this._animationsEnabled={};for(var f=Object.keys(t),v=f.length,c=0;c<v;c++)this._animationsEnabled[f[c]]=!1;this.EASE=t,this.EASE_CODES=e,this.setTexture(a),this.initRenderNodes(new Phaser.Structs.Map),this.frameDataTexture=null,this.frameDataIndices={},this.frameDataIndicesInv={},this.animationData=[],this.animationDataNames={},this.animationDataIndices={},this.generateFrameDataTexture(),this.submitterNode=new h(o.renderer.renderNodes,{},this),this.defaultRenderNodes.Submitter=this.submitterNode,this.renderNodeData[this.submitterNode.name]={},this.resize(this.size),this.nextMember=new ArrayBuffer(this.getDataByteSize()),this.nextMemberF32=new Float32Array(this.nextMember),this.nextMemberU32=new Uint32Array(this.nextMember)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(r,o){this.updateTimer(r,o)},getDataByteSize:function(){return this.submitterNode.instanceBufferLayout.layout.stride},getShaderFeatures:function(){for(var r=[],o=Object.keys(this._animationsEnabled),a=o.length,u=0;u<a;u++)this._animationsEnabled[o[u]]&&r.push(o[u]);return r},setAnimations:function(r){for(var o=r.length,a=this.texture.getFrameNames(!0),u=a.length,f=0;f<o;f++){var v=r[f],c={};v.key?(c.name=v.key,c.duration=v.duration,c.frames=v.frames):(c.name=v.name,c.duration=v.duration,c.frames=v.frames.slice()),c.index=u,c.frameCount=c.frames.length,u+=c.frameCount,this.animationData.push(c),this.animationDataNames[c.name]=c,this.animationDataIndices[c.index]=c}return this.generateFrameDataTexture(),this},generateFrameDataTexture:function(){var r=this.texture,o=r.getFrameNames(!0),a=o.length;this.frameDataIndices={},this.frameDataIndicesInv={};for(var u=0;u<a;u++){var f=o[u],v=r.get(f);this.frameDataIndices[f]=u,this.frameDataIndicesInv[u]=f}var c=this.animationData,g=c.length;for(u=0;u<g;u++)for(var p=this.animationData[u],T=p.frameCount,C=0;C<T;C++)o.push(p.frames[C]);a=o.length;var M=3,A=a*M,R=Math.min(A,4096),P=Math.ceil(A/4096),L=R*P*4,F=r.manager,w=new ArrayBuffer(L),O=new Uint16Array(w),B=new Uint8Array(w);for(u=0;u<a;u++){var I=o[u];if(typeof I=="string")v=r.get(o[u]);else if(I&&I.key!==void 0){var D=F.get(I.key);v=D.get(I.frame)}else v=I.frame;var N=u*M*O.BYTES_PER_ELEMENT;O[N]=v.cutX,O[N+1]=v.cutY,O[N+2]=v.cutWidth,O[N+3]=v.cutHeight;var z=.5,V=.5;v.customPivot&&(z=v.pivotX,V=v.pivotY),O[N+4]=Math.round((z-.5)*v.cutWidth)+32768,O[N+5]=Math.round((V-.5)*v.cutHeight)+32768}this.frameDataTexture&&this.frameDataTexture.destroy(),this.frameDataTexture=this.scene.renderer.createUint8ArrayTexture(B,R,P,!1,!1)},resize:function(r,o){var a=this.submitterNode.instanceBufferLayout,u=a.buffer,f=u.viewU8,v=r*a.layout.stride;if(this.size=r,u.resize(v),o)this.memberCount=0;else{var c=u.viewU8;c.set(f.subarray(0,Math.min(c.byteLength,v))),this.memberCount=Math.min(this.memberCount,r)}return this.bufferUpdateSegmentSize=Math.ceil(this.size/this._segments),this.setAllSegmentsNeedUpdate(),this},setSegmentNeedsUpdate:function(r){if(!(r<0||r>=this.size||this.bufferUpdateSegments===this.MAX_BUFFER_UPDATE_SEGMENTS_FULL)){var o=Math.floor(r/this.bufferUpdateSegmentSize);this.bufferUpdateSegments|=1<<o}},setAllSegmentsNeedUpdate:function(){this.bufferUpdateSegments=this.MAX_BUFFER_UPDATE_SEGMENTS_FULL},clearAllSegmentsNeedUpdate:function(){this.bufferUpdateSegments=0},addData:function(r){if(this.memberCount>=this.size)return this;var o=this.submitterNode.instanceBufferLayout,a=o.buffer.viewF32,u=this.memberCount*o.layout.stride;return a.set(r,u/a.BYTES_PER_ELEMENT),this.setSegmentNeedsUpdate(this.memberCount),this.memberCount++,this},addMember:function(r){if(this.memberCount>=this.size)return this;var o=this.nextMemberF32,a=this.nextMemberU32;r||(r={});var u=this.frame;if(r.frame!==void 0&&(u=r.frame.base?r.frame.base:r.frame),typeof u=="string"&&(u=this.texture.get(u),!u))return this;var f=0;this._setAnimatedValue(r.x,f),f+=4,this._setAnimatedValue(r.y,f),f+=4,this._setAnimatedValue(r.rotation,f),f+=4,this._setAnimatedValue(r.scaleX,f,1),f+=4,this._setAnimatedValue(r.scaleY,f,1),f+=4,this._setAnimatedValue(r.alpha,f,1),f+=4;var v=r.animation;if(v){var c;if(typeof v=="string"||typeof v=="number")typeof v=="string"?c=this.animationDataNames[v]:c=this.animationDataIndices[v],this._setAnimatedValue({base:c.index,amplitude:c.frameCount,duration:c.duration,ease:t.Linear,yoyo:!1},f);else{var g=v.base;typeof g=="string"?c=this.animationDataNames[g]:typeof g=="number"?c=this.animationDataIndices[g]:c=this.animationData[0],this._setAnimatedValue({base:c.index,amplitude:typeof v.amplitude=="number"?v.amplitude:c.frameCount,duration:v.duration||c.duration,delay:v.delay||0,ease:v.ease||t.Linear,yoyo:!!v.yoyo},f)}}else{var p=this.frameDataIndices[u.name],T=r.frame;T&&T.base!==void 0?this._setAnimatedValue({base:p,amplitude:T.amplitude,duration:T.duration,delay:T.delay,ease:T.ease,yoyo:T.yoyo},f):this._setAnimatedValue(p,f)}f+=4,this._setAnimatedValue(r.tintBlend,f,1),f+=4;var C=r.tintBottomLeft===void 0?16777215:r.tintBottomLeft,M=r.tintTopLeft===void 0?16777215:r.tintTopLeft,A=r.tintBottomRight===void 0?16777215:r.tintBottomRight,R=r.tintTopRight===void 0?16777215:r.tintTopRight,P=r.alphaBottomLeft===void 0?1:r.alphaBottomLeft,L=r.alphaTopLeft===void 0?1:r.alphaTopLeft,F=r.alphaBottomRight===void 0?1:r.alphaBottomRight,w=r.alphaTopRight===void 0?1:r.alphaTopRight;return a[f++]=i(C,P),a[f++]=i(M,L),a[f++]=i(A,F),a[f++]=i(R,w),o[f++]=r.originX===void 0?.5:r.originX,o[f++]=r.originY===void 0?.5:r.originY,o[f++]=r.tintFill?1:0,o[f++]=r.creationTime||this.timeElapsed,o[f++]=r.scrollFactorX===void 0?1:r.scrollFactorX,o[f++]=r.scrollFactorY===void 0?1:r.scrollFactorY,this.addData(this.nextMemberF32),this},editMember:function(r,o){if(r<0||r>=this.memberCount)return this;var a=this.memberCount;return this.memberCount=r,this.addMember(o),this.memberCount=a,this},patchMember:function(r,o,a){if(!(r<0||r>=this.memberCount)){var u=this.submitterNode.instanceBufferLayout,f=u.buffer,v=u.layout.stride,c=r*v,g=f.viewU32,p=c/4;if(a)for(var T=0;T<o.length;T++)a[T]&&(g[p+T]=o[T]);else g.set(o,p);this.setSegmentNeedsUpdate(r)}},getMember:function(r){if(r<0||r>=this.memberCount)return null;var o=this.submitterNode.instanceBufferLayout,a=o.buffer,u=o.layout.stride,f=r*u,v=a.viewF32,c=a.viewU32,g={},p=f/v.BYTES_PER_ELEMENT;g.x=this._getAnimatedValue(p),p+=4,g.y=this._getAnimatedValue(p),p+=4,g.rotation=this._getAnimatedValue(p),p+=4,g.scaleX=this._getAnimatedValue(p),p+=4,g.scaleY=this._getAnimatedValue(p),p+=4,g.alpha=this._getAnimatedValue(p),p+=4;var T=this._getAnimatedValue(p);p+=4,typeof T!="number"&&(T=T.base);var C=this.frameDataIndicesInv[T];if(C===void 0){var M=this.animationDataIndices[T];M&&(g.animation=M.name)}else g.frame=C;return g.tintBlend=this._getAnimatedValue(p),p+=4,g.tintBottomLeft=c[p++],g.tintTopLeft=c[p++],g.tintBottomRight=c[p++],g.tintTopRight=c[p++],g.alphaBottomLeft=(g.tintBottomLeft>>>24)/255,g.alphaTopLeft=(g.tintTopLeft>>>24)/255,g.alphaBottomRight=(g.tintBottomRight>>>24)/255,g.alphaTopRight=(g.tintTopRight>>>24)/255,g.tintBottomLeft&=16777215,g.tintTopLeft&=16777215,g.tintBottomRight&=16777215,g.tintTopRight&=16777215,g.originX=v[p++],g.originY=v[p++],g.tintFill=!!v[p++],g.creationTime=v[p++],g.scrollFactorX=v[p++],g.scrollFactorY=v[p++],g},getMemberData:function(r,o){if(r<0||r>=this.memberCount)return null;var a=this.submitterNode.instanceBufferLayout,u=a.buffer,f=a.layout.stride,v=r*f;o||(o=this.nextMemberU32);var c=u.viewU32,g=c.BYTES_PER_ELEMENT;return o.set(c.subarray(v/g,v/g+f/g)),o},removeMembers:function(r,o){if(r<0||r>=this.memberCount)return this;o===void 0&&(o=1),o=Math.min(o,this.memberCount-r);var a=this.submitterNode.instanceBufferLayout,u=a.layout.stride,f=r*u,v=o*u,c=a.buffer.viewU8;c.set(c.subarray(f+v),f);for(var g=r;g<this.memberCount;g+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(g);return this.memberCount-=o,this},insertMembers:function(r,o){if(r<0||r>this.memberCount)return this;Array.isArray(o)||(o=[o]);var a=this.memberCount,u=this.submitterNode.instanceBufferLayout,f=u.layout.stride,v=r*f,c=o.length*f;u.buffer.viewU8.copyWithin(v+c,v,a*f),this.memberCount=r;for(var g=0;g<o.length;g++)this.addMember(o[g]);for(this.memberCount=Math.min(this.size,a+o.length),g=r;g<this.memberCount;g+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(g);return this},insertMembersData:function(r,o){if(r<0||r>this.memberCount)return this;var a=o.length*o.BYTES_PER_ELEMENT,u=this.submitterNode.instanceBufferLayout,f=u.layout.stride,v=r*f;u.buffer.viewU8.copyWithin(v+a,v,this.memberCount*f),u.buffer.viewU32.set(o,v/o.BYTES_PER_ELEMENT),this.memberCount=Math.min(this.size,this.memberCount+a/f);for(var c=r;c<this.memberCount;c+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(c);return this},_setAnimatedValue:function(r,o,a){var u=this.nextMemberF32;if(a===void 0&&(a=0),typeof r=="number")u[o++]=r,u[o++]=0,u[o++]=0,u[o]=0;else if(r===void 0)u[o++]=a,u[o++]=0,u[o++]=0,u[o]=0;else{var f=r.base||0,v=r.ease||0,c=r.amplitude||0,g=Math.abs(r.duration||0),p=r.delay||0,T=r.yoyo!==void 0?r.yoyo:!0,C=r.loop!==void 0?r.loop:!0;typeof v=="string"&&(v=this.EASE[v]||0);var M=this.EASE_CODES[v];if(this._animationsEnabled[M]||this.setAnimationEnabled(M,!0),v===t.Gravity){var A=r.velocity||0,R=r.gravityFactor||1;R>=1?R=0:R<-1&&(R=-.999),R=(R+1)/2,c=Math.floor(A)+R}g>0?p=p/g%2:p=0,p<0&&(p+=2),p/=2,p+=v,T&&(g=-g),C||(p=-p),u[o++]=f,u[o++]=c,u[o++]=g,u[o]=p}},_getAnimatedValue:function(r){var o=this.submitterNode.instanceBufferLayout.buffer.viewF32,a=o[r++],u=o[r++],f=o[r++],v=o[r];if(u===0||f===0||p===0)return a;var c=v>0;c||(v=-v);var g=f<0;g&&(f=-f);var p=Math.floor(v);if(v-=p,v=v*f*2%f,p===t.Gravity){var T=Math.floor(u),C=(u-T)*2-1;return C===0&&(C=1),{base:a,ease:p,duration:f,delay:v,yoyo:g,velocity:T,gravityFactor:C}}return{base:a,ease:p,amplitude:u,duration:f,delay:v,yoyo:g}},setAnimationEnabled:function(r,o){return this._animationsEnabled[r]=!!o,this},preDestroy:function(){this.frameDataTexture.destroy()}});E.exports=s},16193:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10312),S=n(44603),x=n(23568),h=n(76573);S.register("spriteGPULayer",function(d,t){d===void 0&&(d={});var e=x(d,"key",null),l=x(d,"size",1),i=new h(this.scene,e,l);return t!==void 0&&(d.add=t),i.alpha=x(d,"alpha",1),i.blendMode=x(d,"blendMode",m.NORMAL),i.visible=x(d,"visible",!0),t&&this.scene.sys.displayList.add(i),i})},96019:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(76573),S=n(39429);S.register("spriteGPULayer",function(x,h){return this.displayList.add(new m(this.scene,x,h))})},71238:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=n(97591),x=m;E.exports={renderWebGL:S,renderCanvas:x}},97591:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S.camera.addToRenderList(m);var h=m.customRenderNodes,d=m.defaultRenderNodes;(h.Submitter||d.Submitter).run(S)};E.exports=y},14727:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(78705),S=n(83419),x=n(88571),h=n(74759),d=new S({Extends:x,Mixins:[h],initialize:function(e,l,i,s,r){x.call(this,e,l,i,s,r),this.type="Stamp"},_defaultRenderNodesMap:{get:function(){return m}}});E.exports=d},656:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=new m,x=function(h,d,t){t.addToRenderList(d),S.copyFrom(t.matrix),t.matrix.loadIdentity();var e=t.scrollX,l=t.scrollY;t.scrollX=0,t.scrollY=0,h.batchSprite(d,d.frame,t),t.scrollX=e,t.scrollY=l,t.matrix.copyFrom(S)};E.exports=x},31479:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(14727);S.register("stamp",function(d,t){d===void 0&&(d={});var e=x(d,"key",null),l=x(d,"frame",null),i=new h(this.scene,0,0,e,l);return t!==void 0&&(d.add=t),m(this.scene,i,d),i})},85326:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(14727),S=n(39429);S.register("stamp",function(x,h,d,t){return this.displayList.add(new m(this.scene,x,h,d,t))})},74759:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m;S=n(656),E.exports={renderCanvas:S}},14220:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=n.canvas,h=n.context,d=n.style,t=[],e=0,l=S.length;d.maxLines>0&&d.maxLines<S.length&&(l=d.maxLines),d.syncFont(x,h);for(var i=n.letterSpacing,s=0;s<l;s++){var r=d.strokeThickness;if(i===0)r+=h.measureText(S[s]).width;else{for(var o=S[s],a=0;a<o.length;a++)r+=h.measureText(o[a]).width;o.length>1&&(r+=i*(o.length-1))}d.wordWrap&&(r-=h.measureText(" ").width),t[s]=Math.ceil(r),e=Math.max(e,t[s])}var u=m.fontSize+d.strokeThickness,f=u*l,v=n.lineSpacing;return l>1&&(f+=v*(l-1)),{width:e,height:f,lines:l,lineWidths:t,lineSpacing:v,lineHeight:u}};E.exports=y},79557:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(27919),S=function(x){var h=m.create(this),d=h.getContext("2d",{willReadFrequently:!0});x.syncFont(h,d);var t=d.measureText(x.testString);if("actualBoundingBoxAscent"in t){var e=t.actualBoundingBoxAscent,l=t.actualBoundingBoxDescent;return m.remove(h),{ascent:e,descent:l,fontSize:e+l}}var i=Math.ceil(t.width*x.baselineX),s=i,r=2*s;s=s*x.baselineY|0,h.width=i,h.height=r,d.fillStyle="#f00",d.fillRect(0,0,i,r),d.font=x._font,d.textBaseline="alphabetic",d.fillStyle="#000",d.fillText(x.testString,0,s);var o={ascent:0,descent:0,fontSize:0},a=d.getImageData(0,0,i,r);if(!a)return o.ascent=s,o.descent=s+6,o.fontSize=o.ascent+o.descent,m.remove(h),o;var u=a.data,f=u.length,v=i*4,c,g,p=0,T=!1;for(c=0;c<s;c++){for(g=0;g<v;g+=4)if(u[p+g]!==255){T=!0;break}if(!T)p+=v;else break}for(o.ascent=s-c,p=f-v,T=!1,c=r;c>s;c--){for(g=0;g<v;g+=4)if(u[p+g]!==255){T=!0;break}if(!T)p-=v;else break}return o.descent=c-s,o.fontSize=o.ascent+o.descent,m.remove(h),o};E.exports=S},50171:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(40366),S=n(27919),x=n(40939),h=n(83419),d=n(31401),t=n(95643),e=n(14220),l=n(35154),i=n(35846),s=n(61771),r=n(35762),o=n(45650),a=new h({Extends:t,Mixins:[d.Alpha,d.BlendMode,d.ComputedSize,d.Crop,d.Depth,d.Flip,d.GetBounds,d.Lighting,d.Mask,d.Origin,d.RenderNodes,d.ScrollFactor,d.Tint,d.Transform,d.Visible,s],initialize:function(f,v,c,g,p){v===void 0&&(v=0),c===void 0&&(c=0),t.call(this,f,"Text"),this.renderer=f.sys.renderer,this.setPosition(v,c),this.setOrigin(0,0),this.initRenderNodes(this._defaultRenderNodesMap),this.canvas=S.create(this),this.context,this.style=new r(this,p),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=o(),this.texture=f.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),p&&p.padding&&this.setPadding(p.padding),p&&p.lineSpacing&&this.setLineSpacing(p.lineSpacing),p&&p.letterSpacing&&this.setLetterSpacing(p.letterSpacing)},_defaultRenderNodesMap:{get:function(){return x}},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",m(this.canvas,this.scene.sys.canvas),this.originX=1},runWordWrap:function(u){var f=this.style;if(f.wordWrapCallback){var v=f.wordWrapCallback.call(f.wordWrapCallbackScope,u,this);return Array.isArray(v)&&(v=v.join(`
|
||
`)),v}else return f.wordWrapWidth?f.wordWrapUseAdvanced?this.advancedWordWrap(u,this.context,this.style.wordWrapWidth):this.basicWordWrap(u,this.context,this.style.wordWrapWidth):u},advancedWordWrap:function(u,f,v){for(var c="",g=u.replace(/ +/gi," ").split(this.splitRegExp),p=g.length,T=0;T<p;T++){var C=g[T],M="";C=C.replace(/^ *|\s*$/gi,"");var A=C.length*this.letterSpacing,R=f.measureText(C).width+A;if(R<v){c+=C+`
|
||
`;continue}for(var P=v,L=C.split(" "),F=0;F<L.length;F++){var w=L[F],O=w+" ",B=O.length*this.letterSpacing,I=f.measureText(O).width+B;if(I>P){if(F===0){for(var D=O;D.length;){D=D.slice(0,-1);var N=D.length*this.letterSpacing;if(I=f.measureText(D).width+N,I<=P)break}if(!D.length)throw new Error("wordWrapWidth < a single character");var z=w.substr(D.length);L[F]=z,M+=D}var V=L[F].length?F:F+1,U=L.slice(V).join(" ").replace(/[ \n]*$/gi,"");g.splice(T+1,0,U),p=g.length;break}else M+=O,P-=I}c+=M.replace(/[ \n]*$/gi,"")+`
|
||
`}return c=c.replace(/[\s|\n]*$/gi,""),c},basicWordWrap:function(u,f,v){for(var c="",g=u.split(this.splitRegExp),p=g.length-1,T=f.measureText(" ").width,C=0;C<=p;C++){for(var M=v,A=g[C].split(" "),R=A.length-1,P=0;P<=R;P++){var L=A[P],F=L.length*this.letterSpacing,w=f.measureText(L).width+F,O=w;P<R&&(O+=T),O>M&&P>0&&(c+=`
|
||
`,M=v),c+=L,P<R?(c+=" ",M-=O):M-=w}C<p&&(c+=`
|
||
`)}return c},getWrappedText:function(u){u===void 0&&(u=this._text),this.style.syncFont(this.canvas,this.context);var f=this.runWordWrap(u);return f.split(this.splitRegExp)},setText:function(u){return!u&&u!==0&&(u=""),Array.isArray(u)&&(u=u.join(`
|
||
`)),u!==this._text&&(this._text=u.toString(),this.updateText()),this},appendText:function(u,f){f===void 0&&(f=!0),!u&&u!==0&&(u=""),Array.isArray(u)&&(u=u.join(`
|
||
`)),u=u.toString();var v=this._text.concat(f?`
|
||
`+u:u);return v!==this._text&&(this._text=v,this.updateText()),this},setStyle:function(u){return this.style.setStyle(u)},setFont:function(u){return this.style.setFont(u)},setFontFamily:function(u){return this.style.setFontFamily(u)},setFontSize:function(u){return this.style.setFontSize(u)},setFontStyle:function(u){return this.style.setFontStyle(u)},setFixedSize:function(u,f){return this.style.setFixedSize(u,f)},setBackgroundColor:function(u){return this.style.setBackgroundColor(u)},setFill:function(u){return this.style.setFill(u)},setColor:function(u){return this.style.setColor(u)},setStroke:function(u,f){return this.style.setStroke(u,f)},setShadow:function(u,f,v,c,g,p){return this.style.setShadow(u,f,v,c,g,p)},setShadowOffset:function(u,f){return this.style.setShadowOffset(u,f)},setShadowColor:function(u){return this.style.setShadowColor(u)},setShadowBlur:function(u){return this.style.setShadowBlur(u)},setShadowStroke:function(u){return this.style.setShadowStroke(u)},setShadowFill:function(u){return this.style.setShadowFill(u)},setWordWrapWidth:function(u,f){return this.style.setWordWrapWidth(u,f)},setWordWrapCallback:function(u,f){return this.style.setWordWrapCallback(u,f)},setAlign:function(u){return this.style.setAlign(u)},setResolution:function(u){return this.style.setResolution(u)},setLineSpacing:function(u){return this.lineSpacing=u,this.updateText()},setLetterSpacing:function(u){return this.letterSpacing=u,this.updateText()},setPadding:function(u,f,v,c){if(typeof u=="object"){var g=u,p=l(g,"x",null);p!==null?(u=p,v=p):(u=l(g,"left",0),v=l(g,"right",u));var T=l(g,"y",null);T!==null?(f=T,c=T):(f=l(g,"top",0),c=l(g,"bottom",f))}else u===void 0&&(u=0),f===void 0&&(f=u),v===void 0&&(v=u),c===void 0&&(c=f);return this.padding.left=u,this.padding.top=f,this.padding.right=v,this.padding.bottom=c,this.updateText()},setMaxLines:function(u){return this.style.setMaxLines(u)},setRTL:function(u){u===void 0&&(u=!0);var f=this.style;return f.rtl===u?this:(f.rtl=u,u?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",m(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),f.align==="left"?f.align="right":f.align==="right"&&(f.align="left"),this)},updateText:function(){var u=this.canvas,f=this.context,v=this.style,c=v.resolution,g=v.metrics;v.syncFont(u,f);var p=this._text;(v.wordWrapWidth||v.wordWrapCallback)&&(p=this.runWordWrap(this._text));var T=p.split(this.splitRegExp),C=e(this,g,T),M=this.padding,A;v.fixedWidth===0?(this.width=C.width+M.left+M.right,A=C.width):(this.width=v.fixedWidth,A=this.width-M.left-M.right,A<C.width&&(A=C.width)),v.fixedHeight===0?this.height=C.height+M.top+M.bottom:this.height=v.fixedHeight;var R=this.width,P=this.height;this.updateDisplayOrigin(),R*=c,P*=c,R=Math.max(R,1),P=Math.max(P,1),u.width!==R||u.height!==P?(u.width=R,u.height=P,this.frame.setSize(R,P),this.frame.source.updateSize(R,P),this.frame.source.resolution=c,this.frame.updateUVs(),v.syncFont(u,f),v.rtl&&(f.direction="rtl")):f.clearRect(0,0,R,P),f.save(),f.scale(c,c),v.backgroundColor&&(f.fillStyle=v.backgroundColor,f.fillRect(0,0,R,P)),v.syncStyle(u,f),f.translate(M.left,M.top);for(var L,F,w=0;w<C.lines;w++){if(L=v.strokeThickness/2,F=v.strokeThickness/2+w*C.lineHeight+g.ascent,w>0&&(F+=C.lineSpacing*w),v.rtl)L=R-L-M.left-M.right;else if(v.align==="right")L+=A-C.lineWidths[w];else if(v.align==="center")L+=(A-C.lineWidths[w])/2;else if(v.align==="justify"){var O=.85;if(C.lineWidths[w]/C.width>=O){var B=C.width-C.lineWidths[w],I=f.measureText(" ").width,D=T[w].trim(),N=D.split(" ");B+=(T[w].length-D.length)*I;for(var z=Math.floor(B/I),V=0;z>0;)N[V]+=" ",V=(V+1)%(N.length-1||1),--z;T[w]=N.join(" ")}}this.autoRound&&(L=Math.round(L),F=Math.round(F));var U=this.letterSpacing;if(v.strokeThickness&&U===0&&(v.syncShadow(f,v.shadowStroke),f.strokeText(T[w],L,F)),v.color)if(v.syncShadow(f,v.shadowFill),U!==0)for(var G=0,b=T[w].split(""),Y=0;Y<b.length;Y++)v.strokeThickness&&(v.syncShadow(f,v.shadowStroke),f.strokeText(b[Y],L+G,F),v.syncShadow(f,v.shadowFill)),f.fillText(b[Y],L+G,F),G+=f.measureText(b[Y]).width+U;else f.fillText(T[w],L,F)}f.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(u,this.frame.source.glTexture,!0));var W=this.input;return W&&!W.customHitArea&&(W.hitArea.width=this.width,W.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(u){this.setText(u)}},toJSON:function(){var u=d.ToJSON(this),f={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 u.data=f,u},preDestroy:function(){i(this.canvas),S.remove(this.canvas);var u=this.texture;u&&u.destroy()}});E.exports=a},79724:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){m.width===0||m.height===0||(S.addToRenderList(m),n.batchSprite(m,m.frame,S,x))};E.exports=y},71259:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(50171);S.register("text",function(d,t){d===void 0&&(d={});var e=x(d,"text",""),l=x(d,"style",null),i=x(d,"padding",null);i!==null&&(l.padding=i);var s=new h(this.scene,0,0,e,l);return t!==void 0&&(d.add=t),m(this.scene,s,d),s.autoRound=x(d,"autoRound",!0),s.resolution=x(d,"resolution",1),s})},68005:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(50171),S=n(39429);S.register("text",function(x,h,d,t){return this.displayList.add(new m(this.scene,x,h,d,t))})},61771:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(34397),x=n(79724),E.exports={renderWebGL:S,renderCanvas:x}},35762:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23568),x=n(35154),h=n(79557),d={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]},t=new m({initialize:function(l,i){this.parent=l,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(e,l,i){l===void 0&&(l=!0),i===void 0&&(i=!1);for(var s in d){var r=i?d[s][1]:this[s];s==="wordWrapCallback"||s==="wordWrapCallbackScope"?this[s]=x(e,d[s][0],r):e&&s==="fontSize"&&typeof e.fontSize=="number"?this[s]=e.fontSize.toString()+"px":this[s]=S(e,d[s][0],r)}var o=x(e,"font",null);o!==null&&this.setFont(o,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var a=x(e,"fill",null);a!==null&&(this.color=a);var u=x(e,"metrics",!1);return u?this.metrics={ascent:x(u,"ascent",0),descent:x(u,"descent",0),fontSize:x(u,"fontSize",0)}:(l||!this.metrics)&&(this.metrics=h(this)),l?this.parent.updateText():this.parent},syncFont:function(e,l){l.font=this._font},syncStyle:function(e,l){l.textBaseline="alphabetic",l.fillStyle=this.color,l.strokeStyle=this.stroke,l.lineWidth=this.strokeThickness,l.lineCap="round",l.lineJoin="round"},syncShadow:function(e,l){l?(e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY,e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur):(e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowColor=0,e.shadowBlur=0)},update:function(e){return e&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=h(this)),this.parent.updateText()},setFont:function(e,l){l===void 0&&(l=!0);var i=e,s="",r="";if(typeof e!="string")i=x(e,"fontFamily","Courier"),s=x(e,"fontSize","16px"),r=x(e,"fontStyle","");else{var o=e.split(" "),a=0;r=o.length>2?o[a++]:"",s=o[a++]||"16px",i=o[a++]||"Courier"}return(i!==this.fontFamily||s!==this.fontSize||r!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=s,this.fontStyle=r,l&&this.update(!0)),this.parent},setFontFamily:function(e){return this.fontFamily!==e&&(this.fontFamily=e,this.update(!0)),this.parent},setFontStyle:function(e){return this.fontStyle!==e&&(this.fontStyle=e,this.update(!0)),this.parent},setFontSize:function(e){return typeof e=="number"&&(e=e.toString()+"px"),this.fontSize!==e&&(this.fontSize=e,this.update(!0)),this.parent},setTestString:function(e){return this.testString=e,this.update(!0)},setFixedSize:function(e,l){return this.fixedWidth=e,this.fixedHeight=l,e&&(this.parent.width=e),l&&(this.parent.height=l),this.update(!1)},setBackgroundColor:function(e){return this.backgroundColor=e,this.update(!1)},setFill:function(e){return this.color=e,this.update(!1)},setColor:function(e){return this.color=e,this.update(!1)},setResolution:function(e){return this.resolution=e,this.update(!1)},setStroke:function(e,l){return l===void 0&&(l=this.strokeThickness),e===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==e||this.strokeThickness!==l)&&(this.stroke=e,this.strokeThickness=l,this.update(!0)),this.parent},setShadow:function(e,l,i,s,r,o){return e===void 0&&(e=0),l===void 0&&(l=0),i===void 0&&(i="#000"),s===void 0&&(s=0),r===void 0&&(r=!1),o===void 0&&(o=!0),this.shadowOffsetX=e,this.shadowOffsetY=l,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=r,this.shadowFill=o,this.update(!1)},setShadowOffset:function(e,l){return e===void 0&&(e=0),l===void 0&&(l=e),this.shadowOffsetX=e,this.shadowOffsetY=l,this.update(!1)},setShadowColor:function(e){return e===void 0&&(e="#000"),this.shadowColor=e,this.update(!1)},setShadowBlur:function(e){return e===void 0&&(e=0),this.shadowBlur=e,this.update(!1)},setShadowStroke:function(e){return this.shadowStroke=e,this.update(!1)},setShadowFill:function(e){return this.shadowFill=e,this.update(!1)},setWordWrapWidth:function(e,l){return l===void 0&&(l=!1),this.wordWrapWidth=e,this.wordWrapUseAdvanced=l,this.update(!1)},setWordWrapCallback:function(e,l){return l===void 0&&(l=null),this.wordWrapCallback=e,this.wordWrapCallbackScope=l,this.update(!1)},setAlign:function(e){return e===void 0&&(e="left"),this.align=e,this.update(!1)},setMaxLines:function(e){return e===void 0&&(e=0),this.maxLines=e,this.update(!1)},getTextMetrics:function(){var e=this.metrics;return{ascent:e.ascent,descent:e.descent,fontSize:e.fontSize}},toJSON:function(){var e={};for(var l in d)e[l]=this[l];return e.metrics=this.getTextMetrics(),e},destroy:function(){this.parent=void 0}});E.exports=t},34397:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){if(!(m.width===0||m.height===0)){S.camera.addToRenderList(m);var h=m.customRenderNodes,d=m.defaultRenderNodes;(h.Submitter||d.Submitter).run(S,m,x,0,h.Texturer||d.Texturer,h.Transformer||d.Transformer)}};E.exports=y},20839:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(9674),S=n(27919),x=n(41571),h=n(83419),d=n(31401),t=n(95643),e=n(68703),l=n(56295),i=n(45650),s=n(26099),r=8,o=new h({Extends:t,Mixins:[d.Alpha,d.BlendMode,d.ComputedSize,d.Depth,d.Flip,d.GetBounds,d.Lighting,d.Mask,d.Origin,d.RenderNodes,d.ScrollFactor,d.Texture,d.Tint,d.Transform,d.Visible,l],initialize:function(u,f,v,c,g,p,T){var C=u.sys.renderer,M=C&&!C.gl;t.call(this,u,"TileSprite");var A=u.sys.textures.get(p),R=A.get(T);c=c?Math.floor(c):R.width,g=g?Math.floor(g):R.height,this._tilePosition=new s,this._tileScale=new s(1,1),this._tileRotation=0,this.dirty=!1,this.renderer=C,this.canvas=M?S.create(this,c,g):null,this.context=M?this.canvas.getContext("2d",{willReadFrequently:!1}):null,this._displayTextureKey=i(),this.displayTexture=M?u.sys.textures.addCanvas(this._displayTextureKey,this.canvas):null,this.displayFrame=this.displayTexture?this.displayTexture.get():null,this.currentFrame=null,this.fillCanvas=M?S.create2D(this,R.width,this.displayFrame.height):null,this.fillContext=this.fillCanvas?this.fillCanvas.getContext("2d",{willReadFrequently:!1}):null,this.fillPattern=null,this.anims=new m(this),this.setTexture(p,T),this.setPosition(f,v),this.setSize(c,g),this.setOrigin(.5,.5),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return x}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(a,u){this.anims.update(a,u)},setFrame:function(a){var u=this.texture.get(a);return!u.cutWidth||!u.cutHeight?this.renderFlags&=~r:this.renderFlags|=r,this.frame=u,this.dirty=!0,this},setSizeToFrame:function(){return this},setTilePosition:function(a,u){return a!==void 0&&(this.tilePositionX=a),u!==void 0&&(this.tilePositionY=u),this},setTileRotation:function(a){return a===void 0&&(a=0),this.tileRotation=a,this},setTileScale:function(a,u){return a===void 0&&(a=this.tileScaleX),u===void 0&&(u=a),this.tileScaleX=a,this.tileScaleY=u,this},updateTileTexture:function(){if(!(!this.renderer||this.renderer.gl)){var a=this.frame,u=this.fillContext,f=this.fillCanvas,v=a.cutWidth,c=a.cutHeight;u.clearRect(0,0,v,c),f.width=v,f.height=c,u.drawImage(a.source.image,a.cutX,a.cutY,a.cutWidth,a.cutHeight,0,0,v,c),this.fillPattern=u.createPattern(f,"repeat"),this.currentFrame=a}},updateCanvas:function(){var a=this.canvas,u=this.width,f=this.height,v=this.currentFrame!==this.frame;if((a.width!==u||a.height!==f||v)&&(a.width=u,a.height=f,this.displayFrame.setSize(u,f),this.updateDisplayOrigin(),v&&this.updateTileTexture(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var c=this.context;this.scene.sys.game.config.antialias||e.disable(c);var g=this._tileScale.x,p=this._tileScale.y,T=this._tilePosition.x,C=this._tilePosition.y;c.clearRect(0,0,u,f),c.save(),c.rotate(this._tileRotation),c.scale(g,p),c.translate(-T,-C),c.fillStyle=this.fillPattern;var M=Math.max(u,Math.abs(u/g)),A=Math.max(f,Math.abs(f/p)),R=Math.sqrt(M*M+A*A);c.fillRect(T-R,C-R,2*R,2*R),c.restore(),this.dirty=!1},preDestroy:function(){this.canvas&&S.remove(this.canvas),this.fillCanvas&&S.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.renderer=null,this.anims.destroy(),this.anims=void 0},tilePositionX:{get:function(){return this._tilePosition.x},set:function(a){this._tilePosition.x=a,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(a){this._tilePosition.y=a,this.dirty=!0}},tileRotation:{get:function(){return this._tileRotation},set:function(a){this._tileRotation=a,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(a){this._tileScale.x=a,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(a){this._tileScale.y=a,this.dirty=!0}}});E.exports=o},46992:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){m.updateCanvas(),S.addToRenderList(m),n.batchSprite(m,m.displayFrame,S,x)};E.exports=y},14167:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(20839);S.register("tileSprite",function(d,t){d===void 0&&(d={});var e=x(d,"x",0),l=x(d,"y",0),i=x(d,"width",512),s=x(d,"height",512),r=x(d,"key",""),o=x(d,"frame",""),a=new h(this.scene,e,l,i,s,r,o);return t!==void 0&&(d.add=t),m(this.scene,a,d),a})},91681:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20839),S=n(39429);S.register("tileSprite",function(x,h,d,t,e,l){return this.displayList.add(new m(this.scene,x,h,d,t,e,l))})},56295:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(18553),x=n(46992),E.exports={renderWebGL:S,renderCanvas:x}},18553:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=m.width,d=m.height;if(!(h===0||d===0)){var t=S.camera;t.addToRenderList(m);var e=m.customRenderNodes,l=m.defaultRenderNodes;(e.Submitter||l.Submitter).run(S,m,x,0,e.Texturer||l.Texturer,e.Transformer||l.Transformer)}};E.exports=y},18471:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(40939),x=n(83419),h=n(31401),d=n(51708),t=n(8443),e=n(95643),l=n(36383),i=n(14463),s=n(45650),r=n(10247),o=new x({Extends:e,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Lighting,h.Mask,h.Origin,h.RenderNodes,h.ScrollFactor,h.TextureCrop,h.Tint,h.Transform,h.Visible,r],initialize:function(u,f,v,c){e.call(this,u,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.glFlipY=!0,this._key=s(),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=u.sys.game;this._device=g.device.video,this.setPosition(f,v),this.setSize(256,256),this.initRenderNodes(this._defaultRenderNodesMap),g.events.on(t.PAUSE,this.globalPause,this),g.events.on(t.RESUME,this.globalResume,this);var p=u.sys.sound;p&&p.on(i.GLOBAL_MUTE,this.globalMute,this),c&&this.load(c)},_defaultRenderNodesMap:{get:function(){return S}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(a){var u=this.scene.sys.cache.video.get(a);return u?(this.cacheKey=a,this.loadHandler(u.url,u.noAudio,u.crossOrigin)):console.warn("No video in cache for key: "+a),this},changeSource:function(a,u,f,v,c){u===void 0&&(u=!0),f===void 0&&(f=!1),this.cacheKey!==a&&(this.load(a),u&&this.play(f,v,c))},getVideoKey:function(){return this.cacheKey},loadURL:function(a,u,f){u===void 0&&(u=!1);var v=this._device.getVideoURL(a);return v?(this.cacheKey="",this.loadHandler(v.url,u,f)):console.warn("No supported video format found for "+a),this},loadMediaStream:function(a,u,f){return this.loadHandler(null,u,f,a)},loadHandler:function(a,u,f,v){u||(u=!1);var c=this.video;if(c?(this.removeLoadEventHandlers(),this.stop()):(c=document.createElement("video"),c.controls=!1,c.setAttribute("playsinline","playsinline"),c.setAttribute("preload","auto"),c.setAttribute("disablePictureInPicture","true")),u?(c.muted=!0,c.defaultMuted=!0,c.setAttribute("autoplay","autoplay")):(c.muted=!1,c.defaultMuted=!1,c.removeAttribute("autoplay")),f?c.setAttribute("crossorigin",f):c.removeAttribute("crossorigin"),v)if("srcObject"in c)try{c.srcObject=v}catch(p){if(p.name!=="TypeError")throw p;c.src=URL.createObjectURL(v)}else c.src=URL.createObjectURL(v);else c.src=a;this.retry=0,this.video=c,this._playCalled=!1,c.load(),this.addLoadEventHandlers();var g=this.scene.sys.textures.get(this._key);return this.setTexture(g),this},requestVideoFrame:function(a,u){var f=this.video;if(f){var v=u.width,c=u.height,g=this.videoTexture,p=this.videoTextureSource,T=!g||p.source!==f;T?(this._codePaused=f.paused,this._codeMuted=f.muted,g?(p.source=f,p.width=v,p.height=c,g.get().setSize(v,c)):(g=this.scene.sys.textures.create(this._key,f,v,c),g.add("__BASE",0,0,0,v,c),this.setTexture(g),this.videoTexture=g,this.videoTextureSource=g.source[0],this.videoTextureSource.setFlipY(this.glFlipY),this.emit(d.VIDEO_TEXTURE,this,g)),this.setSizeToFrame(),this.updateDisplayOrigin()):p.update(),this.isStalled=!1,this.metadata=u;var C=u.mediaTime;T&&(this._lastUpdate=C,this.emit(d.VIDEO_CREATED,this,v,c),this.frameReady||(this.frameReady=!0,this.emit(d.VIDEO_PLAY,this))),this._playingMarker?C>=this._markerOut&&(f.loop?(f.currentTime=this._markerIn,this.emit(d.VIDEO_LOOP,this)):(this.stop(!1),this.emit(d.VIDEO_COMPLETE,this))):C<this._lastUpdate&&this.emit(d.VIDEO_LOOP,this),this._lastUpdate=C,this._getFrame?(this.removeEventHandlers(),f.pause(),this._getFrame=!1):this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(a,u,f){u===void 0&&(u=-1),f===void 0&&(f=l.MAX_SAFE_INTEGER);var v=this.video;return!v||this.isPlaying()?(v||console.warn("Video not loaded"),this):(a===void 0&&(a=v.loop),v.loop=a,this._markerIn=u,this._markerOut=f,this._playingMarker=u>-1&&f>u&&f<l.MAX_SAFE_INTEGER,this._playCalled||(this._getFrame=!1,this._rfvCallbackId=v.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this._playCalled=!0,this.createPlayPromise()),this)},getFirstFrame:function(){var a=this.video;return!a||this.isPlaying()?(a||console.warn("Video not loaded"),this):(this._playCalled||(this._getFrame=!0,this._rfvCallbackId=a.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this.createPlayPromise()),this)},addLoadEventHandlers:function(){var a=this.video;a&&(a.addEventListener("error",this._loadCallbackHandler),a.addEventListener("abort",this._loadCallbackHandler),a.addEventListener("loadedmetadata",this._metadataCallbackHandler))},removeLoadEventHandlers:function(){var a=this.video;a&&(a.removeEventListener("error",this._loadCallbackHandler),a.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var a=this.video;if(a){var u=this._callbacks;for(var f in u)a.addEventListener(f,u[f])}},removeEventHandlers:function(){var a=this.video;if(a){var u=this._callbacks;for(var f in u)a.removeEventListener(f,u[f])}},createPlayPromise:function(a){a===void 0&&(a=!0);var u=this.video,f=u.play();if(f!==void 0){var v=this.playSuccess.bind(this),c=this.playError.bind(this);if(!a){var g=this;c=function(){g.failedPlayAttempts++}}f.then(v).catch(c)}else u.addEventListener("playing",this._callbacks.legacy),a||this.failedPlayAttempts++},addMarker:function(a,u,f){return!isNaN(u)&&u>=0&&!isNaN(f)&&f>u&&(this.markers[a]=[u,f]),this},playMarker:function(a,u){var f=this.markers[a];return f&&this.play(u,f[0],f[1]),this},removeMarker:function(a){return delete this.markers[a],this},snapshot:function(a,u){return a===void 0&&(a=this.width),u===void 0&&(u=this.height),this.snapshotArea(0,0,this.width,this.height,a,u)},snapshotArea:function(a,u,f,v,c,g){a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=this.width),v===void 0&&(v=this.height),c===void 0&&(c=f),g===void 0&&(g=v);var p=this.video,T=this.snapshotTexture;return T?(T.setSize(c,g),p&&T.context.drawImage(p,a,u,f,v,0,0,c,g)):(T=this.scene.sys.textures.createCanvas(s(),c,g),this.snapshotTexture=T,p&&T.context.drawImage(p,a,u,f,v,0,0,c,g)),T.update()},saveSnapshotTexture:function(a){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,a):this.snapshotTexture=this.scene.sys.textures.createCanvas(a,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(d.VIDEO_UNLOCKED,this));var a=this.scene.sys.sound;a&&a.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(a){var u=a.name;u==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(d.VIDEO_LOCKED,this)):u==="NotSupportedError"?(this.stop(!1),this.emit(d.VIDEO_UNSUPPORTED,this,a)):(this.stop(!1),this.emit(d.VIDEO_ERROR,this,a))},legacyPlayHandler:function(){var a=this.video;a&&(this.playSuccess(),a.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(d.VIDEO_PLAYING,this)},loadErrorHandler:function(a){this.stop(!1),this.emit(d.VIDEO_ERROR,this,a)},metadataHandler:function(a){this.emit(d.VIDEO_METADATA,this,a)},setSizeToFrame:function(a){a||(a=this.frame),this.width=a.realWidth,this.height=a.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=this.width,u.hitArea.height=this.height),this},stalledHandler:function(a){this.isStalled=!0,this.emit(d.VIDEO_STALLED,this,a)},completeHandler:function(){this._playCalled=!1,this.emit(d.VIDEO_COMPLETE,this)},preUpdate:function(a,u){var f=this.video;!f||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=u,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(a){var u=this.video;if(u){var f=u.duration;if(f!==1/0&&!isNaN(f)){var v=f*a;this.setCurrentTime(v)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(a){var u=this.video;if(u){if(typeof a=="string"){var f=a[0],v=parseFloat(a.substr(1));f==="+"?a=u.currentTime+v:f==="-"&&(a=u.currentTime-v)}u.currentTime=a}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(d.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(d.VIDEO_SEEKED,this)},getProgress:function(){var a=this.video;if(a){var u=a.duration;if(u!==1/0&&!isNaN(u))return a.currentTime/u}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(a){a===void 0&&(a=!0),this._codeMuted=a;var u=this.video;return u&&(u.muted=this._systemMuted?!0:a),this},isMuted:function(){return this._codeMuted},globalMute:function(a,u){this._systemMuted=u;var f=this.video;f&&(f.muted=this._codeMuted?!0:u)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(a){a===void 0&&(a=!0);var u=this.video;return this._codePaused=a,u&&!u.ended&&(a?u.paused||(this.removeEventHandlers(),u.pause()):a||(this._playCalled?u.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(a){return a===void 0&&(a=1),this.video&&(this.video.volume=m(a,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(a){return this.video&&(this.video.playbackRate=a),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(a){return a===void 0&&(a=!0),this.video&&(this.video.loop=a),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(a,u){return u===void 0&&(u=!0),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,a),this.videoTextureSource.setFlipY(u)),this._key=a,this.glFlipY=u,!!this.videoTexture},stop:function(a){a===void 0&&(a=!0);var u=this.video;return u&&(this.removeEventHandlers(),u.cancelVideoFrameCallback(this._rfvCallbackId),u.pause()),this.retry=0,this._playCalled=!1,a&&this.emit(d.VIDEO_STOP,this),this},removeVideoElement:function(){var a=this.video;if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("autoplay"),a.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var a=this.scene.sys.game.events;a.off(t.PAUSE,this.globalPause,this),a.off(t.RESUME,this.globalResume,this);var u=this.scene.sys.sound;u&&u.off(i.GLOBAL_MUTE,this.globalMute,this)}});E.exports=o},58352:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){m.videoTexture&&(S.addToRenderList(m),n.batchSprite(m,m.frame,S,x))};E.exports=y},11511:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25305),S=n(44603),x=n(23568),h=n(18471);S.register("video",function(d,t){d===void 0&&(d={});var e=x(d,"key",null),l=new h(this.scene,0,0,e);return t!==void 0&&(d.add=t),m(this.scene,l,d),l})},89025:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(18471),S=n(39429);S.register("video",function(x,h,d){return this.displayList.add(new m(this.scene,x,h,d))})},10247:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(29849),x=n(58352),E.exports={renderWebGL:S,renderCanvas:x}},29849:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){if(m.videoTexture){S.camera.addToRenderList(m);var h=m.customRenderNodes,d=m.defaultRenderNodes;(h.Submitter||d.Submitter).run(S,m,x,0,h.Texturer||d.Texturer,h.Transformer||d.Transformer)}};E.exports=y},41481:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10312),S=n(96503),x=n(87902),h=n(83419),d=n(31401),t=n(95643),e=n(87841),l=n(37303),i=new h({Extends:t,Mixins:[d.Depth,d.GetBounds,d.Origin,d.Transform,d.ScrollFactor,d.Visible],initialize:function(r,o,a,u,f){u===void 0&&(u=1),f===void 0&&(f=u),t.call(this,r,"Zone"),this.setPosition(o,a),this.width=u,this.height=f,this.blendMode=m.NORMAL,this.updateDisplayOrigin()},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,r,o){o===void 0&&(o=!0),this.width=s,this.height=r,this.updateDisplayOrigin();var a=this.input;return o&&a&&!a.customHitArea&&(a.hitArea.width=s,a.hitArea.height=r),this},setDisplaySize:function(s,r){return this.displayWidth=s,this.displayHeight=r,this},setCircleDropZone:function(s){return this.setDropZone(new S(0,0,s),x)},setRectangleDropZone:function(s,r){return this.setDropZone(new e(0,0,s,r),l)},setDropZone:function(s,r){return this.input||this.setInteractive(s,r,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(s,r,o){o.addToRenderList(r)},renderWebGL:function(s,r,o){o.camera.addToRenderList(r)}});E.exports=i},95261:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(44603),S=n(23568),x=n(41481);m.register("zone",function(h){var d=S(h,"x",0),t=S(h,"y",0),e=S(h,"width",1),l=S(h,"height",e);return new x(this.scene,d,t,e,l)})},84175:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(41481),S=n(39429);S.register("zone",function(x,h,d,t){return this.displayList.add(new m(this.scene,x,h,d,t))})},95166:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.radius>0?Math.PI*n.radius*n.radius:0};E.exports=y},96503:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(87902),x=n(26241),h=n(79124),d=n(23777),t=n(28176),e=new m({initialize:function(i,s,r){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=0),this.type=d.CIRCLE,this.x=i,this.y=s,this._radius=r,this._diameter=r*2},contains:function(l,i){return S(this,l,i)},getPoint:function(l,i){return x(this,l,i)},getPoints:function(l,i,s){return h(this,l,i,s)},getRandomPoint:function(l){return t(this,l)},setTo:function(l,i,s){return this.x=l,this.y=i,this._radius=s,this._diameter=s*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(l,i){return i===void 0&&(i=l),this.x=l,this.y=i,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(l){this._radius=l,this._diameter=l*2}},diameter:{get:function(){return this._diameter},set:function(l){this._diameter=l,this._radius=l*.5}},left:{get:function(){return this.x-this._radius},set:function(l){this.x=l+this._radius}},right:{get:function(){return this.x+this._radius},set:function(l){this.x=l-this._radius}},top:{get:function(){return this.y-this._radius},set:function(l){this.y=l+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(l){this.y=l-this._radius}}});E.exports=e},71562:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return 2*(Math.PI*n.radius)};E.exports=y},92110:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d){return d===void 0&&(d=new m),d.x=x.x+x.radius*Math.cos(h),d.y=x.y+x.radius*Math.sin(h),d};E.exports=S},42250:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(96503),S=function(x){return new m(x.x,x.y,x.radius)};E.exports=S},87902:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(n.radius>0&&m>=n.left&&m<=n.right&&S>=n.top&&S<=n.bottom){var x=(n.x-m)*(n.x-m),h=(n.y-S)*(n.y-S);return x+h<=n.radius*n.radius}else return!1};E.exports=y},5698:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87902),S=function(x,h){return m(x,h.x,h.y)};E.exports=S},70588:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87902),S=function(x,h){return m(x,h.x,h.y)&&m(x,h.right,h.y)&&m(x,h.x,h.bottom)&&m(x,h.right,h.bottom)};E.exports=S},26394:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m.setTo(n.x,n.y,n.radius)};E.exports=y},76278:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x===m.x&&n.y===m.y&&n.radius===m.radius};E.exports=y},2074:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=function(x,h){return h===void 0&&(h=new m),h.x=x.left,h.y=x.top,h.width=x.diameter,h.height=x.diameter,h};E.exports=S},26241:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(92110),S=n(62945),x=n(36383),h=n(26099),d=function(t,e,l){l===void 0&&(l=new h);var i=S(e,0,x.TAU);return m(t,i,l)};E.exports=d},79124:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(71562),S=n(92110),x=n(62945),h=n(36383),d=function(t,e,l,i){i===void 0&&(i=[]),!e&&l>0&&(e=m(t)/l);for(var s=0;s<e;s++){var r=x(s/e,0,h.TAU);i.push(S(t,r))}return i};E.exports=d},50884:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n.x+=m,n.y+=S,n};E.exports=y},39212:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x+=m.x,n.y+=m.y,n};E.exports=y},28176:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){h===void 0&&(h=new m);var d=2*Math.PI*Math.random(),t=Math.random()+Math.random(),e=t>1?2-t:t,l=e*Math.cos(d),i=e*Math.sin(d);return h.x=x.x+l*x.radius,h.y=x.y+i*x.radius,h};E.exports=S},88911:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(96503);m.Area=n(95166),m.Circumference=n(71562),m.CircumferencePoint=n(92110),m.Clone=n(42250),m.Contains=n(87902),m.ContainsPoint=n(5698),m.ContainsRect=n(70588),m.CopyFrom=n(26394),m.Equals=n(76278),m.GetBounds=n(2074),m.GetPoint=n(26241),m.GetPoints=n(79124),m.Offset=n(50884),m.OffsetPoint=n(39212),m.Random=n(28176),E.exports=m},23777:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};E.exports=y},78874:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.isEmpty()?0:n.getMajorRadius()*n.getMinorRadius()*Math.PI};E.exports=y},92990:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=n.width/2,S=n.height/2,x=Math.pow(m-S,2)/Math.pow(m+S,2);return Math.PI*(m+S)*(1+3*x/(10+Math.sqrt(4-3*x)))};E.exports=y},79522:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d){d===void 0&&(d=new m);var t=x.width/2,e=x.height/2;return d.x=x.x+t*Math.cos(h),d.y=x.y+e*Math.sin(h),d};E.exports=S},58102:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8497),S=function(x){return new m(x.x,x.y,x.width,x.height)};E.exports=S},81154:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(n.width<=0||n.height<=0)return!1;var x=(m-n.x)/n.width,h=(S-n.y)/n.height;return x*=x,h*=h,x+h<.25};E.exports=y},46662:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(81154),S=function(x,h){return m(x,h.x,h.y)};E.exports=S},1632:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(81154),S=function(x,h){return m(x,h.x,h.y)&&m(x,h.right,h.y)&&m(x,h.x,h.bottom)&&m(x,h.right,h.bottom)};E.exports=S},65534:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m.setTo(n.x,n.y,n.width,n.height)};E.exports=y},8497:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(81154),x=n(90549),h=n(48320),d=n(23777),t=n(24820),e=new m({initialize:function(i,s,r,o){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=0),this.type=d.ELLIPSE,this.x=i,this.y=s,this.width=r,this.height=o},contains:function(l,i){return S(this,l,i)},getPoint:function(l,i){return x(this,l,i)},getPoints:function(l,i,s){return h(this,l,i,s)},getRandomPoint:function(l){return t(this,l)},setTo:function(l,i,s,r){return this.x=l,this.y=i,this.width=s,this.height=r,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(l,i){return i===void 0&&(i=l),this.x=l,this.y=i,this},setSize:function(l,i){return i===void 0&&(i=l),this.width=l,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(l){this.x=l+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(l){this.x=l-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(l){this.y=l+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(l){this.y=l-this.height/2}}});E.exports=e},36146:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x===m.x&&n.y===m.y&&n.width===m.width&&n.height===m.height};E.exports=y},23694:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=function(x,h){return h===void 0&&(h=new m),h.x=x.left,h.y=x.top,h.width=x.width,h.height=x.height,h};E.exports=S},90549:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(79522),S=n(62945),x=n(36383),h=n(26099),d=function(t,e,l){l===void 0&&(l=new h);var i=S(e,0,x.TAU);return m(t,i,l)};E.exports=d},48320:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(92990),S=n(79522),x=n(62945),h=n(36383),d=function(t,e,l,i){i===void 0&&(i=[]),!e&&l>0&&(e=m(t)/l);for(var s=0;s<e;s++){var r=x(s/e,0,h.TAU);i.push(S(t,r))}return i};E.exports=d},73424:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n.x+=m,n.y+=S,n};E.exports=y},44808:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x+=m.x,n.y+=m.y,n};E.exports=y},24820:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){h===void 0&&(h=new m);var d=Math.random()*Math.PI*2,t=Math.sqrt(Math.random());return h.x=x.x+t*Math.cos(d)*x.width/2,h.y=x.y+t*Math.sin(d)*x.height/2,h};E.exports=S},49203:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8497);m.Area=n(78874),m.Circumference=n(92990),m.CircumferencePoint=n(79522),m.Clone=n(58102),m.Contains=n(81154),m.ContainsPoint=n(46662),m.ContainsRect=n(1632),m.CopyFrom=n(65534),m.Equals=n(36146),m.GetBounds=n(23694),m.GetPoint=n(90549),m.GetPoints=n(48320),m.Offset=n(73424),m.OffsetPoint=n(44808),m.Random=n(24820),E.exports=m},55738:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(23777),S=n(79291),x={Circle:n(88911),Ellipse:n(49203),Intersects:n(91865),Line:n(2529),Polygon:n(58423),Rectangle:n(93232),Triangle:n(84435)};x=S(!1,x,m),E.exports=x},2044:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20339),S=function(x,h){return m(x.x,x.y,h.x,h.y)<=x.radius+h.radius};E.exports=S},81491:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=m.width/2,x=m.height/2,h=Math.abs(n.x-m.x-S),d=Math.abs(n.y-m.y-x),t=S+n.radius,e=x+n.radius;if(h>t||d>e)return!1;if(h<=S||d<=x)return!0;var l=h-S,i=d-x,s=l*l,r=i*i,o=n.radius*n.radius;return s+r<=o};E.exports=y},63376:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=n(2044),x=function(h,d,t){if(t===void 0&&(t=[]),S(h,d)){var e=h.x,l=h.y,i=h.radius,s=d.x,r=d.y,o=d.radius,a,u,f,v,c;if(l===r)c=(o*o-i*i-s*s+e*e)/(2*(e-s)),a=1,u=-2*r,f=s*s+c*c-2*s*c+r*r-o*o,v=u*u-4*a*f,v===0?t.push(new m(c,-u/(2*a))):v>0&&(t.push(new m(c,(-u+Math.sqrt(v))/(2*a))),t.push(new m(c,(-u-Math.sqrt(v))/(2*a))));else{var g=(e-s)/(l-r),p=(o*o-i*i-s*s+e*e-r*r+l*l)/(2*(l-r));a=g*g+1,u=2*l*g-2*p*g-2*e,f=e*e+l*l+p*p-i*i-2*l*p,v=u*u-4*a*f,v===0?(c=-u/(2*a),t.push(new m(c,p-c*g))):v>0&&(c=(-u+Math.sqrt(v))/(2*a),t.push(new m(c,p-c*g)),c=(-u-Math.sqrt(v))/(2*a),t.push(new m(c,p-c*g)))}}return t};E.exports=x},97439:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(4042),S=n(81491),x=function(h,d,t){if(t===void 0&&(t=[]),S(h,d)){var e=d.getLineA(),l=d.getLineB(),i=d.getLineC(),s=d.getLineD();m(e,h,t),m(l,h,t),m(i,h,t),m(s,h,t)}return t};E.exports=x},4042:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=n(80462),x=function(h,d,t){if(t===void 0&&(t=[]),S(h,d)){var e=h.x1,l=h.y1,i=h.x2,s=h.y2,r=d.x,o=d.y,a=d.radius,u=i-e,f=s-l,v=e-r,c=l-o,g=u*u+f*f,p=2*(u*v+f*c),T=v*v+c*c-a*a,C=p*p-4*g*T,M,A;if(C===0){var R=-p/(2*g);M=e+R*u,A=l+R*f,R>=0&&R<=1&&t.push(new m(M,A))}else if(C>0){var P=(-p-Math.sqrt(C))/(2*g);M=e+P*u,A=l+P*f,P>=0&&P<=1&&t.push(new m(M,A));var L=(-p+Math.sqrt(C))/(2*g);M=e+L*u,A=l+L*f,L>=0&&L<=1&&t.push(new m(M,A))}}return t};E.exports=x},36100:(E,y,n)=>{/**
|
||
* @author Richard Davey
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25836),S=function(x,h,d,t){d===void 0&&(d=!1);var e=x.x1,l=x.y1,i=x.x2,s=x.y2,r=h.x1,o=h.y1,a=h.x2,u=h.y2,f=i-e,v=s-l,c=a-r,g=u-o,p=f*g-v*c;if(p===0)return null;var T,C,M;if(d){if(T=(f*(o-l)+v*(e-r))/(c*v-g*f),f!==0)C=(r+c*T-e)/f;else if(v!==0)C=(o+g*T-l)/v;else return null;if(C<0||T<0||T>1)return null;M=C}else{if(T=((r-e)*g-(o-l)*c)/p,C=((l-o)*f-(e-r)*v)/p,T<0||T>1||C<0||C>1)return null;M=T}return t===void 0&&(t=new m),t.set(e+f*M,l+v*M,M)};E.exports=S},3073:(E,y,n)=>{/**
|
||
* @author Richard Davey
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36100),S=n(23031),x=n(25836),h=new S,d=new x,t=function(e,l,i,s){i===void 0&&(i=!1),s===void 0&&(s=new x);var r=!1;s.set(),d.set();for(var o=l[l.length-1],a=0;a<l.length;a++){var u=l[a];h.setTo(o.x,o.y,u.x,u.y),o=u,m(e,h,i,d)&&(!r||d.z<s.z)&&(s.copy(d),r=!0)}return r?s:null};E.exports=t},56362:(E,y,n)=>{/**
|
||
* @author Richard Davey
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25836),S=n(61369),x=n(3073),h=new m,d=function(t,e,l,i){i===void 0&&(i=new S),Array.isArray(e)||(e=[e]);var s=!1;i.set(),h.set();for(var r=0;r<e.length;r++)x(t,e[r].points,l,h)&&(!s||h.z<i.z)&&(i.set(h.x,h.y,h.z,r),s=!0);return s?i:null};E.exports=d},60646:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=n(76112),x=n(92773),h=function(d,t,e){if(e===void 0&&(e=[]),x(d,t))for(var l=t.getLineA(),i=t.getLineB(),s=t.getLineC(),r=t.getLineD(),o=[new m,new m,new m,new m],a=[S(l,d,o[0]),S(i,d,o[1]),S(s,d,o[2]),S(r,d,o[3])],u=0;u<4;u++)a[u]&&e.push(o[u]);return e};E.exports=h},71147:(E,y,n)=>{/**
|
||
* @author Richard Davey
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61369),S=n(56362),x=n(23031),h=new x;function d(l,i,s,r,o){var a=Math.cos(l),u=Math.sin(l);h.setTo(i,s,i+a,s+u);var f=S(h,r,!0);f&&o.push(new m(f.x,f.y,l,f.w))}function t(l,i){return l.z-i.z}var e=function(l,i,s){Array.isArray(s)||(s=[s]);for(var r=[],o=[],a=0;a<s.length;a++)for(var u=s[a].points,f=0;f<u.length;f++){var v=Math.atan2(u[f].y-i,u[f].x-l);o.indexOf(v)===-1&&(d(v,l,i,s,r),d(v-1e-5,l,i,s,r),d(v+1e-5,l,i,s,r),o.push(v))}return r.sort(t)};E.exports=e},68389:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=n(59996),x=function(h,d,t){return t===void 0&&(t=new m),S(h,d)&&(t.x=Math.max(h.x,d.x),t.y=Math.max(h.y,d.y),t.width=Math.min(h.right,d.right)-t.x,t.height=Math.min(h.bottom,d.bottom)-t.y),t};E.exports=x},52784:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(60646),S=n(59996),x=function(h,d,t){if(t===void 0&&(t=[]),S(h,d)){var e=h.getLineA(),l=h.getLineB(),i=h.getLineC(),s=h.getLineD();m(e,d,t),m(l,d,t),m(i,d,t),m(s,d,t)}return t};E.exports=x},26341:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(89265),S=n(60646),x=function(h,d,t){if(t===void 0&&(t=[]),m(h,d)){var e=d.getLineA(),l=d.getLineB(),i=d.getLineC();S(e,h,t),S(l,h,t),S(i,h,t)}return t};E.exports=x},38720:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(4042),S=n(67636),x=function(h,d,t){if(t===void 0&&(t=[]),S(h,d)){var e=h.getLineA(),l=h.getLineB(),i=h.getLineC();m(e,d,t),m(l,d,t),m(i,d,t)}return t};E.exports=x},13882:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=n(2822),x=n(76112),h=function(d,t,e){if(e===void 0&&(e=[]),S(d,t))for(var l=d.getLineA(),i=d.getLineB(),s=d.getLineC(),r=[new m,new m,new m],o=[x(l,t,r[0]),x(i,t,r[1]),x(s,t,r[2])],a=0;a<3;a++)o[a]&&e.push(r[a]);return e};E.exports=h},75636:(E,y,n)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(82944),S=n(13882),x=function(h,d,t){if(t===void 0&&(t=[]),m(h,d)){var e=d.getLineA(),l=d.getLineB(),i=d.getLineC();S(h,e,t),S(h,l,t),S(h,i,t)}return t};E.exports=x},80462:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87902),S=n(26099),x=new S,h=function(d,t,e){if(e===void 0&&(e=x),m(t,d.x1,d.y1))return e.x=d.x1,e.y=d.y1,!0;if(m(t,d.x2,d.y2))return e.x=d.x2,e.y=d.y2,!0;var l=d.x2-d.x1,i=d.y2-d.y1,s=t.x-d.x1,r=t.y-d.y1,o=l*l+i*i,a=l,u=i;if(o>0){var f=(s*l+r*i)/o;a*=f,u*=f}e.x=d.x1+a,e.y=d.y1+u;var v=a*a+u*u;return v<=o&&a*l+u*i>=0&&m(t,e.x,e.y)};E.exports=h},76112:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=n.x1,h=n.y1,d=n.x2,t=n.y2,e=m.x1,l=m.y1,i=m.x2,s=m.y2;if(x===d&&h===t||e===i&&l===s)return!1;var r=(s-l)*(d-x)-(i-e)*(t-h);if(r===0)return!1;var o=((i-e)*(h-l)-(s-l)*(x-e))/r,a=((d-x)*(h-l)-(t-h)*(x-e))/r;return o<0||o>1||a<0||a>1?!1:(S&&(S.x=x+o*(d-x),S.y=h+o*(t-h)),!0)};E.exports=y},92773:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.x1,x=n.y1,h=n.x2,d=n.y2,t=m.x,e=m.y,l=m.right,i=m.bottom,s=0;if(S>=t&&S<=l&&x>=e&&x<=i||h>=t&&h<=l&&d>=e&&d<=i)return!0;if(S<t&&h>=t){if(s=x+(d-x)*(t-S)/(h-S),s>e&&s<=i)return!0}else if(S>l&&h<=l&&(s=x+(d-x)*(l-S)/(h-S),s>=e&&s<=i))return!0;if(x<e&&d>=e){if(s=S+(h-S)*(e-x)/(d-x),s>=t&&s<=l)return!0}else if(x>i&&d<=i&&(s=S+(h-S)*(i-x)/(d-x),s>=t&&s<=l))return!0;return!1};E.exports=y},16204:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Florian Mertens
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){S===void 0&&(S=1);var x=m.x1,h=m.y1,d=m.x2,t=m.y2,e=n.x,l=n.y,i=(d-x)*(d-x)+(t-h)*(t-h);if(i===0)return!1;var s=((e-x)*(d-x)+(l-h)*(t-h))/i;if(s<0)return Math.sqrt((x-e)*(x-e)+(h-l)*(h-l))<=S;if(s>=0&&s<=1){var r=((h-l)*(d-x)-(x-e)*(t-h))/i;return Math.abs(r)*Math.sqrt(i)<=S}else return Math.sqrt((d-e)*(d-e)+(t-l)*(t-l))<=S};E.exports=y},14199:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(16204),S=function(x,h){if(!m(x,h))return!1;var d=Math.min(h.x1,h.x2),t=Math.max(h.x1,h.x2),e=Math.min(h.y1,h.y2),l=Math.max(h.y1,h.y2);return x.x>=d&&x.x<=t&&x.y>=e&&x.y<=l};E.exports=S},59996:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.width<=0||n.height<=0||m.width<=0||m.height<=0?!1:!(n.right<m.x||n.bottom<m.y||n.x>m.right||n.y>m.bottom)};E.exports=y},89265:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(76112),S=n(37303),x=n(48653),h=n(77493),d=function(t,e){if(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)return!1;var l=e.getLineA(),i=e.getLineB(),s=e.getLineC();if(S(t,l.x1,l.y1)||S(t,l.x2,l.y2)||S(t,i.x1,i.y1)||S(t,i.x2,i.y2)||S(t,s.x1,s.y1)||S(t,s.x2,s.y2))return!0;var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),u=t.getLineD();if(m(l,r)||m(l,o)||m(l,a)||m(l,u)||m(i,r)||m(i,o)||m(i,a)||m(i,u)||m(s,r)||m(s,o)||m(s,a)||m(s,u))return!0;var f=h(t),v=x(e,f,!0);return v.length>0};E.exports=d},84411:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h,d){return d===void 0&&(d=0),!(m>n.right+d||S<n.left-d||x>n.bottom+d||h<n.top-d)};E.exports=y},67636:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(80462),S=n(10690),x=function(h,d){return h.left>d.right||h.right<d.left||h.top>d.bottom||h.bottom<d.top?!1:!!(S(h,d.x,d.y)||m(h.getLineA(),d)||m(h.getLineB(),d)||m(h.getLineC(),d))};E.exports=x},2822:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(76112),S=function(x,h){return!!(x.contains(h.x1,h.y1)||x.contains(h.x2,h.y2)||m(x.getLineA(),h)||m(x.getLineB(),h)||m(x.getLineC(),h))};E.exports=S},82944:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(48653),S=n(71694),x=n(76112),h=function(d,t){if(d.left>t.right||d.right<t.left||d.top>t.bottom||d.bottom<t.top)return!1;var e=d.getLineA(),l=d.getLineB(),i=d.getLineC(),s=t.getLineA(),r=t.getLineB(),o=t.getLineC();if(x(e,s)||x(e,r)||x(e,o)||x(l,s)||x(l,r)||x(l,o)||x(i,s)||x(i,r)||x(i,o))return!0;var a=S(d),u=m(t,a,!0);return u.length>0||(a=S(t),u=m(d,a,!0),u.length>0)};E.exports=h},91865:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CircleToCircle:n(2044),CircleToRectangle:n(81491),GetCircleToCircle:n(63376),GetCircleToRectangle:n(97439),GetLineToCircle:n(4042),GetLineToLine:n(36100),GetLineToPoints:n(3073),GetLineToPolygon:n(56362),GetLineToRectangle:n(60646),GetRaysFromPointToPolygon:n(71147),GetRectangleIntersection:n(68389),GetRectangleToRectangle:n(52784),GetRectangleToTriangle:n(26341),GetTriangleToCircle:n(38720),GetTriangleToLine:n(13882),GetTriangleToTriangle:n(75636),LineToCircle:n(80462),LineToLine:n(76112),LineToRectangle:n(92773),PointToLine:n(16204),PointToLineSegment:n(14199),RectangleToRectangle:n(59996),RectangleToTriangle:n(89265),RectangleToValues:n(84411),TriangleToCircle:n(67636),TriangleToLine:n(2822),TriangleToTriangle:n(82944)}},91938:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return Math.atan2(n.y2-n.y1,n.x2-n.x1)};E.exports=y},84993:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){m===void 0&&(m=1),S===void 0&&(S=[]);var x=Math.round(n.x1),h=Math.round(n.y1),d=Math.round(n.x2),t=Math.round(n.y2),e=Math.abs(d-x),l=Math.abs(t-h),i=x<d?1:-1,s=h<t?1:-1,r=e-l;S.push({x,y:h});for(var o=1;!(x===d&&h===t);){var a=r<<1;a>-l&&(r-=l,x+=i),a<e&&(r+=e,h+=s),o%m===0&&S.push({x,y:h}),o++}return S};E.exports=y},36469:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=m-(n.x1+n.x2)/2,h=S-(n.y1+n.y2)/2;return n.x1+=x,n.y1+=h,n.x2+=x,n.y2+=h,n};E.exports=y},31116:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(23031),S=function(x){return new m(x.x1,x.y1,x.x2,x.y2)};E.exports=S},59944:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m.setTo(n.x1,n.y1,n.x2,n.y2)};E.exports=y},59220:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x1===m.x1&&n.y1===m.y1&&n.x2===m.x2&&n.y2===m.y2};E.exports=y},78177:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35001),S=function(x,h,d){d===void 0&&(d=h);var t=m(x),e=x.x2-x.x1,l=x.y2-x.y1;return h&&(x.x1=x.x1-e/t*h,x.y1=x.y1-l/t*h),d&&(x.x2=x.x2+e/t*d,x.y2=x.y2+l/t*d),x};E.exports=S},26708:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(52816),S=n(6113),x=n(26099),h=function(d,t,e,l,i){l===void 0&&(l=0),i===void 0&&(i=[]);var s=[],r=d.x1,o=d.y1,a=d.x2-r,u=d.y2-o,f=S(t,i),v,c,g=e-1;for(v=0;v<g;v++)c=f(v/g),s.push(new x(r+a*c,o+u*c));if(c=f(1),s.push(new x(r+a*c,o+u*c)),l>0){var p=s[0],T=[p];for(v=1;v<s.length-1;v++){var C=s[v];m(p,C)>=l&&(T.push(C),p=C)}var M=s[s.length-1];return m(p,M)<l&&T.pop(),T.push(M),T}else return s};E.exports=h},32125:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){return h===void 0&&(h=new m),h.x=(x.x1+x.x2)/2,h.y=(x.y1+x.y2)/2,h};E.exports=S},99569:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Florian Mertens
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d){d===void 0&&(d=new m);var t=x.x1,e=x.y1,l=x.x2,i=x.y2,s=(l-t)*(l-t)+(i-e)*(i-e);if(s===0)return d;var r=((h.x-t)*(l-t)+(h.y-e)*(i-e))/s;return d.x=t+r*(l-t),d.y=e+r*(i-e),d};E.exports=S},34638:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=n(91938),x=n(26099),h=function(d,t){t===void 0&&(t=new x);var e=S(d)-m.PI_OVER_2;return t.x=Math.cos(e),t.y=Math.sin(e),t};E.exports=h},13151:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d){return d===void 0&&(d=new m),d.x=x.x1+(x.x2-x.x1)*h,d.y=x.y1+(x.y2-x.y1)*h,d};E.exports=S},15258:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35001),S=n(26099),x=function(h,d,t,e){e===void 0&&(e=[]),!d&&t>0&&(d=m(h)/t);for(var l=h.x1,i=h.y1,s=h.x2,r=h.y2,o=0;o<d;o++){var a=o/d,u=l+(s-l)*a,f=i+(r-i)*a;e.push(new S(u,f))}return e};E.exports=x},26408:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Florian Mertens
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.x1,x=n.y1,h=n.x2,d=n.y2,t=(h-S)*(h-S)+(d-x)*(d-x);if(t===0)return!1;var e=((x-m.y)*(h-S)-(S-m.x)*(d-x))/t;return Math.abs(e)*Math.sqrt(t)};E.exports=y},98770:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return Math.abs(n.y1-n.y2)};E.exports=y},35001:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return Math.sqrt((n.x2-n.x1)*(n.x2-n.x1)+(n.y2-n.y1)*(n.y2-n.y1))};E.exports=y},23031:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(13151),x=n(15258),h=n(23777),d=n(65822),t=n(26099),e=new m({initialize:function(i,s,r,o){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=0),this.type=h.LINE,this.x1=i,this.y1=s,this.x2=r,this.y2=o},getPoint:function(l,i){return S(this,l,i)},getPoints:function(l,i,s){return x(this,l,i,s)},getRandomPoint:function(l){return d(this,l)},setTo:function(l,i,s,r){return l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=0),this.x1=l,this.y1=i,this.x2=s,this.y2=r,this},setFromObjects:function(l,i){return this.x1=l.x,this.y1=l.y,this.x2=i.x,this.y2=i.y,this},getPointA:function(l){return l===void 0&&(l=new t),l.set(this.x1,this.y1),l},getPointB:function(l){return l===void 0&&(l=new t),l.set(this.x2,this.y2),l},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(l){this.x1<=this.x2?this.x1=l:this.x2=l}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(l){this.x1>this.x2?this.x1=l:this.x2=l}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(l){this.y1<=this.y2?this.y1=l:this.y2=l}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(l){this.y1>this.y2?this.y1=l:this.y2=l}}});E.exports=e},64795:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=n(15994),x=n(91938),h=function(d){var t=x(d)-m.PI_OVER_2;return S(t,-Math.PI,Math.PI)};E.exports=h},52616:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=n(91938),x=function(h){return Math.cos(S(h)-m.PI_OVER_2)};E.exports=x},87231:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=n(91938),x=function(h){return Math.sin(S(h)-m.PI_OVER_2)};E.exports=x},89662:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n.x1+=m,n.y1+=S,n.x2+=m,n.y2+=S,n};E.exports=y},71165:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return-((n.x2-n.x1)/(n.y2-n.y1))};E.exports=y},65822:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){h===void 0&&(h=new m);var d=Math.random();return h.x=x.x1+d*(x.x2-x.x1),h.y=x.y1+d*(x.y2-x.y1),h};E.exports=S},69777:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91938),S=n(64795),x=function(h,d){return 2*S(d)-Math.PI-m(h)};E.exports=x},39706:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(64400),S=function(x,h){var d=(x.x1+x.x2)/2,t=(x.y1+x.y2)/2;return m(x,d,t,h)};E.exports=S},82585:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(64400),S=function(x,h,d){return m(x,h.x,h.y,d)};E.exports=S},64400:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=Math.cos(x),d=Math.sin(x),t=n.x1-m,e=n.y1-S;return n.x1=t*h-e*d+m,n.y1=t*d+e*h+S,t=n.x2-m,e=n.y2-S,n.x2=t*h-e*d+m,n.y2=t*d+e*h+S,n};E.exports=y},62377:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h){return n.x1=m,n.y1=S,n.x2=m+Math.cos(x)*h,n.y2=S+Math.sin(x)*h,n};E.exports=y},71366:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return(n.y2-n.y1)/(n.x2-n.x1)};E.exports=y},10809:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return Math.abs(n.x1-n.x2)};E.exports=y},2529:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(23031);m.Angle=n(91938),m.BresenhamPoints=n(84993),m.CenterOn=n(36469),m.Clone=n(31116),m.CopyFrom=n(59944),m.Equals=n(59220),m.Extend=n(78177),m.GetEasedPoints=n(26708),m.GetMidPoint=n(32125),m.GetNearestPoint=n(99569),m.GetNormal=n(34638),m.GetPoint=n(13151),m.GetPoints=n(15258),m.GetShortestDistance=n(26408),m.Height=n(98770),m.Length=n(35001),m.NormalAngle=n(64795),m.NormalX=n(52616),m.NormalY=n(87231),m.Offset=n(89662),m.PerpSlope=n(71165),m.Random=n(65822),m.ReflectAngle=n(69777),m.Rotate=n(39706),m.RotateAroundPoint=n(82585),m.RotateAroundXY=n(64400),m.SetToAngle=n(62377),m.Slope=n(71366),m.Width=n(10809),E.exports=m},12306:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25717),S=function(x){return new m(x.points)};E.exports=S},63814:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){for(var x=!1,h=-1,d=n.points.length-1;++h<n.points.length;d=h){var t=n.points[h].x,e=n.points[h].y,l=n.points[d].x,i=n.points[d].y;(e<=S&&S<i||i<=S&&S<e)&&m<(l-t)*(S-e)/(i-e)+t&&(x=!x)}return x};E.exports=y},99338:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(63814),S=function(x,h){return m(x,h.x,h.y)};E.exports=S},94811:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function y(I,D,N){N=N||2;var z=D&&D.length,V=z?D[0]*N:I.length,U=n(I,0,V,N,!0),G=[];if(!U||U.next===U.prev)return G;var b,Y,W,H,X,K,Z;if(z&&(U=e(I,D,U,N)),I.length>80*N){b=W=I[0],Y=H=I[1];for(var Q=N;Q<V;Q+=N)X=I[Q],K=I[Q+1],X<b&&(b=X),K<Y&&(Y=K),X>W&&(W=X),K>H&&(H=K);Z=Math.max(W-b,H-Y),Z=Z!==0?32767/Z:0}return S(U,G,N,b,Y,Z,0),G}function n(I,D,N,z,V){var U,G;if(V===B(I,D,N,z)>0)for(U=D;U<N;U+=z)G=F(U,I[U],I[U+1],G);else for(U=N-z;U>=D;U-=z)G=F(U,I[U],I[U+1],G);return G&&p(G,G.next)&&(w(G),G=G.next),G}function m(I,D){if(!I)return I;D||(D=I);var N=I,z;do if(z=!1,!N.steiner&&(p(N,N.next)||g(N.prev,N,N.next)===0)){if(w(N),N=D=N.prev,N===N.next)break;z=!0}else N=N.next;while(z||N!==D);return D}function S(I,D,N,z,V,U,G){if(I){!G&&U&&o(I,z,V,U);for(var b=I,Y,W;I.prev!==I.next;){if(Y=I.prev,W=I.next,U?h(I,z,V,U):x(I)){D.push(Y.i/N|0),D.push(I.i/N|0),D.push(W.i/N|0),w(I),I=W.next,b=W.next;continue}if(I=W,I===b){G?G===1?(I=d(m(I),D,N),S(I,D,N,z,V,U,2)):G===2&&t(I,D,N,z,V,U):S(m(I),D,N,z,V,U,1);break}}}}function x(I){var D=I.prev,N=I,z=I.next;if(g(D,N,z)>=0)return!1;for(var V=D.x,U=N.x,G=z.x,b=D.y,Y=N.y,W=z.y,H=V<U?V<G?V:G:U<G?U:G,X=b<Y?b<W?b:W:Y<W?Y:W,K=V>U?V>G?V:G:U>G?U:G,Z=b>Y?b>W?b:W:Y>W?Y:W,Q=z.next;Q!==D;){if(Q.x>=H&&Q.x<=K&&Q.y>=X&&Q.y<=Z&&v(V,b,U,Y,G,W,Q.x,Q.y)&&g(Q.prev,Q,Q.next)>=0)return!1;Q=Q.next}return!0}function h(I,D,N,z){var V=I.prev,U=I,G=I.next;if(g(V,U,G)>=0)return!1;for(var b=V.x,Y=U.x,W=G.x,H=V.y,X=U.y,K=G.y,Z=b<Y?b<W?b:W:Y<W?Y:W,Q=H<X?H<K?H:K:X<K?X:K,j=b>Y?b>W?b:W:Y>W?Y:W,J=H>X?H>K?H:K:X>K?X:K,tt=u(Z,Q,D,N,z),k=u(j,J,D,N,z),q=I.prevZ,_=I.nextZ;q&&q.z>=tt&&_&&_.z<=k;){if(q.x>=Z&&q.x<=j&&q.y>=Q&&q.y<=J&&q!==V&&q!==G&&v(b,H,Y,X,W,K,q.x,q.y)&&g(q.prev,q,q.next)>=0||(q=q.prevZ,_.x>=Z&&_.x<=j&&_.y>=Q&&_.y<=J&&_!==V&&_!==G&&v(b,H,Y,X,W,K,_.x,_.y)&&g(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;q&&q.z>=tt;){if(q.x>=Z&&q.x<=j&&q.y>=Q&&q.y<=J&&q!==V&&q!==G&&v(b,H,Y,X,W,K,q.x,q.y)&&g(q.prev,q,q.next)>=0)return!1;q=q.prevZ}for(;_&&_.z<=k;){if(_.x>=Z&&_.x<=j&&_.y>=Q&&_.y<=J&&_!==V&&_!==G&&v(b,H,Y,X,W,K,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function d(I,D,N){var z=I;do{var V=z.prev,U=z.next.next;!p(V,U)&&T(V,z,z.next,U)&&R(V,U)&&R(U,V)&&(D.push(V.i/N|0),D.push(z.i/N|0),D.push(U.i/N|0),w(z),w(z.next),z=I=U),z=z.next}while(z!==I);return m(z)}function t(I,D,N,z,V,U){var G=I;do{for(var b=G.next.next;b!==G.prev;){if(G.i!==b.i&&c(G,b)){var Y=L(G,b);G=m(G,G.next),Y=m(Y,Y.next),S(G,D,N,z,V,U,0),S(Y,D,N,z,V,U,0);return}b=b.next}G=G.next}while(G!==I)}function e(I,D,N,z){var V=[],U,G,b,Y,W;for(U=0,G=D.length;U<G;U++)b=D[U]*z,Y=U<G-1?D[U+1]*z:I.length,W=n(I,b,Y,z,!1),W===W.next&&(W.steiner=!0),V.push(f(W));for(V.sort(l),U=0;U<V.length;U++)N=i(V[U],N);return N}function l(I,D){return I.x-D.x}function i(I,D){var N=s(I,D);if(!N)return D;var z=L(N,I);return m(z,z.next),m(N,N.next)}function s(I,D){var N=D,z=I.x,V=I.y,U=-1/0,G;do{if(V<=N.y&&V>=N.next.y&&N.next.y!==N.y){var b=N.x+(V-N.y)*(N.next.x-N.x)/(N.next.y-N.y);if(b<=z&&b>U&&(U=b,G=N.x<N.next.x?N:N.next,b===z))return G}N=N.next}while(N!==D);if(!G)return null;var Y=G,W=G.x,H=G.y,X=1/0,K;N=G;do z>=N.x&&N.x>=W&&z!==N.x&&v(V<H?z:U,V,W,H,V<H?U:z,V,N.x,N.y)&&(K=Math.abs(V-N.y)/(z-N.x),R(N,I)&&(K<X||K===X&&(N.x>G.x||N.x===G.x&&r(G,N)))&&(G=N,X=K)),N=N.next;while(N!==Y);return G}function r(I,D){return g(I.prev,I,D.prev)<0&&g(D.next,I,I.next)<0}function o(I,D,N,z){var V=I;do V.z===0&&(V.z=u(V.x,V.y,D,N,z)),V.prevZ=V.prev,V.nextZ=V.next,V=V.next;while(V!==I);V.prevZ.nextZ=null,V.prevZ=null,a(V)}function a(I){var D,N,z,V,U,G,b,Y,W=1;do{for(N=I,I=null,U=null,G=0;N;){for(G++,z=N,b=0,D=0;D<W&&(b++,z=z.nextZ,!!z);D++);for(Y=W;b>0||Y>0&&z;)b!==0&&(Y===0||!z||N.z<=z.z)?(V=N,N=N.nextZ,b--):(V=z,z=z.nextZ,Y--),U?U.nextZ=V:I=V,V.prevZ=U,U=V;N=z}U.nextZ=null,W*=2}while(G>1);return I}function u(I,D,N,z,V){return I=(I-N)*V|0,D=(D-z)*V|0,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,I|D<<1}function f(I){var D=I,N=I;do(D.x<N.x||D.x===N.x&&D.y<N.y)&&(N=D),D=D.next;while(D!==I);return N}function v(I,D,N,z,V,U,G,b){return(V-G)*(D-b)>=(I-G)*(U-b)&&(I-G)*(z-b)>=(N-G)*(D-b)&&(N-G)*(U-b)>=(V-G)*(z-b)}function c(I,D){return I.next.i!==D.i&&I.prev.i!==D.i&&!A(I,D)&&(R(I,D)&&R(D,I)&&P(I,D)&&(g(I.prev,I,D.prev)||g(I,D.prev,D))||p(I,D)&&g(I.prev,I,I.next)>0&&g(D.prev,D,D.next)>0)}function g(I,D,N){return(D.y-I.y)*(N.x-D.x)-(D.x-I.x)*(N.y-D.y)}function p(I,D){return I.x===D.x&&I.y===D.y}function T(I,D,N,z){var V=M(g(I,D,N)),U=M(g(I,D,z)),G=M(g(N,z,I)),b=M(g(N,z,D));return!!(V!==U&&G!==b||V===0&&C(I,N,D)||U===0&&C(I,z,D)||G===0&&C(N,I,z)||b===0&&C(N,D,z))}function C(I,D,N){return D.x<=Math.max(I.x,N.x)&&D.x>=Math.min(I.x,N.x)&&D.y<=Math.max(I.y,N.y)&&D.y>=Math.min(I.y,N.y)}function M(I){return I>0?1:I<0?-1:0}function A(I,D){var N=I;do{if(N.i!==I.i&&N.next.i!==I.i&&N.i!==D.i&&N.next.i!==D.i&&T(N,N.next,I,D))return!0;N=N.next}while(N!==I);return!1}function R(I,D){return g(I.prev,I,I.next)<0?g(I,D,I.next)>=0&&g(I,I.prev,D)>=0:g(I,D,I.prev)<0||g(I,I.next,D)<0}function P(I,D){var N=I,z=!1,V=(I.x+D.x)/2,U=(I.y+D.y)/2;do N.y>U!=N.next.y>U&&N.next.y!==N.y&&V<(N.next.x-N.x)*(U-N.y)/(N.next.y-N.y)+N.x&&(z=!z),N=N.next;while(N!==I);return z}function L(I,D){var N=new O(I.i,I.x,I.y),z=new O(D.i,D.x,D.y),V=I.next,U=D.prev;return I.next=D,D.prev=I,N.next=V,V.prev=N,z.next=N,N.prev=z,U.next=z,z.prev=U,z}function F(I,D,N,z){var V=new O(I,D,N);return z?(V.next=z.next,V.prev=z,z.next.prev=V,z.next=V):(V.prev=V,V.next=V),V}function w(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 O(I,D,N){this.i=I,this.x=D,this.y=N,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}y.deviation=function(I,D,N,z){var V=D&&D.length,U=V?D[0]*N:I.length,G=Math.abs(B(I,0,U,N));if(V)for(var b=0,Y=D.length;b<Y;b++){var W=D[b]*N,H=b<Y-1?D[b+1]*N:I.length;G-=Math.abs(B(I,W,H,N))}var X=0;for(b=0;b<z.length;b+=3){var K=z[b]*N,Z=z[b+1]*N,Q=z[b+2]*N;X+=Math.abs((I[K]-I[Q])*(I[Z+1]-I[K+1])-(I[K]-I[Z])*(I[Q+1]-I[K+1]))}return G===0&&X===0?0:Math.abs((X-G)/G)};function B(I,D,N,z){for(var V=0,U=D,G=N-z;U<N;U+=z)V+=(I[G]-I[U])*(I[U+1]+I[G+1]),G=U;return V}y.flatten=function(I){for(var D=I[0][0].length,N={vertices:[],holes:[],dimensions:D},z=0,V=0;V<I.length;V++){for(var U=0;U<I[V].length;U++)for(var G=0;G<D;G++)N.vertices.push(I[V][U][G]);V>0&&(z+=I[V-1].length,N.holes.push(z))}return N},E.exports=y},13829:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=function(x,h){h===void 0&&(h=new m);for(var d=1/0,t=1/0,e=-d,l=-t,i,s=0;s<x.points.length;s++)i=x.points[s],d=Math.min(d,i.x),t=Math.min(t,i.y),e=Math.max(e,i.x),l=Math.max(l,i.y);return h.x=d,h.y=t,h.width=e-d,h.height=l-t,h};E.exports=S},26173:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=[]);for(var S=0;S<n.points.length;S++)m.push(n.points[S].x),m.push(n.points[S].y);return m};E.exports=y},9564:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35001),S=n(23031),x=n(30052),h=function(d,t,e,l){l===void 0&&(l=[]);var i=d.points,s=x(d);!t&&e>0&&(t=s/e);for(var r=0;r<t;r++)for(var o=s*(r/t),a=0,u=0;u<i.length;u++){var f=i[u],v=i[(u+1)%i.length],c=new S(f.x,f.y,v.x,v.y),g=m(c);if(o<a||o>a+g){a+=g;continue}var p=c.getPoint((o-a)/g);l.push(p);break}return l};E.exports=h},30052:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35001),S=n(23031),x=function(h){for(var d=h.points,t=0,e=0;e<d.length;e++){var l=d[e],i=d[(e+1)%d.length],s=new S(l.x,l.y,i.x,i.y);t+=m(s)}return t};E.exports=x},25717:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(63814),x=n(9564),h=n(23777),d=new m({initialize:function(e){this.type=h.POLYGON,this.area=0,this.points=[],e&&this.setTo(e)},contains:function(t,e){return S(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],typeof t=="string"&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,l=0;l<t.length;l++)e={x:0,y:0},typeof t[l]=="number"||typeof t[l]=="string"?(e.x=parseFloat(t[l]),e.y=parseFloat(t[l+1]),l++):Array.isArray(t[l])?(e.x=t[l][0],e.y=t[l][1]):(e.x=t[l].x,e.y=t[l].y),this.points.push(e);return this.calculateArea(),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var t=0,e,l,i=0;i<this.points.length-1;i++)e=this.points[i],l=this.points[i+1],t+=(l.x-e.x)*(e.y+l.y);return e=this.points[0],l=this.points[this.points.length-1],t+=(e.x-l.x)*(l.y+e.y),this.area=-t*.5,this.area},getPoints:function(t,e,l){return x(this,t,e,l)}});E.exports=d},8133:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.points.reverse(),n};E.exports=y},29524:E=>{function y(d,t){var e=d.x-t.x,l=d.y-t.y;return e*e+l*l}function n(d,t,e){var l=t.x,i=t.y,s=e.x-l,r=e.y-i;if(s!==0||r!==0){var o=((d.x-l)*s+(d.y-i)*r)/(s*s+r*r);o>1?(l=e.x,i=e.y):o>0&&(l+=s*o,i+=r*o)}return s=d.x-l,r=d.y-i,s*s+r*r}function m(d,t){for(var e=d[0],l=[e],i,s=1,r=d.length;s<r;s++)i=d[s],y(i,e)>t&&(l.push(i),e=i);return e!==i&&l.push(i),l}function S(d,t,e,l,i){for(var s=l,r,o=t+1;o<e;o++){var a=n(d[o],d[t],d[e]);a>s&&(r=o,s=a)}s>l&&(r-t>1&&S(d,t,r,l,i),i.push(d[r]),e-r>1&&S(d,r,e,l,i))}function x(d,t){var e=d.length-1,l=[d[0]];return S(d,0,e,t,l),l.push(d[e]),l}var h=function(d,t,e){t===void 0&&(t=1),e===void 0&&(e=!1);var l=d.points;if(l.length>2){var i=t*t;e||(l=m(l,i)),d.setTo(x(l,i))}return d};E.exports=h},5469:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Igor Ognichenko <ognichenko.igor@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(m,S){return m[0]=S[0],m[1]=S[1],m},n=function(m){var S,x=[],h=m.points;for(S=0;S<h.length;S++)x.push([h[S].x,h[S].y]);var d=[];for(x.length>0&&d.push(y([0,0],x[0])),S=0;S<x.length-1;S++){var t=x[S],e=x[S+1],l=t[0],i=t[1],s=e[0],r=e[1];d.push([.85*l+.15*s,.85*i+.15*r]),d.push([.15*l+.85*s,.15*i+.85*r])}return x.length>1&&d.push(y([0,0],x[x.length-1])),m.setTo(d)};E.exports=n},24709:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){for(var x=n.points,h=0;h<x.length;h++)x[h].x+=m,x[h].y+=S;return n};E.exports=y},58423:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25717);m.Clone=n(12306),m.Contains=n(63814),m.ContainsPoint=n(99338),m.Earcut=n(94811),m.GetAABB=n(13829),m.GetNumberArray=n(26173),m.GetPoints=n(9564),m.Perimeter=n(30052),m.Reverse=n(8133),m.Simplify=n(29524),m.Smooth=n(5469),m.Translate=n(24709),E.exports=m},62224:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.width*n.height};E.exports=y},98615:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.x=Math.ceil(n.x),n.y=Math.ceil(n.y),n};E.exports=y},31688:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.x=Math.ceil(n.x),n.y=Math.ceil(n.y),n.width=Math.ceil(n.width),n.height=Math.ceil(n.height),n};E.exports=y},67502:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n.x=m-n.width/2,n.y=S-n.height/2,n};E.exports=y},65085:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=function(x){return new m(x.x,x.y,x.width,x.height)};E.exports=S},37303:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n.width<=0||n.height<=0?!1:n.x<=m&&n.x+n.width>=m&&n.y<=S&&n.y+n.height>=S};E.exports=y},96553:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37303),S=function(x,h){return m(x,h.x,h.y)};E.exports=S},70273:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m.width*m.height>n.width*n.height?!1:m.x>n.x&&m.x<n.right&&m.right>n.x&&m.right<n.right&&m.y>n.y&&m.y<n.bottom&&m.bottom>n.y&&m.bottom<n.bottom};E.exports=y},43459:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m.setTo(n.x,n.y,n.width,n.height)};E.exports=y},77493:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m=[]),m.push({x:n.x,y:n.y}),m.push({x:n.right,y:n.y}),m.push({x:n.right,y:n.bottom}),m.push({x:n.x,y:n.bottom}),m};E.exports=y},9219:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x===m.x&&n.y===m.y&&n.width===m.width&&n.height===m.height};E.exports=y},53751:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8249),S=function(x,h){var d=m(x);return d<m(h)?x.setSize(h.height*d,h.height):x.setSize(h.width,h.width/d),x.setPosition(h.centerX-x.width/2,h.centerY-x.height/2)};E.exports=S},16088:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8249),S=function(x,h){var d=m(x);return d>m(h)?x.setSize(h.height*d,h.height):x.setSize(h.width,h.width/d),x.setPosition(h.centerX-x.width/2,h.centerY-x.height/2)};E.exports=S},80774:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.x=Math.floor(n.x),n.y=Math.floor(n.y),n};E.exports=y},83859:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.x=Math.floor(n.x),n.y=Math.floor(n.y),n.width=Math.floor(n.width),n.height=Math.floor(n.height),n};E.exports=y},19217:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=n(36383),x=function(h,d){if(d===void 0&&(d=new m),h.length===0)return d;for(var t=Number.MAX_VALUE,e=Number.MAX_VALUE,l=S.MIN_SAFE_INTEGER,i=S.MIN_SAFE_INTEGER,s,r,o,a=0;a<h.length;a++)s=h[a],Array.isArray(s)?(r=s[0],o=s[1]):(r=s.x,o=s.y),t=Math.min(t,r),e=Math.min(e,o),l=Math.max(l,r),i=Math.max(i,o);return d.x=t,d.y=e,d.width=l-t,d.height=i-e,d};E.exports=x},9477:(E,y,n)=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=function(x,h,d,t,e){return e===void 0&&(e=new m),e.setTo(Math.min(x,d),Math.min(h,t),Math.abs(x-d),Math.abs(h-t))};E.exports=S},8249:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.height===0?NaN:n.width/n.height};E.exports=y},27165:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){return h===void 0&&(h=new m),h.x=x.centerX,h.y=x.centerY,h};E.exports=S},20812:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(13019),S=n(26099),x=function(h,d,t){if(t===void 0&&(t=new S),d<=0||d>=1)return t.x=h.x,t.y=h.y,t;var e=m(h)*d;return d>.5?(e-=h.width+h.height,e<=h.width?(t.x=h.right-e,t.y=h.bottom):(t.x=h.x,t.y=h.bottom-(e-h.width))):e<=h.width?(t.x=h.x+e,t.y=h.y):(t.x=h.right,t.y=h.y+(e-h.width)),t};E.exports=x},34819:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20812),S=n(13019),x=function(h,d,t,e){e===void 0&&(e=[]),!d&&t>0&&(d=S(h)/t);for(var l=0;l<d;l++){var i=l/d;e.push(m(h,i))}return e};E.exports=x},51313:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){return h===void 0&&(h=new m),h.x=x.width,h.y=x.height,h};E.exports=S},86091:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(67502),S=function(x,h,d){var t=x.centerX,e=x.centerY;return x.setSize(x.width+h*2,x.height+d*2),m(x,t,e)};E.exports=S},53951:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=n(59996),x=function(h,d,t){return t===void 0&&(t=new m),S(h,d)?(t.x=Math.max(h.x,d.x),t.y=Math.max(h.y,d.y),t.width=Math.min(h.right,d.right)-t.x,t.height=Math.min(h.bottom,d.bottom)-t.y):t.setEmpty(),t};E.exports=x},14649:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(13019),S=n(26099),x=function(h,d,t,e){if(e===void 0&&(e=[]),!d&&!t)return e;d?t=Math.round(m(h)/d):d=m(h)/t;for(var l=h.x,i=h.y,s=0,r=0;r<t;r++)switch(e.push(new S(l,i)),s){case 0:l+=d,l>=h.right&&(s=1,i+=l-h.right,l=h.right);break;case 1:i+=d,i>=h.bottom&&(s=2,l-=i-h.bottom,i=h.bottom);break;case 2:l-=d,l<=h.left&&(s=3,i-=h.left-l,l=h.left);break;case 3:i-=d,i<=h.top&&(s=0,i=h.top);break}return e};E.exports=x},33595:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){for(var S=n.x,x=n.right,h=n.y,d=n.bottom,t=0;t<m.length;t++)S=Math.min(S,m[t].x),x=Math.max(x,m[t].x),h=Math.min(h,m[t].y),d=Math.max(d,m[t].y);return n.x=S,n.y=h,n.width=x-S,n.height=d-h,n};E.exports=y},20074:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=Math.min(n.x,m.x),x=Math.max(n.right,m.right);n.x=S,n.width=x-S;var h=Math.min(n.y,m.y),d=Math.max(n.bottom,m.bottom);return n.y=h,n.height=d-h,n};E.exports=y},92171:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=Math.min(n.x,m),h=Math.max(n.right,m);n.x=x,n.width=h-x;var d=Math.min(n.y,S),t=Math.max(n.bottom,S);return n.y=d,n.height=t-d,n};E.exports=y},42981:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n.x+=m,n.y+=S,n};E.exports=y},46907:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x+=m.x,n.y+=m.y,n};E.exports=y},60170:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x<m.right&&n.right>m.x&&n.y<m.bottom&&n.bottom>m.y};E.exports=y},13019:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return 2*(n.width+n.height)};E.exports=y},85133:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=n(39506),x=function(h,d,t){t===void 0&&(t=new m),d=S(d);var e=Math.sin(d),l=Math.cos(d),i=l>0?h.width/2:h.width/-2,s=e>0?h.height/2:h.height/-2;return Math.abs(i*e)<Math.abs(s*l)?s=i*e/l:i=s*l/e,t.x=i+h.centerX,t.y=s+h.centerY,t};E.exports=x},26597:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){return h===void 0&&(h=new m),h.x=x.x+Math.random()*x.width,h.y=x.y+Math.random()*x.height,h};E.exports=S},86470:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(30976),S=n(70273),x=n(26099),h=function(d,t,e){if(e===void 0&&(e=new x),S(d,t))switch(m(0,3)){case 0:e.x=d.x+Math.random()*(t.right-d.x),e.y=d.y+Math.random()*(t.top-d.y);break;case 1:e.x=t.x+Math.random()*(d.right-t.x),e.y=t.bottom+Math.random()*(d.bottom-t.bottom);break;case 2:e.x=d.x+Math.random()*(t.x-d.x),e.y=t.y+Math.random()*(d.bottom-t.y);break;case 3:e.x=t.right+Math.random()*(d.right-t.right),e.y=d.y+Math.random()*(t.bottom-d.y);break}return e};E.exports=h},87841:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(37303),x=n(20812),h=n(34819),d=n(23777),t=n(23031),e=n(26597),l=new m({initialize:function(s,r,o,a){s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=0),a===void 0&&(a=0),this.type=d.RECTANGLE,this.x=s,this.y=r,this.width=o,this.height=a},contains:function(i,s){return S(this,i,s)},getPoint:function(i,s){return x(this,i,s)},getPoints:function(i,s,r){return h(this,i,s,r)},getRandomPoint:function(i){return e(this,i)},setTo:function(i,s,r,o){return this.x=i,this.y=s,this.width=r,this.height=o,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(i,s){return s===void 0&&(s=i),this.x=i,this.y=s,this},setSize:function(i,s){return s===void 0&&(s=i),this.width=i,this.height=s,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(i){return i===void 0&&(i=new t),i.setTo(this.x,this.y,this.right,this.y),i},getLineB:function(i){return i===void 0&&(i=new t),i.setTo(this.right,this.y,this.right,this.bottom),i},getLineC:function(i){return i===void 0&&(i=new t),i.setTo(this.right,this.bottom,this.x,this.bottom),i},getLineD:function(i){return i===void 0&&(i=new t),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}}});E.exports=l},94845:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.width===m.width&&n.height===m.height};E.exports=y},31730:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return S===void 0&&(S=m),n.width*=m,n.height*=S,n};E.exports=y},36899:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=function(x,h,d){d===void 0&&(d=new m);var t=Math.min(x.x,h.x),e=Math.min(x.y,h.y),l=Math.max(x.right,h.right)-t,i=Math.max(x.bottom,h.bottom)-e;return d.setTo(t,e,l,i)};E.exports=S},93232:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841);m.Area=n(62224),m.Ceil=n(98615),m.CeilAll=n(31688),m.CenterOn=n(67502),m.Clone=n(65085),m.Contains=n(37303),m.ContainsPoint=n(96553),m.ContainsRect=n(70273),m.CopyFrom=n(43459),m.Decompose=n(77493),m.Equals=n(9219),m.FitInside=n(53751),m.FitOutside=n(16088),m.Floor=n(80774),m.FloorAll=n(83859),m.FromPoints=n(19217),m.FromXY=n(9477),m.GetAspectRatio=n(8249),m.GetCenter=n(27165),m.GetPoint=n(20812),m.GetPoints=n(34819),m.GetSize=n(51313),m.Inflate=n(86091),m.Intersection=n(53951),m.MarchingAnts=n(14649),m.MergePoints=n(33595),m.MergeRect=n(20074),m.MergeXY=n(92171),m.Offset=n(42981),m.OffsetPoint=n(46907),m.Overlaps=n(60170),m.Perimeter=n(13019),m.PerimeterPoint=n(85133),m.Random=n(26597),m.RandomOutside=n(86470),m.SameDimensions=n(94845),m.Scale=n(31730),m.Union=n(36899),E.exports=m},41658:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=n.x1,S=n.y1,x=n.x2,h=n.y2,d=n.x3,t=n.y3;return Math.abs(((d-m)*(h-S)-(x-m)*(t-S))/2)};E.exports=y},39208:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(16483),S=function(x,h,d){var t=d*(Math.sqrt(3)/2),e=x,l=h,i=x+d/2,s=h+t,r=x-d/2,o=h+t;return new m(e,l,i,s,r,o)};E.exports=S},39545:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(94811),S=n(16483),x=function(h,d,t,e,l){d===void 0&&(d=null),t===void 0&&(t=1),e===void 0&&(e=1),l===void 0&&(l=[]);for(var i=m(h,d),s,r,o,a,u,f,v,c,g,p=0;p<i.length;p+=3)s=i[p],r=i[p+1],o=i[p+2],a=h[s*2]*t,u=h[s*2+1]*e,f=h[r*2]*t,v=h[r*2+1]*e,c=h[o*2]*t,g=h[o*2+1]*e,l.push(new S(a,u,f,v,c,g));return l};E.exports=x},90301:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(16483),S=function(x,h,d,t){t===void 0&&(t=d);var e=x,l=h,i=x,s=h-t,r=x+d,o=h;return new m(e,l,i,s,r,o)};E.exports=S},23707:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(97523),S=n(13584),x=function(h,d,t,e){e===void 0&&(e=m);var l=e(h),i=d-l.x,s=t-l.y;return S(h,i,s)};E.exports=x},97523:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){return h===void 0&&(h=new m),h.x=(x.x1+x.x2+x.x3)/3,h.y=(x.y1+x.y2+x.y3)/3,h};E.exports=S},24951:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099);function S(h,d,t,e){return h*e-d*t}var x=function(h,d){d===void 0&&(d=new m);var t=h.x3,e=h.y3,l=h.x1-t,i=h.y1-e,s=h.x2-t,r=h.y2-e,o=2*S(l,i,s,r),a=S(i,l*l+i*i,r,s*s+r*r),u=S(l,l*l+i*i,s,s*s+r*r);return d.x=t-a/o,d.y=e+u/o,d};E.exports=x},85614:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(96503),S=function(x,h){h===void 0&&(h=new m);var d=x.x1,t=x.y1,e=x.x2,l=x.y2,i=x.x3,s=x.y3,r=e-d,o=l-t,a=i-d,u=s-t,f=r*(d+e)+o*(t+l),v=a*(d+i)+u*(t+s),c=2*(r*(s-l)-o*(i-e)),g,p;if(Math.abs(c)<1e-6){var T=Math.min(d,e,i),C=Math.min(t,l,s);g=(Math.max(d,e,i)-T)*.5,p=(Math.max(t,l,s)-C)*.5,h.x=T+g,h.y=C+p,h.radius=Math.sqrt(g*g+p*p)}else h.x=(u*f-o*v)/c,h.y=(r*v-a*f)/c,g=h.x-d,p=h.y-t,h.radius=Math.sqrt(g*g+p*p);return h};E.exports=S},74422:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(16483),S=function(x){return new m(x.x1,x.y1,x.x2,x.y2,x.x3,x.y3)};E.exports=S},10690:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=n.x3-n.x1,h=n.y3-n.y1,d=n.x2-n.x1,t=n.y2-n.y1,e=m-n.x1,l=S-n.y1,i=x*x+h*h,s=x*d+h*t,r=x*e+h*l,o=d*d+t*t,a=d*e+t*l,u=i*o-s*s,f=u===0?0:1/u,v=(o*r-s*a)*f,c=(i*a-s*r)*f;return v>=0&&c>=0&&v+c<1};E.exports=y},48653:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S===void 0&&(S=!1),x===void 0&&(x=[]);for(var h=n.x3-n.x1,d=n.y3-n.y1,t=n.x2-n.x1,e=n.y2-n.y1,l=h*h+d*d,i=h*t+d*e,s=t*t+e*e,r=l*s-i*i,o=r===0?0:1/r,a,u,f,v,c,g,p=n.x1,T=n.y1,C=0;C<m.length&&(f=m[C].x-p,v=m[C].y-T,c=h*f+d*v,g=t*f+e*v,a=(s*c-i*g)*o,u=(l*g-i*c)*o,!(a>=0&&u>=0&&a+u<1&&(x.push({x:m[C].x,y:m[C].y}),S)));C++);return x};E.exports=y},96006:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10690),S=function(x,h){return m(x,h.x,h.y)};E.exports=S},71326:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m.setTo(n.x1,n.y1,n.x2,n.y2,n.x3,n.y3)};E.exports=y},71694:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m=[]),m.push({x:n.x1,y:n.y1}),m.push({x:n.x2,y:n.y2}),m.push({x:n.x3,y:n.y3}),m};E.exports=y},33522:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.x1===m.x1&&n.y1===m.y1&&n.x2===m.x2&&n.y2===m.y2&&n.x3===m.x3&&n.y3===m.y3};E.exports=y},20437:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=n(35001),x=function(h,d,t){t===void 0&&(t=new m);var e=h.getLineA(),l=h.getLineB(),i=h.getLineC();if(d<=0||d>=1)return t.x=e.x1,t.y=e.y1,t;var s=S(e),r=S(l),o=S(i),a=s+r+o,u=a*d,f=0;return u<s?(f=u/s,t.x=e.x1+(e.x2-e.x1)*f,t.y=e.y1+(e.y2-e.y1)*f):u>s+r?(u-=s+r,f=u/o,t.x=i.x1+(i.x2-i.x1)*f,t.y=i.y1+(i.y2-i.y1)*f):(u-=s,f=u/r,t.x=l.x1+(l.x2-l.x1)*f,t.y=l.y1+(l.y2-l.y1)*f),t};E.exports=x},80672:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35001),S=n(26099),x=function(h,d,t,e){e===void 0&&(e=[]);var l=h.getLineA(),i=h.getLineB(),s=h.getLineC(),r=m(l),o=m(i),a=m(s),u=r+o+a;!d&&t>0&&(d=u/t);for(var f=0;f<d;f++){var v=u*(f/d),c=0,g=new S;v<r?(c=v/r,g.x=l.x1+(l.x2-l.x1)*c,g.y=l.y1+(l.y2-l.y1)*c):v>r+o?(v-=r+o,c=v/a,g.x=s.x1+(s.x2-s.x1)*c,g.y=s.y1+(s.y2-s.y1)*c):(v-=r,c=v/o,g.x=i.x1+(i.x2-i.x1)*c,g.y=i.y1+(i.y2-i.y1)*c),e.push(g)}return e};E.exports=x},39757:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099);function S(h,d,t,e){var l=h-t,i=d-e,s=l*l+i*i;return Math.sqrt(s)}var x=function(h,d){d===void 0&&(d=new m);var t=h.x1,e=h.y1,l=h.x2,i=h.y2,s=h.x3,r=h.y3,o=S(s,r,l,i),a=S(t,e,s,r),u=S(l,i,t,e),f=o+a+u;return d.x=(t*o+l*a+s*u)/f,d.y=(e*o+i*a+r*u)/f,d};E.exports=x},13584:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n.x1+=m,n.y1+=S,n.x2+=m,n.y2+=S,n.x3+=m,n.y3+=S,n};E.exports=y},1376:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35001),S=function(x){var h=x.getLineA(),d=x.getLineB(),t=x.getLineC();return m(h)+m(d)+m(t)};E.exports=S},90260:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){h===void 0&&(h=new m);var d=x.x2-x.x1,t=x.y2-x.y1,e=x.x3-x.x1,l=x.y3-x.y1,i=Math.random(),s=Math.random();return i+s>=1&&(i=1-i,s=1-s),h.x=x.x1+(d*i+e*s),h.y=x.y1+(t*i+l*s),h};E.exports=S},52172:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(99614),S=n(39757),x=function(h,d){var t=S(h);return m(h,t.x,t.y,d)};E.exports=x},49907:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(99614),S=function(x,h,d){return m(x,h.x,h.y,d)};E.exports=S},99614:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=Math.cos(x),d=Math.sin(x),t=n.x1-m,e=n.y1-S;return n.x1=t*h-e*d+m,n.y1=t*d+e*h+S,t=n.x2-m,e=n.y2-S,n.x2=t*h-e*d+m,n.y2=t*d+e*h+S,t=n.x3-m,e=n.y3-S,n.x3=t*h-e*d+m,n.y3=t*d+e*h+S,n};E.exports=y},16483:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(10690),x=n(20437),h=n(80672),d=n(23777),t=n(23031),e=n(90260),l=new m({initialize:function(s,r,o,a,u,f){s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=0),this.type=d.TRIANGLE,this.x1=s,this.y1=r,this.x2=o,this.y2=a,this.x3=u,this.y3=f},contains:function(i,s){return S(this,i,s)},getPoint:function(i,s){return x(this,i,s)},getPoints:function(i,s,r){return h(this,i,s,r)},getRandomPoint:function(i){return e(this,i)},setTo:function(i,s,r,o,a,u){return i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=0),this.x1=i,this.y1=s,this.x2=r,this.y2=o,this.x3=a,this.y3=u,this},getLineA:function(i){return i===void 0&&(i=new t),i.setTo(this.x1,this.y1,this.x2,this.y2),i},getLineB:function(i){return i===void 0&&(i=new t),i.setTo(this.x2,this.y2,this.x3,this.y3),i},getLineC:function(i){return i===void 0&&(i=new t),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 s=0;this.x1<=this.x2&&this.x1<=this.x3?s=this.x1-i:this.x2<=this.x1&&this.x2<=this.x3?s=this.x2-i:s=this.x3-i,this.x1-=s,this.x2-=s,this.x3-=s}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(i){var s=0;this.x1>=this.x2&&this.x1>=this.x3?s=this.x1-i:this.x2>=this.x1&&this.x2>=this.x3?s=this.x2-i:s=this.x3-i,this.x1-=s,this.x2-=s,this.x3-=s}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(i){var s=0;this.y1<=this.y2&&this.y1<=this.y3?s=this.y1-i:this.y2<=this.y1&&this.y2<=this.y3?s=this.y2-i:s=this.y3-i,this.y1-=s,this.y2-=s,this.y3-=s}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(i){var s=0;this.y1>=this.y2&&this.y1>=this.y3?s=this.y1-i:this.y2>=this.y1&&this.y2>=this.y3?s=this.y2-i:s=this.y3-i,this.y1-=s,this.y2-=s,this.y3-=s}}});E.exports=l},84435:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(16483);m.Area=n(41658),m.BuildEquilateral=n(39208),m.BuildFromPolygon=n(39545),m.BuildRight=n(90301),m.CenterOn=n(23707),m.Centroid=n(97523),m.CircumCenter=n(24951),m.CircumCircle=n(85614),m.Clone=n(74422),m.Contains=n(10690),m.ContainsArray=n(48653),m.ContainsPoint=n(96006),m.CopyFrom=n(71326),m.Decompose=n(71694),m.Equals=n(33522),m.GetPoint=n(20437),m.GetPoints=n(80672),m.InCenter=n(39757),m.Perimeter=n(1376),m.Offset=n(13584),m.Random=n(90260),m.Rotate=n(52172),m.RotateAroundPoint=n(49907),m.RotateAroundXY=n(99614),E.exports=m},74457:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return{gameObject:n,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:m,hitAreaCallback:S,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}};E.exports=y},84409:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return function(S,x,h,d){var t=n.getPixelAlpha(x,h,d.texture.key,d.frame.name);return t&&t>=m}};E.exports=y},7003:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(93301),x=n(50792),h=n(8214),d=n(8443),t=n(78970),e=n(85098),l=n(42515),i=n(36210),s=n(61340),r=n(85955),o=new m({initialize:function(u,f){this.game=u,this.scaleManager,this.canvas,this.config=f,this.enabled=!0,this.events=new x,this.isOver=!0,this.defaultCursor="",this.keyboard=f.inputKeyboard?new t(this):null,this.mouse=f.inputMouse?new e(this):null,this.touch=f.inputTouch?new i(this):null,this.pointers=[],this.pointersTotal=f.inputActivePointers;for(var v=0;v<=this.pointersTotal;v++){var c=new l(this,v);c.smoothFactor=f.inputSmoothFactor,this.pointers.push(c)}this.mousePointer=f.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 s,this._tempMatrix2=new s,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],u.events.once(d.BOOT,this.boot,this)},boot:function(){var a=this.game,u=a.events;this.canvas=a.canvas,this.scaleManager=a.scale,this.events.emit(h.MANAGER_BOOT),u.on(d.PRE_RENDER,this.preRender,this),u.once(d.DESTROY,this.destroy,this)},setCanvasOver:function(a){this.isOver=!0,this.events.emit(h.GAME_OVER,a)},setCanvasOut:function(a){this.isOver=!1,this.events.emit(h.GAME_OUT,a)},preRender:function(){var a=this.game.loop.now,u=this.game.loop.delta,f=this.game.scene.getScenes(!0,!0);this.time=a,this.events.emit(h.MANAGER_UPDATE);for(var v=0;v<f.length;v++){var c=f[v];if(c.sys.input&&c.sys.input.updatePoll(a,u)&&this.globalTopOnly)return}},setDefaultCursor:function(a){this.defaultCursor=a,this.canvas.style.cursor!==a&&(this.canvas.style.cursor=a)},setCursor:function(a){a.cursor&&(this.canvas.style.cursor=a.cursor)},resetCursor:function(a,u){(u||a&&a.cursor)&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(a){a===void 0&&(a=1);var u=[];this.pointersTotal+a>10&&(a=10-this.pointersTotal);for(var f=0;f<a;f++){var v=this.pointers.length,c=new l(this,v);c.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(c),this.pointersTotal++,u.push(c)}return u},updateInputPlugins:function(a,u){var f=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var v=0;v<f.length;v++){var c=f[v];if(c.sys.input){var g=c.sys.input.update(a,u);if(g&&this.globalTopOnly||this._tempSkip)return}}},onTouchStart:function(a){for(var u=this.pointers,f=[],v=0;v<a.changedTouches.length;v++)for(var c=a.changedTouches[v],g=1;g<u.length;g++){var p=u[g];if(!p.active){p.touchstart(c,a),this.activePointer=p,f.push(p);break}}this.updateInputPlugins(S.TOUCH_START,f)},onTouchMove:function(a){for(var u=this.pointers,f=[],v=0;v<a.changedTouches.length;v++)for(var c=a.changedTouches[v],g=1;g<u.length;g++){var p=u[g];if(p.active&&p.identifier===c.identifier){var T=document.elementFromPoint(c.clientX,c.clientY),C=T===this.canvas;!this.isOver&&C?this.setCanvasOver(a):this.isOver&&!C&&this.setCanvasOut(a),this.isOver&&(p.touchmove(c,a),this.activePointer=p,f.push(p));break}}this.updateInputPlugins(S.TOUCH_MOVE,f)},onTouchEnd:function(a){for(var u=this.pointers,f=[],v=0;v<a.changedTouches.length;v++)for(var c=a.changedTouches[v],g=1;g<u.length;g++){var p=u[g];if(p.active&&p.identifier===c.identifier){p.touchend(c,a),f.push(p);break}}this.updateInputPlugins(S.TOUCH_END,f)},onTouchCancel:function(a){for(var u=this.pointers,f=[],v=0;v<a.changedTouches.length;v++)for(var c=a.changedTouches[v],g=1;g<u.length;g++){var p=u[g];if(p.active&&p.identifier===c.identifier){p.touchcancel(c,a),f.push(p);break}}this.updateInputPlugins(S.TOUCH_CANCEL,f)},onMouseDown:function(a){var u=this.mousePointer;u.down(a),u.updateMotion(),this.activePointer=u,this.updateInputPlugins(S.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(a){var u=this.mousePointer;u.move(a),u.updateMotion(),this.activePointer=u,this.updateInputPlugins(S.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(a){var u=this.mousePointer;u.up(a),u.updateMotion(),this.activePointer=u,this.updateInputPlugins(S.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(a){var u=this.mousePointer;u.wheel(a),this.activePointer=u,this.updateInputPlugins(S.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(a){var u=this.mouse.locked;this.mousePointer.locked=u,this.events.emit(h.POINTERLOCK_CHANGE,a,u)},inputCandidate:function(a,u){var f=a.input;if(!f||!f.enabled||!a.willRender(u))return!1;var v=!0,c=a.parentContainer;if(c)do{if(!c.willRender(u)){v=!1;break}c=c.parentContainer}while(c);return v},hitTest:function(a,u,f,v){v===void 0&&(v=this._tempHitTest);var c=this._tempPoint,g=f.scrollX,p=f.scrollY;v.length=0;var T=a.x,C=a.y;f.getWorldPoint(T,C,c),a.worldX=c.x,a.worldY=c.y;for(var M={x:0,y:0},A=this._tempMatrix,R=this._tempMatrix2,P=0;P<u.length;P++){var L=u[P];if(this.inputCandidate(L,f)){var F=c.x+g*L.scrollFactorX-g,w=c.y+p*L.scrollFactorY-p;L.parentContainer?(L.getWorldTransformMatrix(A,R),A.applyInverse(F,w,M)):r(F,w,L.x,L.y,L.rotation,L.scaleX,L.scaleY,M),this.pointWithinHitArea(L,M.x,M.y)&&v.push(L)}}return v},pointWithinHitArea:function(a,u,f){u+=a.displayOriginX,f+=a.displayOriginY;var v=a.input;return v&&v.hitAreaCallback(v.hitArea,u,f,a)?(v.localX=u,v.localY=f,!0):!1},pointWithinInteractiveObject:function(a,u,f){return a.hitArea?(u+=a.gameObject.displayOriginX,f+=a.gameObject.displayOriginY,a.localX=u,a.localY=f,a.hitAreaCallback(a.hitArea,u,f,a)):!1},transformPointer:function(a,u,f,v){var c=a.position,g=a.prevPosition;g.x=c.x,g.y=c.y;var p=this.scaleManager.transformX(u),T=this.scaleManager.transformY(f),C=a.smoothFactor;!v||C===0?(c.x=p,c.y=T):(c.x=p*C+g.x*(1-C),c.y=T*C+g.y*(1-C))},destroy:function(){this.events.removeAllListeners(),this.game.events.off(d.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var a=0;a<this.pointers.length;a++)this.pointers[a].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});E.exports=o},48205:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(96503),S=n(87902),x=n(83419),h=n(93301),d=n(74457),t=n(84409),e=n(20339),l=n(8497),i=n(81154),s=n(8214),r=n(50792),o=n(95540),a=n(23777),u=n(89639),f=n(41212),v=n(37277),c=n(87841),g=n(37303),p=n(44594),T=n(16483),C=n(10690),M=new x({Extends:r,initialize:function(R){r.call(this),this.scene=R,this.systems=R.sys,this.settings=R.sys.settings,this.manager=R.sys.game.input,this.pluginEvents=new r,this.enabled=!0,this.displayList,this.cameras,u.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var P={cancelled:!1};this._eventContainer={stopPropagation:function(){P.cancelled=!0}},this._eventData=P,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,R.sys.events.once(p.BOOT,this.boot,this),R.sys.events.on(p.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(p.DESTROY,this.destroy,this),this.pluginEvents.emit(s.BOOT)},start:function(){var A=this.systems.events;A.on(p.TRANSITION_START,this.transitionIn,this),A.on(p.TRANSITION_OUT,this.transitionOut,this),A.on(p.TRANSITION_COMPLETE,this.transitionComplete,this),A.on(p.PRE_UPDATE,this.preUpdate,this),A.once(p.SHUTDOWN,this.shutdown,this),this.manager.events.on(s.GAME_OUT,this.onGameOut,this),this.manager.events.on(s.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(s.START)},onGameOver:function(A){this.isActive()&&this.emit(s.GAME_OVER,A.timeStamp,A)},onGameOut:function(A){this.isActive()&&this.emit(s.GAME_OUT,A.timeStamp,A)},preUpdate:function(){this.pluginEvents.emit(s.PRE_UPDATE);var A=this._pendingRemoval,R=this._pendingInsertion,P=A.length,L=R.length;if(!(P===0&&L===0)){for(var F=this._list,w=0;w<P;w++){var O=A[w],B=F.indexOf(O);B>-1&&(F.splice(B,1),this.clear(O,!0))}this._pendingRemoval.length=0,this._list=F.concat(R.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,R){if(!this.isActive())return!1;if(this.pluginEvents.emit(s.UPDATE,A,R),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var P,L=this.manager,F=L.pointers;for(P=0;P<F.length;P++)F[P].updateMotion();if(this._list.length===0)return!1;var w=this.pollRate;if(w===-1)return!1;if(w>0)if(this._pollTimer-=R,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var O=!1;for(P=0;P<F.length;P++){var B=0,I=F[P];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)),B+=this.processOverOutEvents(I),this.getDragState(I)===2&&this.processDragThresholdEvent(I,A),B>0&&(O=!0)}return O},update:function(A,R){if(!this.isActive())return!1;for(var P=!1,L=0;L<R.length;L++){var F=0,w=R[L];switch(this._tempZones=[],this._temp=this.hitTestPointer(w),this.sortGameObjects(this._temp,w),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),A){case h.MOUSE_DOWN:F+=this.processDragDownEvent(w),F+=this.processDownEvents(w),F+=this.processOverOutEvents(w);break;case h.MOUSE_UP:F+=this.processDragUpEvent(w),F+=this.processUpEvents(w),F+=this.processOverOutEvents(w);break;case h.TOUCH_START:F+=this.processDragDownEvent(w),F+=this.processDownEvents(w),F+=this.processOverEvents(w);break;case h.TOUCH_END:case h.TOUCH_CANCEL:F+=this.processDragUpEvent(w),F+=this.processUpEvents(w),F+=this.processOutEvents(w);break;case h.MOUSE_MOVE:case h.TOUCH_MOVE:F+=this.processDragMoveEvent(w),F+=this.processMoveEvents(w),F+=this.processOverOutEvents(w);break;case h.MOUSE_WHEEL:F+=this.processWheelEvent(w);break}F>0&&(P=!0)}return this._updatedThisFrame=!0,P},clear:function(A,R){R===void 0&&(R=!1),this.disable(A);var P=A.input;P&&(this.removeDebug(A),this.manager.resetCursor(P),P.gameObject=void 0,P.target=void 0,P.hitArea=void 0,P.hitAreaCallback=void 0,P.callbackContext=void 0,A.input=null),R||this.queueForRemoval(A);var L=this._draggable.indexOf(A);return L>-1&&this._draggable.splice(L,1),A},disable:function(A,R){R===void 0&&(R=!1);var P=A.input;P&&(P.enabled=!1,P.dragState=0);for(var L=this._drag,F=this._over,w=this.manager,O=0,B;O<w.pointers.length;O++)B=L[O].indexOf(A),B>-1&&L[O].splice(B,1),B=F[O].indexOf(A),B>-1&&F[O].splice(B,1);return R&&this.resetCursor(),this},enable:function(A,R,P,L){return L===void 0&&(L=!1),A.input?A.input.enabled=!0:this.setHitArea(A,R,P),A.input&&L&&!A.input.dropZone&&(A.input.dropZone=L),this},hitTestPointer:function(A){for(var R=this.cameras.getCamerasBelowPointer(A),P=0;P<R.length;P++){for(var L=R[P],F=this.manager.hitTest(A,this._list,L),w=0;w<F.length;w++){var O=F[w];O.input.dropZone&&this._tempZones.push(O)}if(F.length>0)return A.camera=L,F}return A.camera=R[0],[]},processDownEvents:function(A){var R=0,P=this._temp,L=this._eventData,F=this._eventContainer;L.cancelled=!1;for(var w=0;w<P.length;w++){var O=P[w];if(!(!O.input||!O.input.enabled)&&(R++,O.emit(s.GAMEOBJECT_POINTER_DOWN,A,O.input.localX,O.input.localY,F),L.cancelled||!this.isActive()||O.input&&O.input.enabled&&(this.emit(s.GAMEOBJECT_DOWN,A,O,F),L.cancelled||!this.isActive())))break}return!L.cancelled&&this.isActive()&&(A.downElement===this.manager.game.canvas?this.emit(s.POINTER_DOWN,A,P):this.emit(s.POINTER_DOWN_OUTSIDE,A)),R},getDragState:function(A){return this._dragState[A.id]},setDragState:function(A,R){this._dragState[A.id]=R},processDragThresholdEvent:function(A,R){var P=!1,L=this.dragTimeThreshold,F=this.dragDistanceThreshold;if((F>0&&e(A.x,A.y,A.downX,A.downY)>=F||L>0&&R>=A.downTime+L)&&(P=!0),P)return this.setDragState(A,3),this.processDragStartList(A)},processDragStartList:function(A){if(this.getDragState(A)!==3)return 0;var R=this._drag[A.id];R.length>1&&(R=R.slice(0));for(var P=0;P<R.length;P++){var L=R[P],F=L.input;F.dragState=2,F.dragStartX=L.x,F.dragStartY=L.y,F.dragStartXGlobal=A.worldX,F.dragStartYGlobal=A.worldY,F.dragStartCamera=A.camera,F.dragX=F.dragStartXGlobal-F.dragStartX,F.dragY=F.dragStartYGlobal-F.dragStartY,L.emit(s.GAMEOBJECT_DRAG_START,A,F.dragX,F.dragY),this.emit(s.DRAG_START,A,L)}return this.setDragState(A,4),R.length},processDragDownEvent:function(A){var R=this._temp;if(this._draggable.length===0||R.length===0||!A.primaryDown||this.getDragState(A)!==0)return 0;this.setDragState(A,1);for(var P=[],L=0;L<R.length;L++){var F=R[L];F.input.draggable&&F.input.dragState===0&&P.push(F)}return P.length===0?(this.setDragState(A,0),0):(P.length>1&&(this.sortGameObjects(P,A),this.topOnly&&P.splice(1)),this._drag[A.id]=P,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 R=this._tempZones,P=this._drag[A.id];P.length>1&&(P=P.slice(0));for(var L=0;L<P.length;L++){var F=P[L],w=F.input,O=w.target;if(O){var B=R.indexOf(O);B===0?(F.emit(s.GAMEOBJECT_DRAG_OVER,A,O),this.emit(s.DRAG_OVER,A,F,O)):B>0?(F.emit(s.GAMEOBJECT_DRAG_LEAVE,A,O),this.emit(s.DRAG_LEAVE,A,F,O),w.target=R[0],O=w.target,F.emit(s.GAMEOBJECT_DRAG_ENTER,A,O),this.emit(s.DRAG_ENTER,A,F,O)):(F.emit(s.GAMEOBJECT_DRAG_LEAVE,A,O),this.emit(s.DRAG_LEAVE,A,F,O),R[0]?(w.target=R[0],O=w.target,F.emit(s.GAMEOBJECT_DRAG_ENTER,A,O),this.emit(s.DRAG_ENTER,A,F,O)):w.target=null)}else!O&&R[0]&&(w.target=R[0],O=w.target,F.emit(s.GAMEOBJECT_DRAG_ENTER,A,O),this.emit(s.DRAG_ENTER,A,F,O));var I,D,N=A.positionToCamera(w.dragStartCamera);if(!F.parentContainer)I=N.x-w.dragX,D=N.y-w.dragY;else{var z=N.x-w.dragStartXGlobal,V=N.y-w.dragStartYGlobal,U=F.getParentRotation(),G=z*Math.cos(U)+V*Math.sin(U),b=V*Math.cos(U)-z*Math.sin(U);G*=1/F.parentContainer.scaleX,b*=1/F.parentContainer.scaleY,I=G+w.dragStartX,D=b+w.dragStartY}F.emit(s.GAMEOBJECT_DRAG,A,I,D),this.emit(s.DRAG,A,F,I,D)}return P.length},processDragUpEvent:function(A){var R=this._drag[A.id];R.length>1&&(R=R.slice(0));for(var P=0;P<R.length;P++){var L=R[P],F=L.input;if(F&&F.dragState===2){F.dragState=0,F.dragX=F.localX-L.displayOriginX,F.dragY=F.localY-L.displayOriginY,F.dragStartCamera=null;var w=!1,O=F.target;O&&(L.emit(s.GAMEOBJECT_DROP,A,O),this.emit(s.DROP,A,L,O),F.target=null,w=!0),L.input&&L.input.enabled&&(L.emit(s.GAMEOBJECT_DRAG_END,A,F.dragX,F.dragY,w),this.emit(s.DRAG_END,A,L,w))}}return this.setDragState(A,0),R.splice(0),0},processMoveEvents:function(A){var R=0,P=this._temp,L=this._eventData,F=this._eventContainer;L.cancelled=!1;for(var w=0;w<P.length;w++){var O=P[w];if(!(!O.input||!O.input.enabled)&&(R++,O.emit(s.GAMEOBJECT_POINTER_MOVE,A,O.input.localX,O.input.localY,F),L.cancelled||!this.isActive()||O.input&&O.input.enabled&&(this.emit(s.GAMEOBJECT_MOVE,A,O,F),L.cancelled||!this.isActive()||this.topOnly)))break}return!L.cancelled&&this.isActive()&&this.emit(s.POINTER_MOVE,A,P),R},processWheelEvent:function(A){var R=0,P=this._temp,L=this._eventData,F=this._eventContainer;L.cancelled=!1;for(var w=A.deltaX,O=A.deltaY,B=A.deltaZ,I=0;I<P.length;I++){var D=P[I];if(!(!D.input||!D.input.enabled)&&(R++,D.emit(s.GAMEOBJECT_POINTER_WHEEL,A,w,O,B,F),L.cancelled||!this.isActive()||D.input&&D.input.enabled&&(this.emit(s.GAMEOBJECT_WHEEL,A,D,w,O,B,F),L.cancelled||!this.isActive())))break}return!L.cancelled&&this.isActive()&&this.emit(s.POINTER_WHEEL,A,P,w,O,B),R},processOverEvents:function(A){var R=this._temp,P=0,L=R.length,F=[];if(L>0){var w=this.manager,O=this._eventData,B=this._eventContainer;O.cancelled=!1;for(var I=0;I<L;I++){var D=R[I];if(!(!D.input||!D.input.enabled)&&(F.push(D),w.setCursor(D.input),D.emit(s.GAMEOBJECT_POINTER_OVER,A,D.input.localX,D.input.localY,B),P++,O.cancelled||!this.isActive()||D.input&&D.input.enabled&&(this.emit(s.GAMEOBJECT_OVER,A,D,B),O.cancelled||!this.isActive())))break}!O.cancelled&&this.isActive()&&this.emit(s.POINTER_OVER,A,F)}return this._over[A.id]=F,P},processOutEvents:function(A){var R=this._over[A.id],P=0,L=R.length;if(L>0){var F=this.manager,w=this._eventData,O=this._eventContainer;w.cancelled=!1,this.sortGameObjects(R,A);for(var B=0;B<L;B++){var I=R[B];if(I=R[B],!(!I.input||!I.input.enabled)&&(F.resetCursor(I.input),I.emit(s.GAMEOBJECT_POINTER_OUT,A,O),P++,w.cancelled||!this.isActive()||I.input&&I.input.enabled&&(this.emit(s.GAMEOBJECT_OUT,A,I,O),w.cancelled||!this.isActive())))break}!w.cancelled&&this.isActive()&&this.emit(s.POINTER_OUT,A,R),this._over[A.id]=[]}return P},processOverOutEvents:function(A){var R=this._temp,P,L,F=[],w=[],O=[],B=this._over[A.id],I=this._drag[A.id],D=this.manager;for(P=0;P<B.length;P++)L=B[P],R.indexOf(L)===-1&&I.indexOf(L)===-1?F.push(L):O.push(L);for(P=0;P<R.length;P++)L=R[P],B.indexOf(L)===-1&&w.push(L);var N=F.length,z=0,V=this._eventData,U=this._eventContainer;if(V.cancelled=!1,N>0){for(this.sortGameObjects(F,A),P=0;P<N&&(L=F[P],!(!(!L.input||!L.input.enabled)&&(D.resetCursor(L.input),L.emit(s.GAMEOBJECT_POINTER_OUT,A,U),z++,V.cancelled||!this.isActive()||L.input&&L.input.enabled&&(this.emit(s.GAMEOBJECT_OUT,A,L,U),V.cancelled||!this.isActive()))));P++);(!V.cancelled||this.isActive())&&this.emit(s.POINTER_OUT,A,F)}if(N=w.length,V.cancelled=!1,N>0){for(this.sortGameObjects(w,A),P=0;P<N&&(L=w[P],!(!(!L.input||!L.input.enabled)&&(D.setCursor(L.input),L.emit(s.GAMEOBJECT_POINTER_OVER,A,L.input.localX,L.input.localY,U),z++,V.cancelled||!this.isActive()||L.input&&L.input.enabled&&(this.emit(s.GAMEOBJECT_OVER,A,L,U),V.cancelled||!this.isActive()))));P++);!V.cancelled&&this.isActive()&&this.emit(s.POINTER_OVER,A,w)}return B=O.concat(w),this._over[A.id]=this.sortGameObjects(B,A),z},processUpEvents:function(A){var R=this._temp,P=this._eventData,L=this._eventContainer;P.cancelled=!1;for(var F=0;F<R.length;F++){var w=R[F];if(!(!w.input||!w.input.enabled)&&(w.emit(s.GAMEOBJECT_POINTER_UP,A,w.input.localX,w.input.localY,L),P.cancelled||!this.isActive()||w.input&&w.input.enabled&&(this.emit(s.GAMEOBJECT_UP,A,w,L),P.cancelled||!this.isActive())))break}return!P.cancelled&&this.isActive()&&(A.upElement===this.manager.game.canvas?this.emit(s.POINTER_UP,A,R):this.emit(s.POINTER_UP_OUTSIDE,A)),R.length},forceDownState:function(A,R){this.forceState(A,R,s.GAMEOBJECT_POINTER_DOWN,s.GAMEOBJECT_DOWN,!1)},forceUpState:function(A,R){this.forceState(A,R,s.GAMEOBJECT_POINTER_UP,s.GAMEOBJECT_UP,!1)},forceOverState:function(A,R){this.forceState(A,R,s.GAMEOBJECT_POINTER_OVER,s.GAMEOBJECT_OVER,!0)},forceOutState:function(A,R){this.forceState(A,R,s.GAMEOBJECT_POINTER_OUT,s.GAMEOBJECT_OUT,!1)},forceState:function(A,R,P,L,F){var w=this._eventData,O=this._eventContainer;w.cancelled=!1,R.input&&R.input.enabled&&(R.emit(P,A,R.input.localX,R.input.localY,O),F&&this.setCursor(R.input),!w.cancelled&&this.isActive()&&R.input&&R.input.enabled&&this.emit(L,A,R,O))},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,R){R===void 0&&(R=!0),Array.isArray(A)||(A=[A]);for(var P=0;P<A.length;P++){var L=A[P];L.input.draggable=R;var F=this._draggable.indexOf(L);R&&F===-1?this._draggable.push(L):!R&&F>-1&&this._draggable.splice(F,1)}return this},makePixelPerfect:function(A){A===void 0&&(A=1);var R=this.systems.textures;return t(R,A)},setHitArea:function(A,R,P){if(R===void 0)return this.setHitAreaFromTexture(A);Array.isArray(A)||(A=[A]);var L=!1,F=!1,w=!1,O=!1,B=!1,I=!0;if(f(R)&&Object.keys(R).length){var D=R;R=o(D,"hitArea",null),P=o(D,"hitAreaCallback",null),B=o(D,"pixelPerfect",!1);var N=o(D,"alphaTolerance",1);B&&(R={},P=this.makePixelPerfect(N)),L=o(D,"draggable",!1),F=o(D,"dropZone",!1),w=o(D,"cursor",!1),O=o(D,"useHandCursor",!1),(!R||!P)&&(this.setHitAreaFromTexture(A),I=!1)}else typeof R=="function"&&!P&&(P=R,R={});for(var z=0;z<A.length;z++){var V=A[z];if(B&&V.type==="Container"){console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");continue}var U=V.input?V.input:d(V,R,P);U.customHitArea=I,U.dropZone=F,U.cursor=O?"pointer":w,V.input=U,L&&this.setDraggable(V),this.queueForInsertion(V)}return this},setHitAreaCircle:function(A,R,P,L,F){F===void 0&&(F=S);var w=new m(R,P,L);return this.setHitArea(A,w,F)},setHitAreaEllipse:function(A,R,P,L,F,w){w===void 0&&(w=i);var O=new l(R,P,L,F);return this.setHitArea(A,O,w)},setHitAreaFromTexture:function(A,R){R===void 0&&(R=g),Array.isArray(A)||(A=[A]);for(var P=0;P<A.length;P++){var L=A[P],F=L.frame,w=0,O=0;if(L.width?(w=L.width,O=L.height):F&&(w=F.realWidth,O=F.realHeight),L.type==="Container"&&(w===0||O===0)){console.warn("Container.setInteractive must specify a Shape or call setSize() first");continue}w!==0&&O!==0&&(L.input=d(L,new c(0,0,w,O),R),this.queueForInsertion(L))}return this},setHitAreaRectangle:function(A,R,P,L,F,w){w===void 0&&(w=g);var O=new c(R,P,L,F);return this.setHitArea(A,O,w)},setHitAreaTriangle:function(A,R,P,L,F,w,O,B){B===void 0&&(B=C);var I=new T(R,P,L,F,w,O);return this.setHitArea(A,I,B)},enableDebug:function(A,R){R===void 0&&(R=65280);var P=A.input;if(!P||!P.hitArea)return this;var L=P.hitArea,F=L.type,w=P.hitAreaDebug,O=this.systems.add,B=this.systems.updateList;w&&(B.remove(w),w.destroy(),w=null);var I=0,D=0;switch(F){case a.CIRCLE:w=O.arc(0,0,L.radius),I=L.x-L.radius,D=L.y-L.radius;break;case a.ELLIPSE:w=O.ellipse(0,0,L.width,L.height),I=L.x-L.width/2,D=L.y-L.height/2;break;case a.LINE:w=O.line(0,0,L.x1,L.y1,L.x2,L.y2);break;case a.POLYGON:w=O.polygon(0,0,L.points);break;case a.RECTANGLE:w=O.rectangle(0,0,L.width,L.height),I=L.x,D=L.y;break;case a.TRIANGLE:w=O.triangle(0,0,L.x1,L.y1,L.x2,L.y2,L.x3,L.y3);break}return w&&(w.isFilled=!1,w.strokeColor=R,w.preUpdate=function(){w.setVisible(A.visible),w.setStrokeStyle(1/A.scale,w.strokeColor),w.setDisplayOrigin(A.displayOriginX,A.displayOriginY);var N=A.x,z=A.y,V=A.rotation,U=A.scaleX,G=A.scaleY;if(A.parentContainer){var b=A.getWorldTransformMatrix();N=b.tx,z=b.ty,V=b.rotation,U=b.scaleX,G=b.scaleY}w.setRotation(V),w.setScale(U,G),w.setPosition(N+I*U,z+D*G),w.setScrollFactor(A.scrollFactorX,A.scrollFactorY),w.setDepth(A.depth)},B.add(w),P.hitAreaDebug=w),this},removeDebug:function(A){var R=A.input;if(R&&R.hitAreaDebug){var P=R.hitAreaDebug;P.destroy(),R.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,R){if(A.length<2||!R.camera)return A;var P=R.camera.renderList;return A.sort(function(L,F){var w=Math.max(P.indexOf(L),0),O=Math.max(P.indexOf(F),0);return O-w})},sortDropZones:function(A){return A.length<2?A:(this.scene.sys.depthSort(),A.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(A,R){if(!A.parentContainer&&!R.parentContainer)return this.displayList.getIndex(R)-this.displayList.getIndex(A);if(A.parentContainer===R.parentContainer)return R.parentContainer.getIndex(R)-A.parentContainer.getIndex(A);if(A.parentContainer===R)return-1;if(R.parentContainer===A)return 1;for(var P=A.getIndexList(),L=R.getIndexList(),F=Math.min(P.length,L.length),w=0;w<F;w++){var O=P[w],B=L[w];if(O!==B)return B-O}return L.length-P.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(s.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 R=this.manager;R.canvas.style.cursor=R.defaultCursor;var P=this.systems.events;P.off(p.TRANSITION_START,this.transitionIn,this),P.off(p.TRANSITION_OUT,this.transitionOut,this),P.off(p.TRANSITION_COMPLETE,this.transitionComplete,this),P.off(p.PRE_UPDATE,this.preUpdate,this),R.events.off(s.GAME_OUT,this.onGameOut,this),R.events.off(s.GAME_OVER,this.onGameOver,this),P.off(p.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var A=this.manager.pointers,R=0;R<A.length;R++)A[R].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(s.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(p.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]}}});v.register("InputPlugin",M,"input"),E.exports=M},89639:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35154),S={},x={};x.register=function(h,d,t,e,l){S[h]={plugin:d,mapping:t,settingsKey:e,configKey:l}},x.getPlugin=function(h){return S[h]},x.install=function(h){var d=h.scene.sys,t=d.settings.input,e=d.game.config;for(var l in S){var i=S[l].plugin,s=S[l].mapping,r=S[l].settingsKey,o=S[l].configKey;m(t,r,e[o])&&(h[s]=new i(h))}},x.remove=function(h){S.hasOwnProperty(h)&&delete S[h]},E.exports=x},42515:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(31040),S=n(83419),x=n(20339),h=n(43855),d=n(47235),t=n(26099),e=n(25892),l=new S({initialize:function(s,r){this.manager=s,this.id=r,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new t,this.prevPosition=new t,this.midPoint=new t(-1,-1),this.velocity=new t,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=r===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(i){var s=i.getWorldPoint(this.x,this.y);return this.worldX=s.x,this.worldY=s.y,this},positionToCamera:function(i,s){return i.getWorldPoint(this.x,this.y,s)},updateMotion:function(){var i=this.position.x,s=this.position.y,r=this.midPoint.x,o=this.midPoint.y;if(!(i===r&&s===o)){var a=d(this.motionFactor,r,i),u=d(this.motionFactor,o,s);h(a,i,.1)&&(a=i),h(u,s,.1)&&(u=s),this.midPoint.set(a,u);var f=i-a,v=s-u;this.velocity.set(f,v),this.angle=m(a,u,i,s),this.distance=Math.sqrt(f*f+v*v)}},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),e.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,s){i.pointerId&&(this.pointerId=i.pointerId),this.identifier=i.identifier,this.target=i.target,this.active=!0,this.buttons=1,this.event=s,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=s.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(i,s){this.event=s,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.moveTime=s.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(i,s){this.buttons=0,this.event=s,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=s.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(i,s){this.buttons=0,this.event=s,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=s.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?x(this.downX,this.downY,this.x,this.y):x(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?m(this.downX,this.downY,this.x,this.y):m(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(i,s){i===void 0&&(i=10),s===void 0&&(s=[]);for(var r=this.prevPosition.x,o=this.prevPosition.y,a=this.position.x,u=this.position.y,f=0;f<i;f++){var v=1/i*f;s[f]={x:d(v,r,a),y:d(v,o,u)}}return s},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}}});E.exports=l},93301:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};E.exports=y},7179:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="boot"},85375:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="destroy"},39843:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragend"},23388:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragenter"},16133:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="drag"},27829:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragleave"},53904:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragover"},56058:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragstart"},2642:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="drop"},88171:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="gameobjectdown"},36147:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragend"},71692:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragenter"},96149:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="drag"},81285:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragleave"},74048:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragover"},21322:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragstart"},49378:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="drop"},86754:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="gameobjectmove"},86433:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="gameobjectout"},60709:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="gameobjectover"},24081:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerdown"},11172:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointermove"},18907:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerout"},95579:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerover"},35368:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerup"},26972:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="wheel"},47078:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="gameobjectup"},73802:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="gameobjectwheel"},56718:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="gameout"},25936:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="gameover"},27503:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="boot"},50852:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="process"},96438:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="update"},59152:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerlockchange"},47777:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerdown"},27957:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerdownoutside"},19444:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointermove"},54251:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerout"},18667:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerover"},27192:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerup"},24652:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pointerupoutside"},45132:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="wheel"},44512:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="preupdate"},15757:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="shutdown"},41637:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="start"},93802:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="update"},8214:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={BOOT:n(7179),DESTROY:n(85375),DRAG_END:n(39843),DRAG_ENTER:n(23388),DRAG:n(16133),DRAG_LEAVE:n(27829),DRAG_OVER:n(53904),DRAG_START:n(56058),DROP:n(2642),GAME_OUT:n(56718),GAME_OVER:n(25936),GAMEOBJECT_DOWN:n(88171),GAMEOBJECT_DRAG_END:n(36147),GAMEOBJECT_DRAG_ENTER:n(71692),GAMEOBJECT_DRAG:n(96149),GAMEOBJECT_DRAG_LEAVE:n(81285),GAMEOBJECT_DRAG_OVER:n(74048),GAMEOBJECT_DRAG_START:n(21322),GAMEOBJECT_DROP:n(49378),GAMEOBJECT_MOVE:n(86754),GAMEOBJECT_OUT:n(86433),GAMEOBJECT_OVER:n(60709),GAMEOBJECT_POINTER_DOWN:n(24081),GAMEOBJECT_POINTER_MOVE:n(11172),GAMEOBJECT_POINTER_OUT:n(18907),GAMEOBJECT_POINTER_OVER:n(95579),GAMEOBJECT_POINTER_UP:n(35368),GAMEOBJECT_POINTER_WHEEL:n(26972),GAMEOBJECT_UP:n(47078),GAMEOBJECT_WHEEL:n(73802),MANAGER_BOOT:n(27503),MANAGER_PROCESS:n(50852),MANAGER_UPDATE:n(96438),POINTER_DOWN:n(47777),POINTER_DOWN_OUTSIDE:n(27957),POINTER_MOVE:n(19444),POINTER_OUT:n(54251),POINTER_OVER:n(18667),POINTER_UP:n(27192),POINTER_UP_OUTSIDE:n(24652),POINTER_WHEEL:n(45132),POINTERLOCK_CHANGE:n(59152),PRE_UPDATE:n(44512),SHUTDOWN:n(15757),START:n(41637),UPDATE:n(93802)}},97421:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d){this.pad=h,this.events=h.events,this.index=d,this.value=0,this.threshold=.1},update:function(x){this.value=x},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});E.exports=S},28884:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(92734),x=new m({initialize:function(d,t,e){e===void 0&&(e=!1),this.pad=d,this.events=d.manager,this.index=t,this.value=0,this.threshold=1,this.pressed=e},update:function(h){this.value=h;var d=this.pad,t=this.index;h>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(S.BUTTON_DOWN,d,this,h),this.pad.emit(S.GAMEPAD_BUTTON_DOWN,t,h,this)):this.pressed&&(this.pressed=!1,this.events.emit(S.BUTTON_UP,d,this,h),this.pad.emit(S.GAMEPAD_BUTTON_UP,t,h,this))},destroy:function(){this.pad=null,this.events=null}});E.exports=x},99125:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(97421),S=n(28884),x=n(83419),h=n(50792),d=n(26099),t=new x({Extends:h,initialize:function(l,i){h.call(this),this.manager=l,this.pad=i,this.id=i.id,this.index=i.index;for(var s=[],r=0;r<i.buttons.length;r++)s.push(new S(this,r,i.buttons[r].value>=.5));this.buttons=s;var o=[];for(r=0;r<i.axes.length;r++)o.push(new m(this,r));this.axes=o,this.vibration=i.vibrationActuator;var a={value:0,pressed:!1};this._LCLeft=s[14]?s[14]:a,this._LCRight=s[15]?s[15]:a,this._LCTop=s[12]?s[12]:a,this._LCBottom=s[13]?s[13]:a,this._RCLeft=s[2]?s[2]:a,this._RCRight=s[1]?s[1]:a,this._RCTop=s[3]?s[3]:a,this._RCBottom=s[0]?s[0]:a,this._FBLeftTop=s[4]?s[4]:a,this._FBLeftBottom=s[6]?s[6]:a,this._FBRightTop=s[5]?s[5]:a,this._FBRightBottom=s[7]?s[7]:a;var u={value:0};this._HAxisLeft=o[0]?o[0]:u,this._VAxisLeft=o[1]?o[1]:u,this._HAxisRight=o[2]?o[2]:u,this._VAxisRight=o[3]?o[3]:u,this.leftStick=new d,this.rightStick=new d,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(e){return this.axes[e].getValue()},setAxisThreshold:function(e){for(var l=0;l<this.axes.length;l++)this.axes[l].threshold=e},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(e){return this.buttons[e].value},isButtonDown:function(e){return this.buttons[e].pressed},update:function(e){if(!(e.timestamp<this._created)){var l,i=this.buttons,s=e.buttons,r=i.length;for(l=0;l<r;l++)i[l].update(s[l].value);var o=this.axes,a=e.axes;for(r=o.length,l=0;l<r;l++)o[l].update(a[l]);r>=2&&(this.leftStick.set(o[0].getValue(),o[1].getValue()),r>=4&&this.rightStick.set(o[2].getValue(),o[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var e;for(e=0;e<this.buttons.length;e++)this.buttons[e].destroy();for(e=0;e<this.axes.length;e++)this.axes[e].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}}});E.exports=t},56654:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50792),x=n(92734),h=n(99125),d=n(35154),t=n(89639),e=n(8214),l=new m({Extends:S,initialize:function(s){S.call(this),this.scene=s.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=s,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,s.pluginEvents.once(e.BOOT,this.boot,this),s.pluginEvents.on(e.START,this.start,this)},boot:function(){var i=this.scene.sys.game,s=this.settings.input,r=i.config;this.enabled=d(s,"gamepad",r.inputGamepad)&&i.device.input.gamepads,this.target=d(s,"gamepad.target",r.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var i=this,s=this.target,r=function(o){o.defaultPrevented||!i.isActive()||(i.refreshPads(),i.queue.push(o))};this.onGamepadHandler=r,s.addEventListener("gamepadconnected",r,!1),s.addEventListener("gamepaddisconnected",r,!1),this.sceneInputPlugin.pluginEvents.on(e.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(e.UPDATE,this.update);for(var i=this.gamepads,s=0;s<i.length;s++)i[s]&&i[s].removeAllListeners()},disconnectAll:function(){for(var i=this.gamepads,s=0;s<i.length;s++)i[s]&&(i[s].pad.connected=!1)},refreshPads:function(){var i=navigator.getGamepads();if(!i)this.disconnectAll();else for(var s=this.gamepads,r=0;r<i.length;r++){var o=i[r];if(o){var a=o.id,u=o.index,f=s[u];if(f)f.id!==a?(f.destroy(),s[u]=new h(this,o)):f.update(o);else{var v=new h(this,o);s[u]=v,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=v):this._pad3=v:this._pad2=v:this._pad1=v}}}},getAll:function(){for(var i=[],s=this.gamepads,r=0;r<s.length;r++)s[r]&&i.push(s[r]);return i},getPad:function(i){for(var s=this.gamepads,r=0;r<s.length;r++)if(s[r]&&s[r].index===i)return s[r]},update:function(){if(this.enabled){this.refreshPads();var i=this.queue.length;if(i!==0)for(var s=this.queue.splice(0,i),r=0;r<i;r++){var o=s[r],a=this.getPad(o.gamepad.index);o.type==="gamepadconnected"?this.emit(x.CONNECTED,a,o):o.type==="gamepaddisconnected"&&this.emit(x.DISCONNECTED,a,o)}}},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}}});t.register("GamepadPlugin",l,"gamepad","gamepad","inputGamepad"),E.exports=l},89651:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.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:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.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:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.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:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={DUALSHOCK_4:n(65294),SNES_USB:n(89651),XBOX_360:n(90089)}},46008:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="down"},7629:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="up"},42206:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="connected"},86544:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="disconnected"},94784:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="down"},14325:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="up"},92734:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={BUTTON_DOWN:n(46008),BUTTON_UP:n(7629),CONNECTED:n(42206),DISCONNECTED:n(86544),GAMEPAD_BUTTON_DOWN:n(94784),GAMEPAD_BUTTON_UP:n(14325)}},48646:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Axis:n(97421),Button:n(28884),Events:n(92734),Gamepad:n(99125),GamepadPlugin:n(56654),Configs:n(64894)}},14350:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(93301),S=n(79291),x={CreatePixelPerfectHandler:n(84409),CreateInteractiveObject:n(74457),Events:n(8214),Gamepad:n(48646),InputManager:n(7003),InputPlugin:n(48205),InputPluginCache:n(89639),Keyboard:n(51442),Mouse:n(87078),Pointer:n(42515),Touch:n(95618)};x=S(!1,x,m),E.exports=x},78970:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(72905),S=n(83419),x=n(8443),h=n(8214),d=n(46032),t=n(29747),e=new S({initialize:function(i){this.manager=i,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=t,this.onKeyUp=t,i.events.once(h.MANAGER_BOOT,this.boot,this)},boot:function(){var l=this.manager.config;this.enabled=l.inputKeyboard,this.target=l.inputKeyboardEventTarget,this.addCapture(l.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(x.POST_STEP,this.postUpdate,this)},startListeners:function(){var l=this;this.onKeyDown=function(s){if(!(s.defaultPrevented||!l.enabled||!l.manager)){l.queue.push(s),l.manager.events.emit(h.MANAGER_PROCESS);var r=s.altKey||s.ctrlKey||s.shiftKey||s.metaKey;l.preventDefault&&!r&&l.captures.indexOf(s.keyCode)>-1&&s.preventDefault()}},this.onKeyUp=function(s){if(!(s.defaultPrevented||!l.enabled||!l.manager)){l.queue.push(s),l.manager.events.emit(h.MANAGER_PROCESS);var r=s.altKey||s.ctrlKey||s.shiftKey||s.metaKey;l.preventDefault&&!r&&l.captures.indexOf(s.keyCode)>-1&&s.preventDefault()}};var i=this.target;i&&(i.addEventListener("keydown",this.onKeyDown,!1),i.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var l=this.target;l.removeEventListener("keydown",this.onKeyDown,!1),l.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(l){typeof l=="string"&&(l=l.split(",")),Array.isArray(l)||(l=[l]);for(var i=this.captures,s=0;s<l.length;s++){var r=l[s];typeof r=="string"&&(r=d[r.trim().toUpperCase()]),i.indexOf(r)===-1&&i.push(r)}this.preventDefault=i.length>0},removeCapture:function(l){typeof l=="string"&&(l=l.split(",")),Array.isArray(l)||(l=[l]);for(var i=this.captures,s=0;s<l.length;s++){var r=l[s];typeof r=="string"&&(r=d[r.toUpperCase()]),m(i,r)}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(x.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});E.exports=e},28846:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50792),x=n(95922),h=n(8443),d=n(35154),t=n(8214),e=n(89639),l=n(30472),i=n(46032),s=n(87960),r=n(74600),o=n(44594),a=n(56583),u=new m({Extends:S,initialize:function(v){S.call(this),this.game=v.systems.game,this.scene=v.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=v,this.manager=v.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,v.pluginEvents.once(t.BOOT,this.boot,this),v.pluginEvents.on(t.START,this.start,this)},boot:function(){var f=this.settings.input;this.enabled=d(f,"keyboard",!0);var v=d(f,"keyboard.capture",null);v&&this.addCaptures(v),this.sceneInputPlugin.pluginEvents.once(t.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(t.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(t.SHUTDOWN,this.shutdown,this),this.game.events.on(h.BLUR,this.resetKeys,this),this.scene.sys.events.on(o.PAUSE,this.resetKeys,this),this.scene.sys.events.on(o.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(f){return this.manager.addCapture(f),this},removeCapture:function(f){return this.manager.removeCapture(f),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:i.UP,down:i.DOWN,left:i.LEFT,right:i.RIGHT,space:i.SPACE,shift:i.SHIFT})},addKeys:function(f,v,c){v===void 0&&(v=!0),c===void 0&&(c=!1);var g={};if(typeof f=="string"){f=f.split(",");for(var p=0;p<f.length;p++){var T=f[p].trim();T&&(g[T]=this.addKey(T,v,c))}}else for(var C in f)g[C]=this.addKey(f[C],v,c);return g},addKey:function(f,v,c){v===void 0&&(v=!0),c===void 0&&(c=!1);var g=this.keys;if(f instanceof l){var p=g.indexOf(f);return p>-1?g[p]=f:g[f.keyCode]=f,v&&this.addCapture(f.keyCode),f.setEmitOnRepeat(c),f}return typeof f=="string"&&(f=i[f.toUpperCase()]),g[f]||(g[f]=new l(this,f),v&&this.addCapture(f),g[f].setEmitOnRepeat(c)),g[f]},removeKey:function(f,v,c){v===void 0&&(v=!1),c===void 0&&(c=!1);var g=this.keys,p;if(f instanceof l){var T=g.indexOf(f);T>-1&&(p=this.keys[T],this.keys[T]=void 0)}else typeof f=="string"&&(f=i[f.toUpperCase()]);return g[f]&&(p=g[f],g[f]=void 0),p&&(p.plugin=null,c&&this.removeCapture(p.keyCode),v&&p.destroy()),this},removeAllKeys:function(f,v){f===void 0&&(f=!1),v===void 0&&(v=!1);for(var c=this.keys,g=0;g<c.length;g++){var p=c[g];p&&(c[g]=void 0,v&&this.removeCapture(p.keyCode),f&&p.destroy())}return this},createCombo:function(f,v){return new s(this,f,v)},checkDown:function(f,v){if(v===void 0&&(v=0),this.enabled&&f.isDown){var c=a(this.time-f.timeDown,v);if(c>f._tick)return f._tick=c,!0}return!1},update:function(){var f=this.manager.queue,v=f.length;if(!(!this.isActive()||v===0))for(var c=this.keys,g=0;g<v;g++){var p=f[g],T=p.keyCode,C=c[T],M=!1;p.cancelled===void 0&&(p.cancelled=0,p.stopImmediatePropagation=function(){p.cancelled=1},p.stopPropagation=function(){p.cancelled=-1}),p.cancelled!==-1&&(T===this.prevCode&&p.timeStamp===this.prevTime&&p.type===this.prevType||(this.prevCode=T,this.prevTime=p.timeStamp,this.prevType=p.type,p.type==="keydown"?(C&&(M=C.isDown,C.onDown(p)),!p.cancelled&&(!C||!M)&&(r[T]&&this.emit(x.KEY_DOWN+r[T],p),p.cancelled||this.emit(x.ANY_KEY_DOWN,p))):(C&&C.onUp(p),p.cancelled||(r[T]&&this.emit(x.KEY_UP+r[T],p),p.cancelled||this.emit(x.ANY_KEY_UP,p))),p.cancelled===1&&(p.cancelled=0)))}},resetKeys:function(){for(var f=this.keys,v=0;v<f.length;v++)f[v]&&f[v].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(t.MANAGER_PROCESS,this.update,this),this.game.events.off(h.BLUR,this.resetKeys),this.scene.sys.events.off(o.PAUSE,this.resetKeys,this),this.scene.sys.events.off(o.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var f=this.keys,v=0;v<f.length;v++)f[v]&&f[v].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}}});e.register("KeyboardPlugin",u,"keyboard","keyboard","inputKeyboard"),E.exports=u},66970:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m.timeLastMatched=n.timeStamp,m.index++,m.index===m.size?!0:(m.current=m.keyCodes[m.index],!1)};E.exports=y},87960:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(95922),x=n(95540),h=n(68769),d=n(92803),t=new m({initialize:function(l,i,s){if(s===void 0&&(s={}),i.length<2)return!1;this.manager=l,this.enabled=!0,this.keyCodes=[];for(var r=0;r<i.length;r++){var o=i[r];typeof o=="string"?this.keyCodes.push(o.toUpperCase().charCodeAt(0)):typeof o=="number"?this.keyCodes.push(o):o.hasOwnProperty("keyCode")&&this.keyCodes.push(o.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=x(s,"resetOnWrongKey",!0),this.maxKeyDelay=x(s,"maxKeyDelay",0),this.resetOnMatch=x(s,"resetOnMatch",!1),this.deleteOnMatch=x(s,"deleteOnMatch",!1);var a=this,u=function(f){if(!(a.matched||!a.enabled)){var v=h(f,a);v&&(a.manager.emit(S.COMBO_MATCH,a,f),a.resetOnMatch?d(a):a.deleteOnMatch&&a.destroy())}};this.onKeyDown=u,this.manager.on(S.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(S.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});E.exports=t},68769:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66970),S=function(x,h){if(h.matched)return!0;var d=!1,t=!1;if(x.keyCode===h.current)if(h.index>0&&h.maxKeyDelay>0){var e=h.timeLastMatched+h.maxKeyDelay;x.timeStamp<=e&&(t=!0,d=m(x,h))}else t=!0,d=m(x,h);return!t&&h.resetOnWrongKey&&(h.index=0,h.current=h.keyCodes[0]),d&&(h.timeLastMatched=x.timeStamp,h.matched=!0,h.timeMatched=x.timeStamp),d};E.exports=S},92803:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.current=n.keyCodes[0],n.index=0,n.timeLastMatched=0,n.matched=!1,n.timeMatched=0,n};E.exports=y},92612:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="keydown"},23345:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="keyup"},21957:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="keycombomatch"},44743:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="down"},3771:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="keydown-"},46358:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="keyup-"},75674:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="up"},95922:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ANY_KEY_DOWN:n(92612),ANY_KEY_UP:n(23345),COMBO_MATCH:n(21957),DOWN:n(44743),KEY_DOWN:n(3771),KEY_UP:n(46358),UP:n(75674)}},51442:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Events:n(95922),KeyboardManager:n(78970),KeyboardPlugin:n(28846),Key:n(30472),KeyCodes:n(46032),KeyCombo:n(87960),AdvanceKeyCombo:n(66970),ProcessKeyCombo:n(68769),ResetKeyCombo:n(92803),JustDown:n(90229),JustUp:n(38796),DownDuration:n(37015),UpDuration:n(41170)}},37015:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=50);var S=n.plugin.game.loop.time-n.timeDown;return n.isDown&&S<m};E.exports=y},90229:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n._justDown?(n._justDown=!1,!0):!1};E.exports=y},38796:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n._justUp?(n._justUp=!1,!0):!1};E.exports=y},30472:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50792),x=n(95922),h=new m({Extends:S,initialize:function(t,e){S.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(d){return this.emitOnRepeat=d,this},onDown:function(d){this.originalEvent=d,this.enabled&&(this.altKey=d.altKey,this.ctrlKey=d.ctrlKey,this.shiftKey=d.shiftKey,this.metaKey=d.metaKey,this.location=d.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(x.DOWN,this,d):(this.isDown=!0,this.isUp=!1,this.timeDown=d.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(x.DOWN,this,d)))},onUp:function(d){this.originalEvent=d,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=d.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(x.UP,this,d))},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}});E.exports=h},46032:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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};E.exports=y},74600:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(46032),S={};for(var x in m)S[m[x]]=x;E.exports=S},41170:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=50);var S=n.plugin.game.loop.time-n.timeUp;return n.isUp&&S<m};E.exports=y},85098:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(89357),x=n(8214),h=n(29747),d=new m({initialize:function(e){this.manager=e,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=h,this.onMouseDown=h,this.onMouseUp=h,this.onMouseDownWindow=h,this.onMouseUpWindow=h,this.onMouseOver=h,this.onMouseOut=h,this.onMouseWheel=h,this.pointerLockChange=h,this.isTop=!0,e.events.once(x.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(S.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){S.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,l=this.manager,i=l.canvas,s=window&&window.focus&&l.game.config.autoFocus;this.onMouseMove=function(o){!o.defaultPrevented&&e.enabled&&l&&l.enabled&&(l.onMouseMove(o),e.preventDefaultMove&&o.preventDefault())},this.onMouseDown=function(o){s&&window.focus(),!o.defaultPrevented&&e.enabled&&l&&l.enabled&&(l.onMouseDown(o),e.preventDefaultDown&&o.target===i&&o.preventDefault())},this.onMouseDownWindow=function(o){o.sourceCapabilities&&o.sourceCapabilities.firesTouchEvents||!o.defaultPrevented&&e.enabled&&l&&l.enabled&&o.target!==i&&l.onMouseDown(o)},this.onMouseUp=function(o){!o.defaultPrevented&&e.enabled&&l&&l.enabled&&(l.onMouseUp(o),e.preventDefaultUp&&o.target===i&&o.preventDefault())},this.onMouseUpWindow=function(o){o.sourceCapabilities&&o.sourceCapabilities.firesTouchEvents||!o.defaultPrevented&&e.enabled&&l&&l.enabled&&o.target!==i&&l.onMouseUp(o)},this.onMouseOver=function(o){!o.defaultPrevented&&e.enabled&&l&&l.enabled&&l.setCanvasOver(o)},this.onMouseOut=function(o){!o.defaultPrevented&&e.enabled&&l&&l.enabled&&l.setCanvasOut(o)},this.onMouseWheel=function(o){!o.defaultPrevented&&e.enabled&&l&&l.enabled&&l.onMouseWheel(o),e.preventDefaultWheel&&o.target===i&&o.preventDefault()};var r={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,r),t.addEventListener("mouseout",this.onMouseOut,r),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,r),window&&l.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,r),window.top.addEventListener("mouseup",this.onMouseUpWindow,r)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,r),window.addEventListener("mouseup",this.onMouseUpWindow,r),this.isTop=!1}S.pointerLock&&(this.pointerLockChange=function(o){var a=e.target;e.locked=document.pointerLockElement===a||document.mozPointerLockElement===a||document.webkitPointerLockElement===a,l.onPointerLockChange(o)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(t=this.isTop?window.top:window,t.removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),S.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}});E.exports=d},87078:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={MouseManager:n(85098)}},36210:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(8214),x=n(29747),h=new m({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=x,this.onTouchStartWindow=x,this.onTouchMove=x,this.onTouchEnd=x,this.onTouchEndWindow=x,this.onTouchCancel=x,this.onTouchCancelWindow=x,this.isTop=!0,t.events.once(S.MANAGER_BOOT,this.boot,this)},boot:function(){var d=this.manager.config;this.enabled=d.inputTouch,this.target=d.inputTouchEventTarget,this.capture=d.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,d.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(d){return d.preventDefault(),!1}),this},startListeners:function(){var d=this.target;if(d){var t=this,e=this.manager,l=e.canvas,i=window&&window.focus&&e.game.config.autoFocus;this.onTouchMove=function(a){!a.defaultPrevented&&t.enabled&&e&&e.enabled&&(e.onTouchMove(a),t.capture&&a.cancelable&&a.preventDefault())},this.onTouchStart=function(a){i&&window.focus(),!a.defaultPrevented&&t.enabled&&e&&e.enabled&&(e.onTouchStart(a),t.capture&&a.cancelable&&a.target===l&&a.preventDefault())},this.onTouchStartWindow=function(a){!a.defaultPrevented&&t.enabled&&e&&e.enabled&&a.target!==l&&e.onTouchStart(a)},this.onTouchEnd=function(a){!a.defaultPrevented&&t.enabled&&e&&e.enabled&&(e.onTouchEnd(a),t.capture&&a.cancelable&&a.target===l&&a.preventDefault())},this.onTouchEndWindow=function(a){!a.defaultPrevented&&t.enabled&&e&&e.enabled&&a.target!==l&&e.onTouchEnd(a)},this.onTouchCancel=function(a){!a.defaultPrevented&&t.enabled&&e&&e.enabled&&(e.onTouchCancel(a),t.capture&&a.preventDefault())},this.onTouchCancelWindow=function(a){!a.defaultPrevented&&t.enabled&&e&&e.enabled&&e.onTouchCancel(a)};var s=this.capture,r={passive:!0},o={passive:!1};if(d.addEventListener("touchstart",this.onTouchStart,s?o:r),d.addEventListener("touchmove",this.onTouchMove,s?o:r),d.addEventListener("touchend",this.onTouchEnd,s?o:r),d.addEventListener("touchcancel",this.onTouchCancel,s?o:r),window&&e.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,o),window.top.addEventListener("touchend",this.onTouchEndWindow,o),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,o)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,o),window.addEventListener("touchend",this.onTouchEndWindow,o),window.addEventListener("touchcancel",this.onTouchCancelWindow,o),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var d=this.target;d.removeEventListener("touchstart",this.onTouchStart),d.removeEventListener("touchmove",this.onTouchMove),d.removeEventListener("touchend",this.onTouchEnd),d.removeEventListener("touchcancel",this.onTouchCancel),window&&(d=this.isTop?window.top:window,d.removeEventListener("touchstart",this.onTouchStartWindow),d.removeEventListener("touchend",this.onTouchEndWindow),d.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});E.exports=h},95618:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={TouchManager:n(36210)}},41299:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(54899),h=n(95540),d=n(98356),t=n(3374),e=n(84376),l=n(92638),i=new m({initialize:function(r,o){if(this.loader=r,this.cache=h(o,"cache",!1),this.type=h(o,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=h(o,"key",!1);var a=this.key;if(r.prefix&&r.prefix!==""&&(this.key=r.prefix+a),!this.key)throw new Error("Invalid File key: "+this.key);var u=h(o,"url");u===void 0?u=r.path+a+"."+h(o,"extension",""):typeof u=="string"&&!u.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(u=r.path+u),this.url=u,this.src="",this.xhrSettings=l(h(o,"responseType",void 0)),h(o,"xhrSettings",!1)&&(this.xhrSettings=t(this.xhrSettings,h(o,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?S.FILE_POPULATED:S.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=h(o,"config",{}),this.multiFile,this.linkFile,this.base64=typeof u=="string"&&u.indexOf("data:")===0,this.retryAttempts=h(o,"maxRetries",r.maxRetries)},setLink:function(s){this.linkFile=s,s.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===S.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=S.FILE_LOADING,this.src=d(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=e(this,this.loader.xhr)}},onLoad:function(s,r){var o=s.responseURL&&this.loader.localSchemes.some(function(f){return s.responseURL.indexOf(f)===0}),a=o&&r.target.status===0,u=!(r.target&&r.target.status!==200)||a;s.readyState===4&&s.status>=400&&s.status<=599&&(u=!1),this.state=S.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,u)},onBase64Load:function(s){this.xhrLoader=s,this.state=S.FILE_LOADED,this.percentComplete=1,this.loader.emit(x.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(s){s.lengthComputable&&(this.bytesLoaded=s.loaded,this.bytesTotal=s.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(x.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=S.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=S.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=S.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(s){if(this.state!==S.FILE_PENDING_DESTROY){s===void 0&&(s=this.data);var r=this.key,o=this.type;this.loader.emit(x.FILE_COMPLETE,r,o,s),this.loader.emit(x.FILE_KEY_COMPLETE+o+"-"+r,r,o,s),this.loader.flagForRemoval(this),this.state=S.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(s,r,o){if(typeof URL=="function")s.src=URL.createObjectURL(r);else{var a=new FileReader;a.onload=function(){s.removeAttribute("crossOrigin"),s.src="data:"+(r.type||o)+";base64,"+a.result.split(",")[1]},a.onerror=s.onerror,a.readAsDataURL(r)}},i.revokeObjectURL=function(s){typeof URL=="function"&&URL.revokeObjectURL(s.src)},E.exports=i},74099:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={},n={install:function(m){for(var S in y)m[S]=y[S]},register:function(m,S){y[m]=S},destroy:function(){y={}}};E.exports=n},98356:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.url?n.url.match(/^(?:blob:|data:|capacitor:\/\/|file:\/\/|http:\/\/|https:\/\/|\/\/)/)?n.url:m+n.url:!1};E.exports=y},74261:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(50792),h=n(54899),d=n(74099),t=n(95540),e=n(35154),l=n(41212),i=n(37277),s=n(44594),r=n(92638),o=new m({Extends:x,initialize:function(u){x.call(this);var f=u.sys.game.config,v=u.sys.settings.loader;this.scene=u,this.systems=u.sys,this.cacheManager=u.sys.cache,this.textureManager=u.sys.textures,this.sceneManager=u.sys.game.scene,d.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(t(v,"baseURL",f.loaderBaseURL)),this.setPath(t(v,"path",f.loaderPath)),this.setPrefix(t(v,"prefix",f.loaderPrefix)),this.maxParallelDownloads=t(v,"maxParallelDownloads",f.loaderMaxParallelDownloads),this.xhr=r(t(v,"responseType",f.loaderResponseType),t(v,"async",f.loaderAsync),t(v,"user",f.loaderUser),t(v,"password",f.loaderPassword),t(v,"timeout",f.loaderTimeout),t(v,"withCredentials",f.loaderWithCredentials)),this.crossOrigin=t(v,"crossOrigin",f.loaderCrossOrigin),this.imageLoadType=t(v,"imageLoadType",f.loaderImageLoadType),this.localSchemes=t(v,"localScheme",f.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new Set,this.inflight=new Set,this.queue=new Set,this._deleteQueue=new Set,this.totalFailed=0,this.totalComplete=0,this.state=S.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=t(v,"maxRetries",f.loaderMaxRetries),u.sys.events.once(s.BOOT,this.boot,this),u.sys.events.on(s.START,this.pluginStart,this)},boot:function(){this.systems.events.once(s.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(s.SHUTDOWN,this.shutdown,this)},setBaseURL:function(a){return a===void 0&&(a=""),a!==""&&a.substr(-1)!=="/"&&(a=a.concat("/")),this.baseURL=a,this},setPath:function(a){return a===void 0&&(a=""),a!==""&&a.substr(-1)!=="/"&&(a=a.concat("/")),this.path=a,this},setPrefix:function(a){return a===void 0&&(a=""),this.prefix=a,this},setCORS:function(a){return this.crossOrigin=a,this},addFile:function(a){Array.isArray(a)||(a=[a]);for(var u=0;u<a.length;u++){var f=a[u];this.keyExists(f)||(this.list.add(f),this.emit(h.ADD,f.key,f.type,this,f),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(a){var u=a.hasCacheConflict();return u||this.list.forEach(function(f){if(f.type===a.type&&f.key===a.key)return u=!0,!1}),!u&&this.isLoading()&&(this.inflight.forEach(function(f){if(f.type===a.type&&f.key===a.key)return u=!0,!1}),this.queue.forEach(function(f){if(f.type===a.type&&f.key===a.key)return u=!0,!1})),u},addPack:function(a,u){if(typeof u=="string"){var f=e(a,u);f&&(a={packKey:f})}var v=0,c=this.baseURL,g=this.path,p=this.prefix;for(var T in a)if(Object.prototype.hasOwnProperty.call(a,T)){var C=a[T],M=t(C,"baseURL",c),A=t(C,"path",g),R=t(C,"prefix",p),P=t(C,"files",null),L=t(C,"defaultType","void");if(Array.isArray(P)){this.setBaseURL(M),this.setPath(A),this.setPrefix(R);for(var F=0;F<P.length;F++){var w=P[F],O=w.hasOwnProperty("type")?w.type:L;this[O]&&(this[O](w),v++)}}}return this.setBaseURL(c),this.setPath(g),this.setPrefix(p),v>0},removePack:function(a,u){var f=this.systems.anims,v=this.cacheManager,c=this.textureManager,g={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"},p;if(l(a))p=a;else if(p=v.json.get(a),!p){console.warn("Asset Pack not found in JSON cache:",a);return}u&&(p={_:p[u]});for(var T in p){var C=p[T],M=t(C,"prefix",""),A=t(C,"files"),R=t(C,"defaultType");if(Array.isArray(A))for(var P=0;P<A.length;P++){var L=A[P],F=L.hasOwnProperty("type")?L.type:R;if(!F){console.warn("No type:",L);continue}var w=M+L.key;if(F==="animation"&&f.remove(w),!((F==="aseprite"||F==="atlas"||F==="atlasXML"||F==="htmlTexture"||F==="image"||F==="multiatlas"||F==="spritesheet"||F==="svg"||F==="texture"||F==="unityAtlas")&&(c.remove(w),!g[F]))){if(F==="pack"){this.removePack(w,L.dataKey);continue}if(F==="spine"){var O=v.custom.spine.get(w);if(!O)continue;var B=O.prefix===void 0?"":O.prefix;v.custom.spine.remove(w);var I=v.custom.spineTextures.get(w);if(!I)continue;v.custom.spineTextures.remove(w);for(var D=0;D<I.pages.length;D++){var N=I.pages[D],z=B+N.name,V=w+":"+z;c.exists(V)?c.remove(V):c.remove(z)}}var U=g[F];if(U!==null){if(!U){console.warn("Unknown type:",F);continue}var G=v[U];G.remove(w)}}}}},isLoading:function(){return this.state===S.LOADER_LOADING||this.state===S.LOADER_PROCESSING},isReady:function(){return this.state===S.LOADER_IDLE||this.state===S.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(h.START,this),this.list.size===0?this.loadComplete():(this.state=S.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(s.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(h.PROGRESS,this.progress)},update:function(){this.state===S.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.forEach(function(a){if((a.state===S.FILE_POPULATED||a.state===S.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.add(a),this.list.delete(a),a.crossOrigin||(a.crossOrigin=this.crossOrigin),a.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(a,u){this.inflight&&(this.inflight.delete(a),this.updateProgress(),u?(this.totalComplete++,this.queue.add(a),this.emit(h.FILE_LOAD,a),a.onProcess()):(this.totalFailed++,this._deleteQueue.add(a),this.emit(h.FILE_LOAD_ERROR,a),this.fileProcessComplete(a)))},fileProcessComplete:function(a){!this.scene||!this.systems||!this.systems.game||this.systems.game.pendingDestroy||(a.state===S.FILE_ERRORED?a.multiFile&&a.multiFile.onFileFailed(a):a.state===S.FILE_COMPLETE&&(a.multiFile?a.multiFile.isReadyToProcess()&&(a.multiFile.addToCache(),a.multiFile.pendingDestroy()):(a.addToCache(),a.pendingDestroy())),this.queue.delete(a),this.list.size===0&&this.inflight.size===0&&this.queue.size===0&&this.loadComplete())},loadComplete:function(){this.emit(h.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=S.LOADER_COMPLETE,this.systems.events.off(s.UPDATE,this.update,this),this._deleteQueue.forEach(function(a){a.destroy()}),this._deleteQueue.clear(),this.emit(h.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(a){this._deleteQueue.add(a)},saveJSON:function(a,u){return this.save(JSON.stringify(a),u)},save:function(a,u,f){u===void 0&&(u="file.json"),f===void 0&&(f="application/json");var v=new Blob([a],{type:f}),c=URL.createObjectURL(v),g=document.createElement("a");return g.download=u,g.textContent="Download "+u,g.href=c,g.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var a=this.systems.game.config,u=this.systems.settings.loader;this.setBaseURL(t(u,"baseURL",a.loaderBaseURL)),this.setPath(t(u,"path",a.loaderPath)),this.setPrefix(t(u,"prefix",a.loaderPrefix)),this.state=S.LOADER_IDLE},shutdown:function(){this.reset(),this.state=S.LOADER_SHUTDOWN,this.removeAllListeners(),this.systems.events.off(s.UPDATE,this.update,this),this.systems.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=S.LOADER_DESTROYED,this.systems.events.off(s.UPDATE,this.update,this),this.systems.events.off(s.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}});i.register("Loader",o,"load"),E.exports=o},3374:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(79291),S=n(92638),x=function(h,d){var t=h===void 0?S():m({},h);if(d)for(var e in d)d[e]!==void 0&&(t[e]=d[e]);return t};E.exports=x},26430:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(54899),h=new m({initialize:function(t,e,l,i){var s=[];i.forEach(function(a){a&&s.push(a)}),this.loader=t,this.type=e,this.key=l;var r=this.key;t.prefix&&t.prefix!==""&&(this.key=t.prefix+r),this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.state=S.FILE_PENDING,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o<s.length;o++)s[o].multiFile=this},isReadyToProcess:function(){return this.pending===0&&this.failed===0&&!this.complete},addToMultiFile:function(d){return this.files.push(d),d.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(d){var t=this.files.indexOf(d);t!==-1&&this.pending--},onFileFailed:function(d){var t=this.files.indexOf(d);t!==-1&&(this.failed++,console.error('File failed: %s "%s" (via %s "%s")',this.type,this.key,d.type,d.key))},pendingDestroy:function(){if(this.state!==S.FILE_PENDING_DESTROY){var d=this.key,t=this.type;this.loader.emit(x.FILE_COMPLETE,d,t),this.loader.emit(x.FILE_KEY_COMPLETE+t+"-"+d,d,t),this.loader.flagForRemoval(this);for(var e=0;e<this.files.length;e++)this.files[e].pendingDestroy();this.state=S.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}});E.exports=h},84376:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(3374),S=function(x,h){var d=m(h,x.xhrSettings);if(x.base64){var t=x.url.split(";base64,").pop()||x.url.split(",").pop(),e;x.xhrSettings.responseType==="arraybuffer"?e={response:Uint8Array.from(atob(t),function(s){return s.charCodeAt(0)}).buffer}:e={responseText:atob(t)},x.onBase64Load(e);return}var l=new XMLHttpRequest;if(l.open("GET",x.src,d.async,d.user,d.password),l.responseType=x.xhrSettings.responseType,l.timeout=d.timeout,d.headers)for(var i in d.headers)l.setRequestHeader(i,d.headers[i]);return d.header&&d.headerValue&&l.setRequestHeader(d.header,d.headerValue),d.requestedWith&&l.setRequestHeader("X-Requested-With",d.requestedWith),d.overrideMimeType&&l.overrideMimeType(d.overrideMimeType),d.withCredentials&&(l.withCredentials=!0),l.onload=x.onLoad.bind(x,l),l.onerror=x.onError.bind(x,l),l.onprogress=x.onProgress.bind(x),l.ontimeout=x.onError.bind(x,l),l.send(),l};E.exports=S},92638:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h,d){return n===void 0&&(n=""),m===void 0&&(m=!0),S===void 0&&(S=""),x===void 0&&(x=""),h===void 0&&(h=0),d===void 0&&(d=!1),{responseType:n,async:m,user:S,password:x,timeout:h,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:d}};E.exports=y},23906:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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};E.exports=y},42155:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="addfile"},38991:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="complete"},27540:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="filecomplete"},87464:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="filecomplete-"},94486:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="loaderror"},13035:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="load"},38144:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="fileprogress"},97520:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="postprocess"},85595:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="progress"},55680:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="start"},54899:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ADD:n(42155),COMPLETE:n(38991),FILE_COMPLETE:n(27540),FILE_KEY_COMPLETE:n(87464),FILE_LOAD_ERROR:n(94486),FILE_LOAD:n(13035),FILE_PROGRESS:n(38144),POST_PROCESS:n(97520),PROGRESS:n(85595),START:n(55680)}},14135:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(518),h=n(54899),d=new m({Extends:x,initialize:function(e,l,i,s,r){x.call(this,e,l,i,s,r),this.type="animationJSON"},onProcess:function(){this.loader.once(h.POST_PROCESS,this.onLoadComplete,this),x.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});S.register("animation",function(t,e,l,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new d(this,t[s]));else this.addFile(new d(this,t,e,i,l));return this}),E.exports=d},76272:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(95540),h=n(19550),d=n(41212),t=n(518),e=n(26430),l=new m({Extends:e,initialize:function(s,r,o,a,u,f){var v,c;if(d(r)){var g=r;r=x(g,"key"),v=new h(s,{key:r,url:x(g,"textureURL"),extension:x(g,"textureExtension","png"),normalMap:x(g,"normalMap"),xhrSettings:x(g,"textureXhrSettings")}),c=new t(s,{key:r,url:x(g,"atlasURL"),extension:x(g,"atlasExtension","json"),xhrSettings:x(g,"atlasXhrSettings")})}else v=new h(s,r,o,u),c=new t(s,r,a,f);v.linkFile?e.call(this,s,"atlasjson",r,[v,c,v.linkFile]):e.call(this,s,"atlasjson",r,[v,c])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],s=this.files[1],r=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,s.data,r),s.addToCache(),this.complete=!0}}});S.register("aseprite",function(i,s,r,o,a){var u;if(Array.isArray(i))for(var f=0;f<i.length;f++)u=new l(this,i[f]),this.addFile(u.files);else u=new l(this,i,s,r,o,a),this.addFile(u.files);return this}),E.exports=l},38734:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(95540),h=n(19550),d=n(41212),t=n(518),e=n(26430),l=new m({Extends:e,initialize:function(s,r,o,a,u,f){var v,c;if(d(r)){var g=r;r=x(g,"key"),v=new h(s,{key:r,url:x(g,"textureURL"),extension:x(g,"textureExtension","png"),normalMap:x(g,"normalMap"),xhrSettings:x(g,"textureXhrSettings")}),c=new t(s,{key:r,url:x(g,"atlasURL"),extension:x(g,"atlasExtension","json"),xhrSettings:x(g,"atlasXhrSettings")})}else v=new h(s,r,o,u),c=new t(s,r,a,f);v.linkFile?e.call(this,s,"atlasjson",r,[v,c,v.linkFile]):e.call(this,s,"atlasjson",r,[v,c])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],s=this.files[1],r=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,s.data,r),this.complete=!0}}});S.register("atlas",function(i,s,r,o,a){var u;if(Array.isArray(i))for(var f=0;f<i.length;f++)u=new l(this,i[f]),this.addFile(u.files);else u=new l(this,i,s,r,o,a),this.addFile(u.files);return this}),E.exports=l},74599:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(95540),h=n(19550),d=n(41212),t=n(26430),e=n(57318),l=new m({Extends:t,initialize:function(s,r,o,a,u,f){var v,c;if(d(r)){var g=r;r=x(g,"key"),v=new h(s,{key:r,url:x(g,"textureURL"),extension:x(g,"textureExtension","png"),normalMap:x(g,"normalMap"),xhrSettings:x(g,"textureXhrSettings")}),c=new e(s,{key:r,url:x(g,"atlasURL"),extension:x(g,"atlasExtension","xml"),xhrSettings:x(g,"atlasXhrSettings")})}else v=new h(s,r,o,u),c=new e(s,r,a,f);v.linkFile?t.call(this,s,"atlasxml",r,[v,c,v.linkFile]):t.call(this,s,"atlasxml",r,[v,c])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],s=this.files[1],r=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(i.key,i.data,s.data,r),this.complete=!0}}});S.register("atlasXML",function(i,s,r,o,a){var u;if(Array.isArray(i))for(var f=0;f<i.length;f++)u=new l(this,i[f]),this.addFile(u.files);else u=new l(this,i,s,r,o,a),this.addFile(u.files);return this}),E.exports=l},21097:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(89749),e=n(41212),l=new m({Extends:x,initialize:function(s,r,o,a,u){if(e(r)){var f=r;r=d(f,"key"),a=d(f,"xhrSettings"),u=d(f,"context",u)}var v={type:"audio",cache:s.cacheManager.audio,extension:o.type,responseType:"arraybuffer",key:r,url:o.url,xhrSettings:a,config:{context:u}};x.call(this,s,v)},onProcess:function(){this.state=S.FILE_PROCESSING;var i=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(s){i.data=s,i.onProcessComplete()},function(s){console.error("Error decoding audio: "+i.key+" - ",s?s.message:null),i.onProcessError()}),this.config.context=null}});l.create=function(i,s,r,o,a){var u=i.systems.game,f=u.config.audio,v=u.device.audio;e(s)&&(r=d(s,"url",[]),o=d(s,"config",{}));var c=l.getAudioURL(u,r);return c?v.webAudio&&!f.disableWebAudio?new l(i,s,c,a,u.sound.context):new t(i,s,c,o):(console.warn('No audio URLs for "%s" can play on this device',s),null)},l.getAudioURL=function(i,s){Array.isArray(s)||(s=[s]);for(var r=0;r<s.length;r++){var o=d(s[r],"url",s[r]);if(o.indexOf("blob:")===0||o.indexOf("data:")===0)return{url:o,type:""};var a=o.match(/\.([a-zA-Z0-9]+)($|\?)/);if(a=d(s[r],"type",a?a[1]:"").toLowerCase(),i.device.audio[a])return{url:o,type:a}}return null},h.register("audio",function(i,s,r,o){var a=this.systems.game,u=a.config.audio,f=a.device.audio;if(u.noAudio||!f.webAudio&&!f.audioData)return this;var v;if(Array.isArray(i))for(var c=0;c<i.length;c++)v=l.create(this,i[c]),v&&this.addFile(v);else v=l.create(this,i,s,r,o),v&&this.addFile(v);return this}),E.exports=l},89524:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(21097),S=n(83419),x=n(74099),h=n(95540),d=n(41212),t=n(518),e=n(26430),l=new S({Extends:e,initialize:function(s,r,o,a,u,f,v){if(d(r)){var c=r;r=h(c,"key"),o=h(c,"jsonURL"),a=h(c,"audioURL"),u=h(c,"audioConfig"),f=h(c,"audioXhrSettings"),v=h(c,"jsonXhrSettings")}var g;if(!a)g=new t(s,r,o,v),e.call(this,s,"audiosprite",r,[g]),this.config.resourceLoad=!0,this.config.audioConfig=u,this.config.audioXhrSettings=f;else{var p=m.create(s,r,a,u,f);p&&(g=new t(s,r,o,v),e.call(this,s,"audiosprite",r,[p,g]),this.config.resourceLoad=!1)}},onFileComplete:function(i){var s=this.files.indexOf(i);if(s!==-1&&(this.pending--,this.config.resourceLoad&&i.type==="json"&&i.data.hasOwnProperty("resources"))){var r=i.data.resources,o=h(this.config,"audioConfig"),a=h(this.config,"audioXhrSettings"),u=m.create(this.loader,i.key,r,o,a);u&&(this.addToMultiFile(u),this.loader.addFile(u))}},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],s=this.files[1];i.addToCache(),s.addToCache(),this.complete=!0}}});x.register("audioSprite",function(i,s,r,o,a,u){var f=this.systems.game,v=f.config.audio,c=f.device.audio;if(v&&v.noAudio||!c.webAudio&&!c.audioData)return this;var g;if(Array.isArray(i))for(var p=0;p<i.length;p++)g=new l(this,i[p]),g.files&&this.addFile(g.files);else g=new l(this,i,s,r,o,a,u),g.files&&this.addFile(g.files);return this})},85722:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o,a){var u="bin";if(t(s)){var f=s;s=d(f,"key"),r=d(f,"url"),o=d(f,"xhrSettings"),u=d(f,"extension",u),a=d(f,"dataType",a)}var v={type:"binary",cache:i.cacheManager.binary,extension:u,responseType:"arraybuffer",key:s,url:r,xhrSettings:o,config:{dataType:a}};x.call(this,i,v)},onProcess:function(){this.state=S.FILE_PROCESSING;var l=this.config.dataType;this.data=l?new l(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});h.register("binary",function(l,i,s,r){if(Array.isArray(l))for(var o=0;o<l.length;o++)this.addFile(new e(this,l[o]));else this.addFile(new e(this,l,i,r,s));return this}),E.exports=e},97025:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(95540),h=n(19550),d=n(41212),t=n(26430),e=n(21859),l=n(57318),i=new m({Extends:t,initialize:function(r,o,a,u,f,v){var c,g;if(d(o)){var p=o;o=x(p,"key"),c=new h(r,{key:o,url:x(p,"textureURL"),extension:x(p,"textureExtension","png"),normalMap:x(p,"normalMap"),xhrSettings:x(p,"textureXhrSettings")}),g=new l(r,{key:o,url:x(p,"fontDataURL"),extension:x(p,"fontDataExtension","xml"),xhrSettings:x(p,"fontDataXhrSettings")})}else c=new h(r,o,a,f),g=new l(r,o,u,v);c.linkFile?t.call(this,r,"bitmapfont",o,[c,g,c.linkFile]):t.call(this,r,"bitmapfont",o,[c,g])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],r=this.files[1];s.addToCache();var o=s.cache.get(s.key),a=e(r.data,s.cache.getFrame(s.key),0,0,o);this.loader.cacheManager.bitmapFont.add(s.key,{data:a,texture:s.key,frame:null}),this.complete=!0}}});S.register("bitmapFont",function(s,r,o,a,u){var f;if(Array.isArray(s))for(var v=0;v<s.length;v++)f=new i(this,s[v]),this.addFile(f.files);else f=new i(this,s,r,o,a,u),this.addFile(f.files);return this}),E.exports=i},16024:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o){var a="css";if(t(s)){var u=s;s=d(u,"key"),r=d(u,"url"),o=d(u,"xhrSettings"),a=d(u,"extension",a)}var f={type:"script",cache:!1,extension:a,responseType:"text",key:s,url:r,xhrSettings:o};x.call(this,i,f)},onProcess:function(){this.state=S.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});h.register("css",function(l,i,s){if(Array.isArray(l))for(var r=0;r<l.length;r++)this.addFile(new e(this,l[r]));else this.addFile(new e(this,l,i,s));return this}),E.exports=e},69559:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(38734),S=n(85722),x=n(83419),h=n(74099),d=n(95540),t=n(19550),e=n(41212),l=n(518),i=n(31403),s=n(46975),r=n(59327),o=n(26430),a=n(82038),u=n(55222),f=new x({Extends:o,initialize:function(c,g,p,T){if(p.multiAtlasURL){var C=new l(c,{key:g,url:p.multiAtlasURL,xhrSettings:T,config:p});o.call(this,c,"texture",g,[C])}else{var M=p.textureURL.substr(p.textureURL.length-3);p.type||(p.type=M.toLowerCase()==="ktx"?"KTX":"PVR");var A=new S(c,{key:g,url:p.textureURL,extension:M,xhrSettings:T,config:p});if(p.atlasURL){var R=new l(c,{key:g,url:p.atlasURL,xhrSettings:T,config:p});o.call(this,c,"texture",g,[A,R])}else o.call(this,c,"texture",g,[A])}this.config=p},onFileComplete:function(v){var c=this.files.indexOf(v);if(c!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(v.type==="json"&&v.data.hasOwnProperty("textures")){var g=v.data.textures,p=this.config,T=this.loader,C=T.baseURL,M=T.path,A=T.prefix,R=d(p,"multiBaseURL",this.baseURL),P=d(p,"multiPath",this.path),L=d(p,"prefix",this.prefix),F=d(p,"textureXhrSettings");R&&T.setBaseURL(R),P&&T.setPath(P),L&&T.setPrefix(L);for(var w=0;w<g.length;w++){var O=g[w].image,B="CMA"+this.multiKeyIndex+"_"+O,I=new S(T,B,O,F);if(this.addToMultiFile(I),T.addFile(I),g[w].normalMap){var D=new S(T,B,g[w].normalMap,F);D.type="normalMap",I.setLink(D),this.addToMultiFile(D),T.addFile(D)}}T.setBaseURL(C),T.setPath(M),T.setPrefix(A)}}},addToCache:function(){function v(R){console.warn('Compressed Texture Invalid: "'+C.key+'". '+R)}if(this.isReadyToProcess()){var c=this.config;if(c.multiAtlasURL)this.addMultiToCache();else{var g=this.loader.systems.renderer,p=this.loader.textureManager,T,C=this.files[0],M=this.files[1];if(c.type==="PVR"?T=a(C.data):c.type==="KTX"&&(T=i(C.data),T||v("KTX file contains unsupported format.")),T&&!u(T)&&(v("Texture dimensions failed verification. Check the texture format specifications for "+c.format+" 0x"+T.internalFormat.toString(16)+"."),T=null),T&&!g.supportsCompressedTexture(c.format,T.internalFormat)&&(v("Texture format "+c.format+" with internal format "+T.internalFormat+" not supported by the GPU. Texture invalid. This is often due to the texture using sRGB instead of linear RGB."),T=null),T){T.format=g.getCompressedTextureName(c.format,T.internalFormat);var A=M&&M.data?M.data:null;p.addCompressedTexture(C.key,T,A)}}this.complete=!0}},addMultiToCache:function(){for(var v=this.config,c=this.files[0],g=[],p=[],T=[],C=this.loader.systems.renderer,M=this.loader.textureManager,A,R=1;R<this.files.length;R++){var P=this.files[R];if(P.type!=="normalMap")for(var L=P.key.indexOf("_"),F=P.key.substr(L+1),w=P.data,O=0;O<c.data.textures.length;O++){var B=c.data.textures[O];if(B.image===F){v.type==="PVR"?A=a(w):v.type==="KTX"&&(A=i(w)),A&&C.supportsCompressedTexture(v.format,A.internalFormat)&&(A.format=C.getCompressedTextureName(v.format,A.internalFormat),p.push(A),g.push(B),P.linkFile&&T.push(P.linkFile.data));break}}}T.length===0&&(T=void 0),M.addAtlasJSONArray(this.key,p,g,T),this.complete=!0}});h.register("texture",function(v,c,g){var p=this.systems.renderer,T=function(M,A,R,P){var L={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(e(A)){var F=A;A=d(F,"key"),R=d(F,"url"),P=d(F,"xhrSettings")}var w=!1;for(var O in R)if(p.supportsCompressedTexture(O)){var B=R[O];typeof B=="string"?L.textureURL=B:L=s(B,L),L.format=O.toUpperCase(),w=!0;break}if(!w)console.warn("No supported compressed texture format or IMG fallback",A);else if(L.format==="IMG"){var I,D;L.multiAtlasURL?(D=new r(M,A,L.multiAtlasURL,L.multiPath,L.multiBaseURL,P),I=D.files):L.atlasURL?(D=new m(M,A,L.textureURL,L.atlasURL,P),I=D.files):I=new t(M,A,L.textureURL,P),M.addFile(I)}else{var N=new f(M,A,L,P);M.addFile(N.files)}};if(Array.isArray(v))for(var C=0;C<v.length;C++)T(this,v[C]);else T(this,v,c,g);return this}),E.exports=f},87674:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(98356),e=n(41212),l=new m({Extends:x,initialize:function(s,r,o,a,u,f){var v="ttf";if(e(r)){var c=r;r=d(c,"key"),o=d(c,"url"),a=d(c,"format","truetype"),u=d(c,"descriptors",null),f=d(c,"xhrSettings"),v=d(c,"extension",v)}else a===void 0&&(a="truetype");var g={type:"font",cache:!1,extension:v,responseType:"text",key:r,url:o,xhrSettings:f};x.call(this,s,g),this.data={format:a,descriptors:u},this.state=S.FILE_POPULATED},onProcess:function(){this.state=S.FILE_PROCESSING,this.src=t(this,this.loader.baseURL);var i,s=this.key,r="url("+this.src+') format("'+this.data.format+'")';this.data.descriptors?i=new FontFace(s,r,this.data.descriptors):i=new FontFace(s,r);var o=this;i.load().then(function(){document.fonts.add(i),document.body.classList.add("fonts-loaded"),o.onProcessComplete()}).catch(function(){console.warn("Font failed to load",r),o.onProcessComplete()})}});h.register("font",function(i,s,r,o,a){if(Array.isArray(i))for(var u=0;u<i.length;u++)this.addFile(new l(this,i[u]));else this.addFile(new l(this,i,s,r,o,a));return this}),E.exports=l},47931:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=n(73894),l=new m({Extends:x,initialize:function(s,r,o,a){var u="glsl";if(t(r)){var f=r;r=d(f,"key"),o=d(f,"url"),a=d(f,"xhrSettings"),u=d(f,"extension",u)}var v={type:"glsl",cache:s.cacheManager.shader,extension:u,responseType:"text",key:r,url:o,xhrSettings:a};x.call(this,s,v)},onProcess:function(){this.state=S.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){this.cache.add(this.key,new e(this.key,this.data))}});h.register("glsl",function(i,s,r){if(Array.isArray(i))for(var o=0;o<i.length;o++)this.addFile(new l(this,i[o]));else this.addFile(new l(this,i,s,r));return this}),E.exports=l},89749:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(54899),x=n(41299),h=n(95540),d=n(98356),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o){if(t(s)){var a=s;s=h(a,"key"),o=h(a,"config",o)}var u={type:"audio",cache:i.cacheManager.audio,extension:r.type,key:s,url:r.url,config:o};x.call(this,i,u),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 l=0;l<this.data.length;l++){var i=this.data[l];i.oncanplaythrough=null,i.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(l){var i=l.target;i.oncanplaythrough=null,i.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(S.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var l=this.config&&this.config.instances||1;this.filesTotal=l,this.filesLoaded=0,this.percentComplete=0;for(var i=0;i<l;i++){var s=new Audio;s.dataset||(s.dataset={}),s.dataset.name=this.key+("0"+i).slice(-2),s.dataset.used="false",this.locked?s.dataset.locked="true":(s.dataset.locked="false",s.preload="auto",s.oncanplaythrough=this.onProgress.bind(this),s.onerror=this.onError.bind(this)),this.data.push(s)}for(i=0;i<this.data.length;i++)s=this.data[i],s.src=d(this,this.loader.baseURL),this.locked||s.load();this.locked&&setTimeout(this.onLoad.bind(this))}});E.exports=e},88470:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o){var a="html";if(t(s)){var u=s;s=d(u,"key"),r=d(u,"url"),o=d(u,"xhrSettings"),a=d(u,"extension",a)}var f={type:"text",cache:i.cacheManager.html,extension:a,responseType:"text",key:s,url:r,xhrSettings:o};x.call(this,i,f)},onProcess:function(){this.state=S.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});h.register("html",function(l,i,s){if(Array.isArray(l))for(var r=0;r<l.length;r++)this.addFile(new e(this,l[r]));else this.addFile(new e(this,l,i,s));return this}),E.exports=e},14643:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o,a,u){o===void 0&&(o=512),a===void 0&&(a=512);var f="html";if(t(s)){var v=s;s=d(v,"key"),r=d(v,"url"),u=d(v,"xhrSettings"),f=d(v,"extension",f),o=d(v,"width",o),a=d(v,"height",a)}var c={type:"html",cache:i.textureManager,extension:f,responseType:"text",key:s,url:r,xhrSettings:u,config:{width:o,height:a}};x.call(this,i,c)},onProcess:function(){this.state=S.FILE_PROCESSING;var l=this.config.width,i=this.config.height,s=[];s.push('<svg width="'+l+'px" height="'+i+'px" viewBox="0 0 '+l+" "+i+'" xmlns="http://www.w3.org/2000/svg">'),s.push('<foreignObject width="100%" height="100%">'),s.push('<body xmlns="http://www.w3.org/1999/xhtml">'),s.push(this.xhrLoader.responseText),s.push("</body>"),s.push("</foreignObject>"),s.push("</svg>");var r=[s.join(`
|
||
`)],o=this;try{var a=new window.Blob(r,{type:"image/svg+xml;charset=utf-8"})}catch{o.state=S.FILE_ERRORED,o.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){x.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){x.revokeObjectURL(o.data),o.onProcessError()},x.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});h.register("htmlTexture",function(l,i,s,r,o){if(Array.isArray(l))for(var a=0;a<l.length;a++)this.addFile(new e(this,l[a]));else this.addFile(new e(this,l,i,s,r,o));return this}),E.exports=e},19550:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=n(98356),l=new m({Extends:x,initialize:function i(s,r,o,a,u){var f="png",v;if(t(r)){var c=r;r=d(c,"key"),o=d(c,"url"),v=d(c,"normalMap"),a=d(c,"xhrSettings"),f=d(c,"extension",f),u=d(c,"frameConfig")}Array.isArray(o)&&(v=o[1],o=o[0]);var g={type:"image",cache:s.textureManager,extension:f,responseType:"blob",key:r,url:o,xhrSettings:a,config:u};if(x.call(this,s,g),v){var p=new i(s,this.key,v,a,u);p.type="normalMap",this.setLink(p),s.addFile(p)}this.useImageElementLoad=s.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=S.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){x.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){x.revokeObjectURL(i.data),i.onProcessError()},x.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=S.FILE_PROCESSING,i===S.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=S.FILE_LOADING,this.src=e(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){i.state=S.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>=S.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)}});h.register("image",function(i,s,r){if(Array.isArray(i))for(var o=0;o<i.length;o++)this.addFile(new l(this,i[o]));else this.addFile(new l(this,i,s,r));return this}),E.exports=l},518:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(35154),e=n(41212),l=new m({Extends:x,initialize:function(s,r,o,a,u){var f="json";if(e(r)){var v=r;r=d(v,"key"),o=d(v,"url"),a=d(v,"xhrSettings"),f=d(v,"extension",f),u=d(v,"dataKey",u)}var c={type:"json",cache:s.cacheManager.json,extension:f,responseType:"text",key:r,url:o,xhrSettings:a,config:u};x.call(this,s,c),e(o)&&(u?this.data=t(o,u):this.data=o,this.state=S.FILE_POPULATED)},onProcess:function(){if(this.state!==S.FILE_POPULATED){this.state=S.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(r){throw this.onProcessError(),r}var s=this.config;typeof s=="string"?this.data=t(i,s,i):this.data=i}this.onProcessComplete()}});h.register("json",function(i,s,r,o){if(Array.isArray(i))for(var a=0;a<i.length;a++)this.addFile(new l(this,i[a]));else this.addFile(new l(this,i,s,o,r));return this}),E.exports=l},59327:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(95540),h=n(19550),d=n(41212),t=n(518),e=n(26430),l=new m({Extends:e,initialize:function(s,r,o,a,u,f,v){if(d(r)){var c=r;r=x(c,"key"),x(c,"url",!1)?o=x(c,"url"):o=x(c,"atlasURL"),f=x(c,"xhrSettings"),a=x(c,"path"),u=x(c,"baseURL"),v=x(c,"textureXhrSettings")}var g=new t(s,r,o,f);e.call(this,s,"multiatlas",r,[g]),this.config.path=a,this.config.baseURL=u,this.config.textureXhrSettings=v},onFileComplete:function(i){var s=this.files.indexOf(i);if(s!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var r=i.data.textures,o=this.config,a=this.loader,u=a.baseURL,f=a.path,v=a.prefix,c=x(o,"baseURL",this.baseURL),g=x(o,"path",this.path),p=x(o,"prefix",this.prefix),T=x(o,"textureXhrSettings");a.setBaseURL(c),a.setPath(g),a.setPrefix(p);for(var C=0;C<r.length;C++){var M=r[C].image,A="MA"+this.multiKeyIndex+"_"+M,R=new h(a,A,M,T);if(this.addToMultiFile(R),a.addFile(R),r[C].normalMap){var P=new h(a,A,r[C].normalMap,T);P.type="normalMap",R.setLink(P),this.addToMultiFile(P),a.addFile(P)}}a.setBaseURL(u),a.setPath(f),a.setPrefix(v)}},addToCache:function(){if(this.isReadyToProcess()){for(var i=this.files[0],s=[],r=[],o=[],a=1;a<this.files.length;a++){var u=this.files[a];if(u.type!=="normalMap")for(var f=u.key.indexOf("_"),v=u.key.substr(f+1),c=u.data,g=0;g<i.data.textures.length;g++){var p=i.data.textures[g];if(p.image===v){r.push(c),s.push(p),u.linkFile&&o.push(u.linkFile.data);break}}}o.length===0&&(o=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,r,s,o),this.complete=!0}}});S.register("multiatlas",function(i,s,r,o,a){var u;if(Array.isArray(i))for(var f=0;f<i.length;f++)u=new l(this,i[f]),this.addFile(u.files);else u=new l(this,i,s,r,o,a),this.addFile(u.files);return this}),E.exports=l},99297:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(95540),h=n(41212),d=n(26430),t=n(34328),e=new m({Extends:d,initialize:function(i,s,r,o){var a="js",u=[];if(h(s)){var f=s;s=x(f,"key"),r=x(f,"url"),o=x(f,"xhrSettings"),a=x(f,"extension",a)}Array.isArray(r)||(r=[r]);for(var v=0;v<r.length;v++){var c=new t(i,{key:s+"_"+v.toString(),url:r[v],extension:a,xhrSettings:o});c.onProcess=function(){this.onProcessComplete()},u.push(c)}d.call(this,i,"scripts",s,u)},addToCache:function(){if(this.isReadyToProcess()){for(var l=0;l<this.files.length;l++){var i=this.files[l];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}}});S.register("scripts",function(l,i,s){var r;if(Array.isArray(l))for(var o=0;o<l.length;o++)r=new e(this,l[o]),this.addFile(r.files);else r=new e(this,l,i,s),this.addFile(r.files);return this}),E.exports=e},58610:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(74099),h=n(518),d=new m({Extends:h,initialize:function(e,l,i,s,r){h.call(this,e,l,i,s,r),this.type="packfile"},onProcess:function(){if(this.state!==S.FILE_POPULATED&&(this.state=S.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});x.register("pack",function(t,e,l,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new d(this,t[s]));else this.addFile(new d(this,t,e,i,l));return this}),E.exports=d},48988:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o,a,u){var f="js";if(t(s)){var v=s;s=d(v,"key"),r=d(v,"url"),u=d(v,"xhrSettings"),f=d(v,"extension",f),o=d(v,"start"),a=d(v,"mapping")}var c={type:"plugin",cache:!1,extension:f,responseType:"text",key:s,url:r,xhrSettings:u,config:{start:o,mapping:a}};x.call(this,i,c),typeof r=="function"&&(this.data=r,this.state=S.FILE_POPULATED)},onProcess:function(){var l=this.loader.systems.plugins,i=this.config,s=d(i,"start",!1),r=d(i,"mapping",null);if(this.state===S.FILE_POPULATED)l.install(this.key,this.data,s,r);else{this.state=S.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 o=l.install(this.key,window[this.key],s,r);(s||r)&&(this.loader.systems[r]=o,this.loader.scene[r]=o)}this.onProcessComplete()}});h.register("plugin",function(l,i,s,r,o){if(Array.isArray(l))for(var a=0;a<l.length;a++)this.addFile(new e(this,l[a]));else this.addFile(new e(this,l,i,s,r,o));return this}),E.exports=e},67397:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o,a){var u="svg";if(t(s)){var f=s;s=d(f,"key"),r=d(f,"url"),o=d(f,"svgConfig",{}),a=d(f,"xhrSettings"),u=d(f,"extension",u)}var v={type:"svg",cache:i.textureManager,extension:u,responseType:"text",key:s,url:r,xhrSettings:a,config:{width:d(o,"width"),height:d(o,"height"),scale:d(o,"scale")}};x.call(this,i,v)},onProcess:function(){this.state=S.FILE_PROCESSING;var l=this.xhrLoader.responseText,i=[l],s=this.config.width,r=this.config.height,o=this.config.scale;t:if(s&&r||o){var a=null,u=new DOMParser;a=u.parseFromString(l,"text/xml");var f=a.getElementsByTagName("svg")[0],v=f.hasAttribute("viewBox"),c=parseFloat(f.getAttribute("width")),g=parseFloat(f.getAttribute("height"));if(!v&&c&&g)f.setAttribute("viewBox","0 0 "+c+" "+g);else if(v&&!c&&!g){var p=f.getAttribute("viewBox").split(/\s+|,/);c=p[2],g=p[3]}if(o)if(c&&g)s=c*o,r=g*o;else break t;f.setAttribute("width",s.toString()+"px"),f.setAttribute("height",r.toString()+"px"),i=[new XMLSerializer().serializeToString(f)]}try{var T=new window.Blob(i,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var C=this,M=!1;this.data.onload=function(){M||x.revokeObjectURL(C.data),C.onProcessComplete()},this.data.onerror=function(){M?C.onProcessError():(M=!0,x.revokeObjectURL(C.data),C.data.src="data:image/svg+xml,"+encodeURIComponent(i.join("")))},x.createObjectURL(this.data,T,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});h.register("svg",function(l,i,s,r){if(Array.isArray(l))for(var o=0;o<l.length;o++)this.addFile(new e(this,l[o]));else this.addFile(new e(this,l,i,s,r));return this}),E.exports=e},88423:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o){var a="js";if(t(s)){var u=s;s=d(u,"key"),r=d(u,"url"),o=d(u,"xhrSettings"),a=d(u,"extension",a)}var f={type:"text",extension:a,responseType:"text",key:s,url:r,xhrSettings:o};x.call(this,i,f)},onProcess:function(){this.state=S.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var l=this.data.concat(`(function(){
|
||
return new `+this.key+`();
|
||
}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(l)),this.complete=!0}});h.register("sceneFile",function(l,i,s){if(Array.isArray(l))for(var r=0;r<l.length;r++)this.addFile(new e(this,l[r]));else this.addFile(new e(this,l,i,s));return this}),E.exports=e},56812:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o,a,u){var f="js";if(t(s)){var v=s;s=d(v,"key"),r=d(v,"url"),u=d(v,"xhrSettings"),f=d(v,"extension",f),o=d(v,"systemKey"),a=d(v,"sceneKey")}var c={type:"scenePlugin",cache:!1,extension:f,responseType:"text",key:s,url:r,xhrSettings:u,config:{systemKey:o,sceneKey:a}};x.call(this,i,c),typeof r=="function"&&(this.data=r,this.state=S.FILE_POPULATED)},onProcess:function(){var l=this.loader.systems.plugins,i=this.config,s=this.key,r=d(i,"systemKey",s),o=d(i,"sceneKey",s);this.state===S.FILE_POPULATED?l.installScenePlugin(r,this.data,o,this.loader.scene,!0):(this.state=S.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),l.installScenePlugin(r,window[this.key],o,this.loader.scene,!0)),this.onProcessComplete()}});h.register("scenePlugin",function(l,i,s,r,o){if(Array.isArray(l))for(var a=0;a<l.length;a++)this.addFile(new e(this,l[a]));else this.addFile(new e(this,l,i,s,r,o));return this}),E.exports=e},34328:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o,a){var u="js";if(t(s)){var f=s;s=d(f,"key"),r=d(f,"url"),o=d(f,"type","script"),a=d(f,"xhrSettings"),u=d(f,"extension",u)}else o===void 0&&(o="script");var v={type:o,cache:!1,extension:u,responseType:"text",key:s,url:r,xhrSettings:a};x.call(this,i,v)},onProcess:function(){this.state=S.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()}});h.register("script",function(l,i,s,r){if(Array.isArray(l))for(var o=0;o<l.length;o++)this.addFile(new e(this,l[o]));else this.addFile(new e(this,l,i,s,r));return this}),E.exports=e},85035:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(74099),h=n(19550),d=new m({Extends:h,initialize:function(e,l,i,s,r){h.call(this,e,l,i,r,s),this.type="spritesheet"},addToCache:function(){var t=this.linkFile;t?t.state>=S.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,t.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,t.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});x.register("spritesheet",function(t,e,l,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new d(this,t[s]));else this.addFile(new d(this,t,e,l,i));return this}),E.exports=d},78776:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=new m({Extends:x,initialize:function(i,s,r,o){var a="text",u="txt",f=i.cacheManager.text;if(t(s)){var v=s;s=d(v,"key"),r=d(v,"url"),o=d(v,"xhrSettings"),u=d(v,"extension",u),a=d(v,"type",a),f=d(v,"cache",f)}var c={type:a,cache:f,extension:u,responseType:"text",key:s,url:r,xhrSettings:o};x.call(this,i,c)},onProcess:function(){this.state=S.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});h.register("text",function(l,i,s){if(Array.isArray(l))for(var r=0;r<l.length;r++)this.addFile(new e(this,l[r]));else this.addFile(new e(this,l,i,s));return this}),E.exports=e},49477:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=n(80341),l=new m({Extends:x,initialize:function(s,r,o,a){var u="csv";if(t(r)){var f=r;r=d(f,"key"),o=d(f,"url"),a=d(f,"xhrSettings"),u=d(f,"extension",u)}var v={type:"tilemapCSV",cache:s.cacheManager.tilemap,extension:u,responseType:"text",key:r,url:o,xhrSettings:a};x.call(this,s,v),this.tilemapFormat=e.CSV},onProcess:function(){this.state=S.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)}});h.register("tilemapCSV",function(i,s,r){if(Array.isArray(i))for(var o=0;o<i.length;o++)this.addFile(new l(this,i[o]));else this.addFile(new l(this,i,s,r));return this}),E.exports=l},40807:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(518),h=n(80341),d=new m({Extends:x,initialize:function(e,l,i,s){x.call(this,e,l,i,s),this.type="tilemapJSON",this.cache=e.cacheManager.tilemap},addToCache:function(){var t={format:h.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});S.register("tilemapImpact",function(t,e,l){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new d(this,t[i]));else this.addFile(new d(this,t,e,l));return this}),E.exports=d},56775:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(518),h=n(80341),d=new m({Extends:x,initialize:function(e,l,i,s){x.call(this,e,l,i,s),this.type="tilemapJSON",this.cache=e.cacheManager.tilemap},addToCache:function(){var t={format:h.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});S.register("tilemapTiledJSON",function(t,e,l){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new d(this,t[i]));else this.addFile(new d(this,t,e,l));return this}),E.exports=d},25771:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(74099),x=n(95540),h=n(19550),d=n(41212),t=n(26430),e=n(78776),l=new m({Extends:t,initialize:function(s,r,o,a,u,f){var v,c;if(d(r)){var g=r;r=x(g,"key"),v=new h(s,{key:r,url:x(g,"textureURL"),extension:x(g,"textureExtension","png"),normalMap:x(g,"normalMap"),xhrSettings:x(g,"textureXhrSettings")}),c=new e(s,{key:r,url:x(g,"atlasURL"),extension:x(g,"atlasExtension","txt"),xhrSettings:x(g,"atlasXhrSettings")})}else v=new h(s,r,o,u),c=new e(s,r,a,f);v.linkFile?t.call(this,s,"unityatlas",r,[v,c,v.linkFile]):t.call(this,s,"unityatlas",r,[v,c])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],s=this.files[1],r=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,s.data,r),this.complete=!0}}});S.register("unityAtlas",function(i,s,r,o,a){var u;if(Array.isArray(i))for(var f=0;f<i.length;f++)u=new l(this,i[f]),this.addFile(u.files);else u=new l(this,i,s,r,o,a),this.addFile(u.files);return this}),E.exports=l},33720:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(98356),t=n(95540),e=n(41212),l=new m({Extends:x,initialize:function(s,r,o,a){if(a===void 0&&(a=!1),e(r)){var u=r;r=t(u,"key"),o=t(u,"url",[]),a=t(u,"noAudio",!1)}var f=s.systems.game.device.video.getVideoURL(o);f||console.warn("VideoFile: No supported format for "+r);var v={type:"video",cache:s.cacheManager.video,extension:f.type,key:r,url:f.url,config:{noAudio:a}};x.call(this,s,v)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=d(this,this.loader.baseURL),this.state=S.FILE_LOADED,this.loader.nextFile(this,!0)}});h.register("video",function(i,s,r){if(Array.isArray(i))for(var o=0;o<i.length;o++)this.addFile(new l(this,i[o]));else this.addFile(new l(this,i,s,r));return this}),E.exports=l},57318:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(23906),x=n(41299),h=n(74099),d=n(95540),t=n(41212),e=n(56836),l=new m({Extends:x,initialize:function(s,r,o,a){var u="xml";if(t(r)){var f=r;r=d(f,"key"),o=d(f,"url"),a=d(f,"xhrSettings"),u=d(f,"extension",u)}var v={type:"xml",cache:s.cacheManager.xml,extension:u,responseType:"text",key:r,url:o,xhrSettings:a};x.call(this,s,v)},onProcess:function(){this.state=S.FILE_PROCESSING,this.data=e(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});h.register("xml",function(i,s,r){if(Array.isArray(i))for(var o=0;o<i.length;o++)this.addFile(new l(this,i[o]));else this.addFile(new l(this,i,s,r));return this}),E.exports=l},64589:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={AnimationJSONFile:n(14135),AsepriteFile:n(76272),AtlasJSONFile:n(38734),AtlasXMLFile:n(74599),AudioFile:n(21097),AudioSpriteFile:n(89524),BinaryFile:n(85722),BitmapFontFile:n(97025),CompressedTextureFile:n(69559),CSSFile:n(16024),FontFile:n(87674),GLSLFile:n(47931),HTML5AudioFile:n(89749),HTMLFile:n(88470),HTMLTextureFile:n(14643),ImageFile:n(19550),JSONFile:n(518),MultiAtlasFile:n(59327),MultiScriptFile:n(99297),PackFile:n(58610),PluginFile:n(48988),SceneFile:n(88423),ScenePluginFile:n(56812),ScriptFile:n(34328),SpriteSheetFile:n(85035),SVGFile:n(67397),TextFile:n(78776),TilemapCSVFile:n(49477),TilemapImpactFile:n(40807),TilemapJSONFile:n(56775),UnityAtlasFile:n(25771),VideoFile:n(33720),XMLFile:n(57318)}},57777:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(23906),S=n(79291),x={Events:n(54899),FileTypes:n(64589),File:n(41299),FileTypesManager:n(74099),GetURL:n(98356),LoaderPlugin:n(74261),MergeXHRSettings:n(3374),MultiFile:n(26430),XHRLoader:n(84376),XHRSettings:n(92638)};x=S(!1,x,m),E.exports=x},53307:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){for(var m=0,S=0;S<n.length;S++)m+=+n[S];return m/n.length};E.exports=y},85710:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(6411),S=function(x,h){return m(x)/m(h)/m(x-h)};E.exports=S},30976:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return Math.floor(Math.random()*(m-n+1)+n)};E.exports=y},87842:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h){var d=(x-m)*.5,t=(h-S)*.5,e=n*n,l=n*e;return(2*S-2*x+d+t)*l+(-3*S+3*x-2*d-t)*e+d*n+S};E.exports=y},26302:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){m===void 0&&(m=0),S===void 0&&(S=10);var x=Math.pow(S,-m);return Math.ceil(n*x)/x};E.exports=y},45319:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return Math.max(m,Math.min(S,n))};E.exports=y},39506:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=function(x){return x*m.DEG_TO_RAD};E.exports=S},61241:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return Math.abs(n-m)};E.exports=y},38857:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(37867),h=n(29747),d=new x,t=new S({initialize:function e(l,i,s,r){l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=e.DefaultOrder),this._x=l,this._y=i,this._z=s,this._order=r,this.onChangeCallback=h},x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(e){this._order=e,this.onChangeCallback(this)}},set:function(e,l,i,s){return s===void 0&&(s=this._order),this._x=e,this._y=l,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(e){return this.set(e.x,e.y,e.z,e.order)},setFromQuaternion:function(e,l,i){return l===void 0&&(l=this._order),i===void 0&&(i=!1),d.fromQuat(e),this.setFromRotationMatrix(d,l,i)},setFromRotationMatrix:function(e,l,i){l===void 0&&(l=this._order),i===void 0&&(i=!1);var s=e.val,r=s[0],o=s[4],a=s[8],u=s[1],f=s[5],v=s[9],c=s[2],g=s[6],p=s[10],T=0,C=0,M=0,A=.99999;switch(l){case"XYZ":{C=Math.asin(m(a,-1,1)),Math.abs(a)<A?(T=Math.atan2(-v,p),M=Math.atan2(-o,r)):T=Math.atan2(g,f);break}case"YXZ":{T=Math.asin(-m(v,-1,1)),Math.abs(v)<A?(C=Math.atan2(a,p),M=Math.atan2(u,f)):C=Math.atan2(-c,r);break}case"ZXY":{T=Math.asin(m(g,-1,1)),Math.abs(g)<A?(C=Math.atan2(-c,p),M=Math.atan2(-o,f)):M=Math.atan2(u,r);break}case"ZYX":{C=Math.asin(-m(c,-1,1)),Math.abs(c)<A?(T=Math.atan2(g,p),M=Math.atan2(u,r)):M=Math.atan2(-o,f);break}case"YZX":{M=Math.asin(m(u,-1,1)),Math.abs(u)<A?(T=Math.atan2(-v,f),C=Math.atan2(-c,r)):C=Math.atan2(a,p);break}case"XZY":{M=Math.asin(-m(o,-1,1)),Math.abs(o)<A?(T=Math.atan2(g,f),C=Math.atan2(a,r)):T=Math.atan2(-v,p);break}}return this._x=T,this._y=C,this._z=M,this._order=l,i&&this.onChangeCallback(this),this}});t.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],t.DefaultOrder="XYZ",E.exports=t},6411:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){if(n===0)return 1;for(var m=n;--n;)m*=n;return m};E.exports=y},99472:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return Math.random()*(m-n)+n};E.exports=y},77623:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){m===void 0&&(m=0),S===void 0&&(S=10);var x=Math.pow(S,-m);return Math.floor(n*x)/x};E.exports=y},62945:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=function(x,h,d){return x=m(x,0,1),(d-h)*x+h};E.exports=S},2672:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h){h===void 0&&(h=new m);var d=x.length;if(!Array.isArray(x)||d===0)throw new Error("GetCentroid points be a non-empty array");if(d===1)h.x=x[0].x,h.y=x[0].y;else{for(var t=0;t<d;t++)h.x+=x[t].x,h.y+=x[t].y;h.x/=d,h.y/=d}return h};E.exports=S},38265:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n/m/1e3};E.exports=y},55133:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=function(x,h){h===void 0&&(h=new m);for(var d=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,i=0;i<x.length;i++){var s=x[i];s.x>d&&(d=s.x),s.x<t&&(t=s.x),s.y>e&&(e=s.y),s.y<l&&(l=s.y)}return h.x=t,h.y=l,h.width=d-t,h.height=e-l,h};E.exports=S},78702:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n==parseFloat(n)?!(n%2):void 0};E.exports=y},94883:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n===parseFloat(n)?!(n%2):void 0};E.exports=y},28915:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return(m-n)*S+n};E.exports=y},94908:E=>{/**
|
||
* @author Greg McLean <GregDevProjects>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return S===void 0&&(S=0),n.clone().lerp(m,S)};E.exports=y},94434:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h){this.val=new Float32Array(9),h?this.copy(h):this.identity()},clone:function(){return new S(this)},set:function(x){return this.copy(x)},copy:function(x){var h=this.val,d=x.val;return h[0]=d[0],h[1]=d[1],h[2]=d[2],h[3]=d[3],h[4]=d[4],h[5]=d[5],h[6]=d[6],h[7]=d[7],h[8]=d[8],this},fromMat4:function(x){var h=x.val,d=this.val;return d[0]=h[0],d[1]=h[1],d[2]=h[2],d[3]=h[4],d[4]=h[5],d[5]=h[6],d[6]=h[8],d[7]=h[9],d[8]=h[10],this},fromArray:function(x){var h=this.val;return h[0]=x[0],h[1]=x[1],h[2]=x[2],h[3]=x[3],h[4]=x[4],h[5]=x[5],h[6]=x[6],h[7]=x[7],h[8]=x[8],this},identity:function(){var x=this.val;return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=1,x[5]=0,x[6]=0,x[7]=0,x[8]=1,this},transpose:function(){var x=this.val,h=x[1],d=x[2],t=x[5];return x[1]=x[3],x[2]=x[6],x[3]=h,x[5]=x[7],x[6]=d,x[7]=t,this},invert:function(){var x=this.val,h=x[0],d=x[1],t=x[2],e=x[3],l=x[4],i=x[5],s=x[6],r=x[7],o=x[8],a=o*l-i*r,u=-o*e+i*s,f=r*e-l*s,v=h*a+d*u+t*f;return v?(v=1/v,x[0]=a*v,x[1]=(-o*d+t*r)*v,x[2]=(i*d-t*l)*v,x[3]=u*v,x[4]=(o*h-t*s)*v,x[5]=(-i*h+t*e)*v,x[6]=f*v,x[7]=(-r*h+d*s)*v,x[8]=(l*h-d*e)*v,this):null},adjoint:function(){var x=this.val,h=x[0],d=x[1],t=x[2],e=x[3],l=x[4],i=x[5],s=x[6],r=x[7],o=x[8];return x[0]=l*o-i*r,x[1]=t*r-d*o,x[2]=d*i-t*l,x[3]=i*s-e*o,x[4]=h*o-t*s,x[5]=t*e-h*i,x[6]=e*r-l*s,x[7]=d*s-h*r,x[8]=h*l-d*e,this},determinant:function(){var x=this.val,h=x[0],d=x[1],t=x[2],e=x[3],l=x[4],i=x[5],s=x[6],r=x[7],o=x[8];return h*(o*l-i*r)+d*(-o*e+i*s)+t*(r*e-l*s)},multiply:function(x){var h=this.val,d=h[0],t=h[1],e=h[2],l=h[3],i=h[4],s=h[5],r=h[6],o=h[7],a=h[8],u=x.val,f=u[0],v=u[1],c=u[2],g=u[3],p=u[4],T=u[5],C=u[6],M=u[7],A=u[8];return h[0]=f*d+v*l+c*r,h[1]=f*t+v*i+c*o,h[2]=f*e+v*s+c*a,h[3]=g*d+p*l+T*r,h[4]=g*t+p*i+T*o,h[5]=g*e+p*s+T*a,h[6]=C*d+M*l+A*r,h[7]=C*t+M*i+A*o,h[8]=C*e+M*s+A*a,this},translate:function(x){var h=this.val,d=x.x,t=x.y;return h[6]=d*h[0]+t*h[3]+h[6],h[7]=d*h[1]+t*h[4]+h[7],h[8]=d*h[2]+t*h[5]+h[8],this},rotate:function(x){var h=this.val,d=h[0],t=h[1],e=h[2],l=h[3],i=h[4],s=h[5],r=Math.sin(x),o=Math.cos(x);return h[0]=o*d+r*l,h[1]=o*t+r*i,h[2]=o*e+r*s,h[3]=o*l-r*d,h[4]=o*i-r*t,h[5]=o*s-r*e,this},scale:function(x){var h=this.val,d=x.x,t=x.y;return h[0]=d*h[0],h[1]=d*h[1],h[2]=d*h[2],h[3]=t*h[3],h[4]=t*h[4],h[5]=t*h[5],this},fromQuat:function(x){var h=x.x,d=x.y,t=x.z,e=x.w,l=h+h,i=d+d,s=t+t,r=h*l,o=h*i,a=h*s,u=d*i,f=d*s,v=t*s,c=e*l,g=e*i,p=e*s,T=this.val;return T[0]=1-(u+v),T[3]=o+p,T[6]=a-g,T[1]=o-p,T[4]=1-(r+v),T[7]=f+c,T[2]=a+g,T[5]=f-c,T[8]=1-(r+u),this},normalFromMat4:function(x){var h=x.val,d=this.val,t=h[0],e=h[1],l=h[2],i=h[3],s=h[4],r=h[5],o=h[6],a=h[7],u=h[8],f=h[9],v=h[10],c=h[11],g=h[12],p=h[13],T=h[14],C=h[15],M=t*r-e*s,A=t*o-l*s,R=t*a-i*s,P=e*o-l*r,L=e*a-i*r,F=l*a-i*o,w=u*p-f*g,O=u*T-v*g,B=u*C-c*g,I=f*T-v*p,D=f*C-c*p,N=v*C-c*T,z=M*N-A*D+R*I+P*B-L*O+F*w;return z?(z=1/z,d[0]=(r*N-o*D+a*I)*z,d[1]=(o*B-s*N-a*O)*z,d[2]=(s*D-r*B+a*w)*z,d[3]=(l*D-e*N-i*I)*z,d[4]=(t*N-l*B+i*O)*z,d[5]=(e*B-t*D-i*w)*z,d[6]=(p*F-T*L+C*P)*z,d[7]=(T*R-g*F-C*A)*z,d[8]=(g*L-p*R+C*M)*z,this):null}});E.exports=S},37867:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(25836),x=1e-6,h=new m({initialize:function(r){this.val=new Float32Array(16),r?this.copy(r):this.identity()},clone:function(){return new h(this)},set:function(s){return this.copy(s)},setValues:function(s,r,o,a,u,f,v,c,g,p,T,C,M,A,R,P){var L=this.val;return L[0]=s,L[1]=r,L[2]=o,L[3]=a,L[4]=u,L[5]=f,L[6]=v,L[7]=c,L[8]=g,L[9]=p,L[10]=T,L[11]=C,L[12]=M,L[13]=A,L[14]=R,L[15]=P,this},copy:function(s){var r=s.val;return this.setValues(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])},fromArray:function(s){return this.setValues(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10],s[11],s[12],s[13],s[14],s[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(s,r,o){var a=d.fromQuat(o),u=a.val,f=r.x,v=r.y,c=r.z;return this.setValues(u[0]*f,u[1]*f,u[2]*f,0,u[4]*v,u[5]*v,u[6]*v,0,u[8]*c,u[9]*c,u[10]*c,0,s.x,s.y,s.z,1)},xyz:function(s,r,o){this.identity();var a=this.val;return a[12]=s,a[13]=r,a[14]=o,this},scaling:function(s,r,o){this.zero();var a=this.val;return a[0]=s,a[5]=r,a[10]=o,a[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 s=this.val,r=s[1],o=s[2],a=s[3],u=s[6],f=s[7],v=s[11];return s[1]=s[4],s[2]=s[8],s[3]=s[12],s[4]=r,s[6]=s[9],s[7]=s[13],s[8]=o,s[9]=u,s[11]=s[14],s[12]=a,s[13]=f,s[14]=v,this},getInverse:function(s){return this.copy(s),this.invert()},invert:function(){var s=this.val,r=s[0],o=s[1],a=s[2],u=s[3],f=s[4],v=s[5],c=s[6],g=s[7],p=s[8],T=s[9],C=s[10],M=s[11],A=s[12],R=s[13],P=s[14],L=s[15],F=r*v-o*f,w=r*c-a*f,O=r*g-u*f,B=o*c-a*v,I=o*g-u*v,D=a*g-u*c,N=p*R-T*A,z=p*P-C*A,V=p*L-M*A,U=T*P-C*R,G=T*L-M*R,b=C*L-M*P,Y=F*b-w*G+O*U+B*V-I*z+D*N;return Y?(Y=1/Y,this.setValues((v*b-c*G+g*U)*Y,(a*G-o*b-u*U)*Y,(R*D-P*I+L*B)*Y,(C*I-T*D-M*B)*Y,(c*V-f*b-g*z)*Y,(r*b-a*V+u*z)*Y,(P*O-A*D-L*w)*Y,(p*D-C*O+M*w)*Y,(f*G-v*V+g*N)*Y,(o*V-r*G-u*N)*Y,(A*I-R*O+L*F)*Y,(T*O-p*I-M*F)*Y,(v*z-f*U-c*N)*Y,(r*U-o*z+a*N)*Y,(R*w-A*B-P*F)*Y,(p*B-T*w+C*F)*Y)):this},adjoint:function(){var s=this.val,r=s[0],o=s[1],a=s[2],u=s[3],f=s[4],v=s[5],c=s[6],g=s[7],p=s[8],T=s[9],C=s[10],M=s[11],A=s[12],R=s[13],P=s[14],L=s[15];return this.setValues(v*(C*L-M*P)-T*(c*L-g*P)+R*(c*M-g*C),-(o*(C*L-M*P)-T*(a*L-u*P)+R*(a*M-u*C)),o*(c*L-g*P)-v*(a*L-u*P)+R*(a*g-u*c),-(o*(c*M-g*C)-v*(a*M-u*C)+T*(a*g-u*c)),-(f*(C*L-M*P)-p*(c*L-g*P)+A*(c*M-g*C)),r*(C*L-M*P)-p*(a*L-u*P)+A*(a*M-u*C),-(r*(c*L-g*P)-f*(a*L-u*P)+A*(a*g-u*c)),r*(c*M-g*C)-f*(a*M-u*C)+p*(a*g-u*c),f*(T*L-M*R)-p*(v*L-g*R)+A*(v*M-g*T),-(r*(T*L-M*R)-p*(o*L-u*R)+A*(o*M-u*T)),r*(v*L-g*R)-f*(o*L-u*R)+A*(o*g-u*v),-(r*(v*M-g*T)-f*(o*M-u*T)+p*(o*g-u*v)),-(f*(T*P-C*R)-p*(v*P-c*R)+A*(v*C-c*T)),r*(T*P-C*R)-p*(o*P-a*R)+A*(o*C-a*T),-(r*(v*P-c*R)-f*(o*P-a*R)+A*(o*c-a*v)),r*(v*C-c*T)-f*(o*C-a*T)+p*(o*c-a*v))},determinant:function(){var s=this.val,r=s[0],o=s[1],a=s[2],u=s[3],f=s[4],v=s[5],c=s[6],g=s[7],p=s[8],T=s[9],C=s[10],M=s[11],A=s[12],R=s[13],P=s[14],L=s[15],F=r*v-o*f,w=r*c-a*f,O=r*g-u*f,B=o*c-a*v,I=o*g-u*v,D=a*g-u*c,N=p*R-T*A,z=p*P-C*A,V=p*L-M*A,U=T*P-C*R,G=T*L-M*R,b=C*L-M*P;return F*b-w*G+O*U+B*V-I*z+D*N},multiply:function(s){var r=this.val,o=r[0],a=r[1],u=r[2],f=r[3],v=r[4],c=r[5],g=r[6],p=r[7],T=r[8],C=r[9],M=r[10],A=r[11],R=r[12],P=r[13],L=r[14],F=r[15],w=s.val,O=w[0],B=w[1],I=w[2],D=w[3];return r[0]=O*o+B*v+I*T+D*R,r[1]=O*a+B*c+I*C+D*P,r[2]=O*u+B*g+I*M+D*L,r[3]=O*f+B*p+I*A+D*F,O=w[4],B=w[5],I=w[6],D=w[7],r[4]=O*o+B*v+I*T+D*R,r[5]=O*a+B*c+I*C+D*P,r[6]=O*u+B*g+I*M+D*L,r[7]=O*f+B*p+I*A+D*F,O=w[8],B=w[9],I=w[10],D=w[11],r[8]=O*o+B*v+I*T+D*R,r[9]=O*a+B*c+I*C+D*P,r[10]=O*u+B*g+I*M+D*L,r[11]=O*f+B*p+I*A+D*F,O=w[12],B=w[13],I=w[14],D=w[15],r[12]=O*o+B*v+I*T+D*R,r[13]=O*a+B*c+I*C+D*P,r[14]=O*u+B*g+I*M+D*L,r[15]=O*f+B*p+I*A+D*F,this},multiplyLocal:function(s){var r=this.val,o=s.val;return this.setValues(r[0]*o[0]+r[1]*o[4]+r[2]*o[8]+r[3]*o[12],r[0]*o[1]+r[1]*o[5]+r[2]*o[9]+r[3]*o[13],r[0]*o[2]+r[1]*o[6]+r[2]*o[10]+r[3]*o[14],r[0]*o[3]+r[1]*o[7]+r[2]*o[11]+r[3]*o[15],r[4]*o[0]+r[5]*o[4]+r[6]*o[8]+r[7]*o[12],r[4]*o[1]+r[5]*o[5]+r[6]*o[9]+r[7]*o[13],r[4]*o[2]+r[5]*o[6]+r[6]*o[10]+r[7]*o[14],r[4]*o[3]+r[5]*o[7]+r[6]*o[11]+r[7]*o[15],r[8]*o[0]+r[9]*o[4]+r[10]*o[8]+r[11]*o[12],r[8]*o[1]+r[9]*o[5]+r[10]*o[9]+r[11]*o[13],r[8]*o[2]+r[9]*o[6]+r[10]*o[10]+r[11]*o[14],r[8]*o[3]+r[9]*o[7]+r[10]*o[11]+r[11]*o[15],r[12]*o[0]+r[13]*o[4]+r[14]*o[8]+r[15]*o[12],r[12]*o[1]+r[13]*o[5]+r[14]*o[9]+r[15]*o[13],r[12]*o[2]+r[13]*o[6]+r[14]*o[10]+r[15]*o[14],r[12]*o[3]+r[13]*o[7]+r[14]*o[11]+r[15]*o[15])},premultiply:function(s){return this.multiplyMatrices(s,this)},multiplyMatrices:function(s,r){var o=s.val,a=r.val,u=o[0],f=o[4],v=o[8],c=o[12],g=o[1],p=o[5],T=o[9],C=o[13],M=o[2],A=o[6],R=o[10],P=o[14],L=o[3],F=o[7],w=o[11],O=o[15],B=a[0],I=a[4],D=a[8],N=a[12],z=a[1],V=a[5],U=a[9],G=a[13],b=a[2],Y=a[6],W=a[10],H=a[14],X=a[3],K=a[7],Z=a[11],Q=a[15];return this.setValues(u*B+f*z+v*b+c*X,g*B+p*z+T*b+C*X,M*B+A*z+R*b+P*X,L*B+F*z+w*b+O*X,u*I+f*V+v*Y+c*K,g*I+p*V+T*Y+C*K,M*I+A*V+R*Y+P*K,L*I+F*V+w*Y+O*K,u*D+f*U+v*W+c*Z,g*D+p*U+T*W+C*Z,M*D+A*U+R*W+P*Z,L*D+F*U+w*W+O*Z,u*N+f*G+v*H+c*Q,g*N+p*G+T*H+C*Q,M*N+A*G+R*H+P*Q,L*N+F*G+w*H+O*Q)},translate:function(s){return this.translateXYZ(s.x,s.y,s.z)},translateXYZ:function(s,r,o){var a=this.val;return a[12]=a[0]*s+a[4]*r+a[8]*o+a[12],a[13]=a[1]*s+a[5]*r+a[9]*o+a[13],a[14]=a[2]*s+a[6]*r+a[10]*o+a[14],a[15]=a[3]*s+a[7]*r+a[11]*o+a[15],this},scale:function(s){return this.scaleXYZ(s.x,s.y,s.z)},scaleXYZ:function(s,r,o){var a=this.val;return a[0]=a[0]*s,a[1]=a[1]*s,a[2]=a[2]*s,a[3]=a[3]*s,a[4]=a[4]*r,a[5]=a[5]*r,a[6]=a[6]*r,a[7]=a[7]*r,a[8]=a[8]*o,a[9]=a[9]*o,a[10]=a[10]*o,a[11]=a[11]*o,this},makeRotationAxis:function(s,r){var o=Math.cos(r),a=Math.sin(r),u=1-o,f=s.x,v=s.y,c=s.z,g=u*f,p=u*v;return this.setValues(g*f+o,g*v-a*c,g*c+a*v,0,g*v+a*c,p*v+o,p*c-a*f,0,g*c-a*v,p*c+a*f,u*c*c+o,0,0,0,0,1)},rotate:function(s,r){var o=this.val,a=r.x,u=r.y,f=r.z,v=Math.sqrt(a*a+u*u+f*f);if(Math.abs(v)<x)return this;v=1/v,a*=v,u*=v,f*=v;var c=Math.sin(s),g=Math.cos(s),p=1-g,T=o[0],C=o[1],M=o[2],A=o[3],R=o[4],P=o[5],L=o[6],F=o[7],w=o[8],O=o[9],B=o[10],I=o[11],D=o[12],N=o[13],z=o[14],V=o[15],U=a*a*p+g,G=u*a*p+f*c,b=f*a*p-u*c,Y=a*u*p-f*c,W=u*u*p+g,H=f*u*p+a*c,X=a*f*p+u*c,K=u*f*p-a*c,Z=f*f*p+g;return this.setValues(T*U+R*G+w*b,C*U+P*G+O*b,M*U+L*G+B*b,A*U+F*G+I*b,T*Y+R*W+w*H,C*Y+P*W+O*H,M*Y+L*W+B*H,A*Y+F*W+I*H,T*X+R*K+w*Z,C*X+P*K+O*Z,M*X+L*K+B*Z,A*X+F*K+I*Z,D,N,z,V)},rotateX:function(s){var r=this.val,o=Math.sin(s),a=Math.cos(s),u=r[4],f=r[5],v=r[6],c=r[7],g=r[8],p=r[9],T=r[10],C=r[11];return r[4]=u*a+g*o,r[5]=f*a+p*o,r[6]=v*a+T*o,r[7]=c*a+C*o,r[8]=g*a-u*o,r[9]=p*a-f*o,r[10]=T*a-v*o,r[11]=C*a-c*o,this},rotateY:function(s){var r=this.val,o=Math.sin(s),a=Math.cos(s),u=r[0],f=r[1],v=r[2],c=r[3],g=r[8],p=r[9],T=r[10],C=r[11];return r[0]=u*a-g*o,r[1]=f*a-p*o,r[2]=v*a-T*o,r[3]=c*a-C*o,r[8]=u*o+g*a,r[9]=f*o+p*a,r[10]=v*o+T*a,r[11]=c*o+C*a,this},rotateZ:function(s){var r=this.val,o=Math.sin(s),a=Math.cos(s),u=r[0],f=r[1],v=r[2],c=r[3],g=r[4],p=r[5],T=r[6],C=r[7];return r[0]=u*a+g*o,r[1]=f*a+p*o,r[2]=v*a+T*o,r[3]=c*a+C*o,r[4]=g*a-u*o,r[5]=p*a-f*o,r[6]=T*a-v*o,r[7]=C*a-c*o,this},fromRotationTranslation:function(s,r){var o=s.x,a=s.y,u=s.z,f=s.w,v=o+o,c=a+a,g=u+u,p=o*v,T=o*c,C=o*g,M=a*c,A=a*g,R=u*g,P=f*v,L=f*c,F=f*g;return this.setValues(1-(M+R),T+F,C-L,0,T-F,1-(p+R),A+P,0,C+L,A-P,1-(p+M),0,r.x,r.y,r.z,1)},fromQuat:function(s){var r=s.x,o=s.y,a=s.z,u=s.w,f=r+r,v=o+o,c=a+a,g=r*f,p=r*v,T=r*c,C=o*v,M=o*c,A=a*c,R=u*f,P=u*v,L=u*c;return this.setValues(1-(C+A),p+L,T-P,0,p-L,1-(g+A),M+R,0,T+P,M-R,1-(g+C),0,0,0,0,1)},frustum:function(s,r,o,a,u,f){var v=1/(r-s),c=1/(a-o),g=1/(u-f);return this.setValues(u*2*v,0,0,0,0,u*2*c,0,0,(r+s)*v,(a+o)*c,(f+u)*g,-1,0,0,f*u*2*g,0)},perspective:function(s,r,o,a){var u=1/Math.tan(s/2),f=1/(o-a);return this.setValues(u/r,0,0,0,0,u,0,0,0,0,(a+o)*f,-1,0,0,2*a*o*f,0)},perspectiveLH:function(s,r,o,a){return this.setValues(2*o/s,0,0,0,0,2*o/r,0,0,0,0,-a/(o-a),1,0,0,o*a/(o-a),0)},ortho:function(s,r,o,a,u,f){var v=s-r,c=o-a,g=u-f;return v=v===0?v:1/v,c=c===0?c:1/c,g=g===0?g:1/g,this.setValues(-2*v,0,0,0,0,-2*c,0,0,0,0,2*g,0,(s+r)*v,(a+o)*c,(f+u)*g,1)},lookAtRH:function(s,r,o){var a=this.val;return i.subVectors(s,r),i.lengthSq()===0&&(i.z=1),i.normalize(),e.crossVectors(o,i),e.lengthSq()===0&&(Math.abs(o.z)===1?i.x+=1e-4:i.z+=1e-4,i.normalize(),e.crossVectors(o,i)),e.normalize(),l.crossVectors(i,e),a[0]=e.x,a[1]=e.y,a[2]=e.z,a[4]=l.x,a[5]=l.y,a[6]=l.z,a[8]=i.x,a[9]=i.y,a[10]=i.z,this},lookAt:function(s,r,o){var a=s.x,u=s.y,f=s.z,v=o.x,c=o.y,g=o.z,p=r.x,T=r.y,C=r.z;if(Math.abs(a-p)<x&&Math.abs(u-T)<x&&Math.abs(f-C)<x)return this.identity();var M=a-p,A=u-T,R=f-C,P=1/Math.sqrt(M*M+A*A+R*R);M*=P,A*=P,R*=P;var L=c*R-g*A,F=g*M-v*R,w=v*A-c*M;P=Math.sqrt(L*L+F*F+w*w),P?(P=1/P,L*=P,F*=P,w*=P):(L=0,F=0,w=0);var O=A*w-R*F,B=R*L-M*w,I=M*F-A*L;return P=Math.sqrt(O*O+B*B+I*I),P?(P=1/P,O*=P,B*=P,I*=P):(O=0,B=0,I=0),this.setValues(L,O,M,0,F,B,A,0,w,I,R,0,-(L*a+F*u+w*f),-(O*a+B*u+I*f),-(M*a+A*u+R*f),1)},yawPitchRoll:function(s,r,o){this.zero(),d.zero(),t.zero();var a=this.val,u=d.val,f=t.val,v=Math.sin(o),c=Math.cos(o);return a[10]=1,a[15]=1,a[0]=c,a[1]=v,a[4]=-v,a[5]=c,v=Math.sin(r),c=Math.cos(r),u[0]=1,u[15]=1,u[5]=c,u[10]=c,u[9]=-v,u[6]=v,v=Math.sin(s),c=Math.cos(s),f[5]=1,f[15]=1,f[0]=c,f[2]=-v,f[8]=v,f[10]=c,this.multiplyLocal(d),this.multiplyLocal(t),this},setWorldMatrix:function(s,r,o,a,u){return this.yawPitchRoll(s.y,s.x,s.z),d.scaling(o.x,o.y,o.z),t.xyz(r.x,r.y,r.z),this.multiplyLocal(d),this.multiplyLocal(t),a&&this.multiplyLocal(a),u&&this.multiplyLocal(u),this},multiplyToMat4:function(s,r){var o=this.val,a=s.val,u=o[0],f=o[1],v=o[2],c=o[3],g=o[4],p=o[5],T=o[6],C=o[7],M=o[8],A=o[9],R=o[10],P=o[11],L=o[12],F=o[13],w=o[14],O=o[15],B=a[0],I=a[1],D=a[2],N=a[3],z=a[4],V=a[5],U=a[6],G=a[7],b=a[8],Y=a[9],W=a[10],H=a[11],X=a[12],K=a[13],Z=a[14],Q=a[15];return r.setValues(B*u+I*g+D*M+N*L,I*f+I*p+D*A+N*F,D*v+I*T+D*R+N*w,N*c+I*C+D*P+N*O,z*u+V*g+U*M+G*L,z*f+V*p+U*A+G*F,z*v+V*T+U*R+G*w,z*c+V*C+U*P+G*O,b*u+Y*g+W*M+H*L,b*f+Y*p+W*A+H*F,b*v+Y*T+W*R+H*w,b*c+Y*C+W*P+H*O,X*u+K*g+Z*M+Q*L,X*f+K*p+Z*A+Q*F,X*v+K*T+Z*R+Q*w,X*c+K*C+Z*P+Q*O)},fromRotationXYTranslation:function(s,r,o){var a=r.x,u=r.y,f=r.z,v=Math.sin(s.x),c=Math.cos(s.x),g=Math.sin(s.y),p=Math.cos(s.y),T=a,C=u,M=f,A=-v,R=0-A*g,P=0-c*g,L=A*p,F=c*p;return o||(T=p*a+g*f,C=R*a+c*u+L*f,M=P*a+v*u+F*f),this.setValues(p,R,P,0,0,c,v,0,g,L,F,0,T,C,M,1)},getMaxScaleOnAxis:function(){var s=this.val,r=s[0]*s[0]+s[1]*s[1]+s[2]*s[2],o=s[4]*s[4]+s[5]*s[5]+s[6]*s[6],a=s[8]*s[8]+s[9]*s[9]+s[10]*s[10];return Math.sqrt(Math.max(r,o,a))}}),d=new h,t=new h,e=new S,l=new S,i=new S;E.exports=h},86883:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return Math.min(n+m,S)};E.exports=y},50040:E=>{/**
|
||
* @author Vladislav Forsh <vlad@robowhale.com>
|
||
* @copyright 2021 RoboWhale
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=n.length;if(m===0)return 0;n.sort(function(x,h){return x-h});var S=Math.floor(m/2);return m%2===0?(n[S]+n[S-1])/2:n[S]};E.exports=y},37204:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return Math.max(n-m,S)};E.exports=y},65201:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){S===void 0&&(S=m+1);var h=(n-m)/(S-m);return h>1?x!==void 0?(h=(x-n)/(x-S),h<0&&(h=0)):h=1:h<0&&(h=0),h};E.exports=y},15746:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(94434),x=n(29747),h=n(25836),d=1e-6,t=new Int8Array([1,2,0]),e=new Float32Array([0,0,0]),l=new h(1,0,0),i=new h(0,1,0),s=new h,r=new S,o=new m({initialize:function(u,f,v,c){this.onChangeCallback=x,this.set(u,f,v,c)},x:{get:function(){return this._x},set:function(a){this._x=a,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(a){this._y=a,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(a){this._z=a,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(a){this._w=a,this.onChangeCallback(this)}},copy:function(a){return this.set(a)},set:function(a,u,f,v,c){return c===void 0&&(c=!0),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=u||0,this._z=f||0,this._w=v||0),c&&this.onChangeCallback(this),this},add:function(a){return this._x+=a.x,this._y+=a.y,this._z+=a.z,this._w+=a.w,this.onChangeCallback(this),this},subtract:function(a){return this._x-=a.x,this._y-=a.y,this._z-=a.z,this._w-=a.w,this.onChangeCallback(this),this},scale:function(a){return this._x*=a,this._y*=a,this._z*=a,this._w*=a,this.onChangeCallback(this),this},length:function(){var a=this.x,u=this.y,f=this.z,v=this.w;return Math.sqrt(a*a+u*u+f*f+v*v)},lengthSq:function(){var a=this.x,u=this.y,f=this.z,v=this.w;return a*a+u*u+f*f+v*v},normalize:function(){var a=this.x,u=this.y,f=this.z,v=this.w,c=a*a+u*u+f*f+v*v;return c>0&&(c=1/Math.sqrt(c),this._x=a*c,this._y=u*c,this._z=f*c,this._w=v*c),this.onChangeCallback(this),this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lerp:function(a,u){u===void 0&&(u=0);var f=this.x,v=this.y,c=this.z,g=this.w;return this.set(f+u*(a.x-f),v+u*(a.y-v),c+u*(a.z-c),g+u*(a.w-g))},rotationTo:function(a,u){var f=a.x*u.x+a.y*u.y+a.z*u.z;return f<-.999999?(s.copy(l).cross(a).length()<d&&s.copy(i).cross(a),s.normalize(),this.setAxisAngle(s,Math.PI)):f>.999999?this.set(0,0,0,1):(s.copy(a).cross(u),this._x=s.x,this._y=s.y,this._z=s.z,this._w=1+f,this.normalize())},setAxes:function(a,u,f){var v=r.val;return v[0]=u.x,v[3]=u.y,v[6]=u.z,v[1]=f.x,v[4]=f.y,v[7]=f.z,v[2]=-a.x,v[5]=-a.y,v[8]=-a.z,this.fromMat3(r).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(a,u){u=u*.5;var f=Math.sin(u);return this.set(f*a.x,f*a.y,f*a.z,Math.cos(u))},multiply:function(a){var u=this.x,f=this.y,v=this.z,c=this.w,g=a.x,p=a.y,T=a.z,C=a.w;return this.set(u*C+c*g+f*T-v*p,f*C+c*p+v*g-u*T,v*C+c*T+u*p-f*g,c*C-u*g-f*p-v*T)},slerp:function(a,u){var f=this.x,v=this.y,c=this.z,g=this.w,p=a.x,T=a.y,C=a.z,M=a.w,A=f*p+v*T+c*C+g*M;A<0&&(A=-A,p=-p,T=-T,C=-C,M=-M);var R=1-u,P=u;if(1-A>d){var L=Math.acos(A),F=Math.sin(L);R=Math.sin((1-u)*L)/F,P=Math.sin(u*L)/F}return this.set(R*f+P*p,R*v+P*T,R*c+P*C,R*g+P*M)},invert:function(){var a=this.x,u=this.y,f=this.z,v=this.w,c=a*a+u*u+f*f+v*v,g=c?1/c:0;return this.set(-a*g,-u*g,-f*g,v*g)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(a){a*=.5;var u=this.x,f=this.y,v=this.z,c=this.w,g=Math.sin(a),p=Math.cos(a);return this.set(u*p+c*g,f*p+v*g,v*p-f*g,c*p-u*g)},rotateY:function(a){a*=.5;var u=this.x,f=this.y,v=this.z,c=this.w,g=Math.sin(a),p=Math.cos(a);return this.set(u*p-v*g,f*p+c*g,v*p+u*g,c*p-f*g)},rotateZ:function(a){a*=.5;var u=this.x,f=this.y,v=this.z,c=this.w,g=Math.sin(a),p=Math.cos(a);return this.set(u*p+f*g,f*p-u*g,v*p+c*g,c*p-v*g)},calculateW:function(){var a=this.x,u=this.y,f=this.z;return this.w=-Math.sqrt(1-a*a-u*u-f*f),this},setFromEuler:function(a,u){var f=a.x/2,v=a.y/2,c=a.z/2,g=Math.cos(f),p=Math.cos(v),T=Math.cos(c),C=Math.sin(f),M=Math.sin(v),A=Math.sin(c);switch(a.order){case"XYZ":{this.set(C*p*T+g*M*A,g*M*T-C*p*A,g*p*A+C*M*T,g*p*T-C*M*A,u);break}case"YXZ":{this.set(C*p*T+g*M*A,g*M*T-C*p*A,g*p*A-C*M*T,g*p*T+C*M*A,u);break}case"ZXY":{this.set(C*p*T-g*M*A,g*M*T+C*p*A,g*p*A+C*M*T,g*p*T-C*M*A,u);break}case"ZYX":{this.set(C*p*T-g*M*A,g*M*T+C*p*A,g*p*A-C*M*T,g*p*T+C*M*A,u);break}case"YZX":{this.set(C*p*T+g*M*A,g*M*T+C*p*A,g*p*A-C*M*T,g*p*T-C*M*A,u);break}case"XZY":{this.set(C*p*T-g*M*A,g*M*T-C*p*A,g*p*A+C*M*T,g*p*T+C*M*A,u);break}}return this},setFromRotationMatrix:function(a){var u=a.val,f=u[0],v=u[4],c=u[8],g=u[1],p=u[5],T=u[9],C=u[2],M=u[6],A=u[10],R=f+p+A,P;return R>0?(P=.5/Math.sqrt(R+1),this.set((M-T)*P,(c-C)*P,(g-v)*P,.25/P)):f>p&&f>A?(P=2*Math.sqrt(1+f-p-A),this.set(.25*P,(v+g)/P,(c+C)/P,(M-T)/P)):p>A?(P=2*Math.sqrt(1+p-f-A),this.set((v+g)/P,.25*P,(T+M)/P,(c-C)/P)):(P=2*Math.sqrt(1+A-f-p),this.set((c+C)/P,(T+M)/P,.25*P,(g-v)/P)),this},fromMat3:function(a){var u=a.val,f=u[0]+u[4]+u[8],v;if(f>0)v=Math.sqrt(f+1),this.w=.5*v,v=.5/v,this._x=(u[7]-u[5])*v,this._y=(u[2]-u[6])*v,this._z=(u[3]-u[1])*v;else{var c=0;u[4]>u[0]&&(c=1),u[8]>u[c*3+c]&&(c=2);var g=t[c],p=t[g];v=Math.sqrt(u[c*3+c]-u[g*3+g]-u[p*3+p]+1),e[c]=.5*v,v=.5/v,e[g]=(u[g*3+c]+u[c*3+g])*v,e[p]=(u[p*3+c]+u[c*3+p])*v,this._x=e[0],this._y=e[1],this._z=e[2],this._w=(u[p*3+g]-u[g*3+p])*v}return this.onChangeCallback(this),this}});E.exports=o},43396:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=function(x){return x*m.RAD_TO_DEG};E.exports=S},74362:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=1);var S=Math.random()*2*Math.PI;return n.x=Math.cos(S)*m,n.y=Math.sin(S)*m,n};E.exports=y},60706:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=1);var S=Math.random()*2*Math.PI,x=Math.random()*2-1,h=Math.sqrt(1-x*x)*m;return n.x=Math.cos(S)*h,n.y=Math.sin(S)*h,n.z=x*m,n};E.exports=y},67421:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m=1),n.x=(Math.random()*2-1)*m,n.y=(Math.random()*2-1)*m,n.z=(Math.random()*2-1)*m,n.w=(Math.random()*2-1)*m,n};E.exports=y},36305:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.x,x=n.y;return n.x=S*Math.cos(m)-x*Math.sin(m),n.y=S*Math.sin(m)+x*Math.cos(m),n};E.exports=y},11520:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=Math.cos(x),d=Math.sin(x),t=n.x-m,e=n.y-S;return n.x=t*h-e*d+m,n.y=t*d+e*h+S,n};E.exports=y},1163:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h){var d=x+Math.atan2(n.y-S,n.x-m);return n.x=m+h*Math.cos(d),n.y=S+h*Math.sin(d),n};E.exports=y},70336:E=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h){return n.x=m+h*Math.cos(x),n.y=S+h*Math.sin(x),n};E.exports=y},72678:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(25836),S=n(37867),x=n(15746),h=new S,d=new x,t=new m,e=function(l,i,s){return d.setAxisAngle(i,s),h.fromRotationTranslation(d,t.set(0,0,0)),l.transformMat4(h)};E.exports=e},2284:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n>0?Math.ceil(n):Math.floor(n)};E.exports=y},41013:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){m===void 0&&(m=0),S===void 0&&(S=10);var x=Math.pow(S,-m);return Math.round(n*x)/x};E.exports=y},7602:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n<=m?0:n>=S?1:(n=(n-m)/(S-m),n*n*(3-2*n))};E.exports=y},54261:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n=Math.max(0,Math.min(1,(n-m)/(S-m))),n*n*n*(n*(n*6-15)+10)};E.exports=y},44408:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t){t===void 0&&(t=new m);var e=0,l=0,i=h*d;return x>0&&x<=i&&(x>h-1?(l=Math.floor(x/h),e=x-l*h):e=x),t.set(e,l)};E.exports=S},85955:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e,l,i,s){s===void 0&&(s=new m);var r=Math.sin(e),o=Math.cos(e),a=o*l,u=r*l,f=-r*i,v=o*i,c=1/(a*v+f*-u);return s.x=v*c*x+-f*c*h+(t*f-d*v)*c,s.y=a*c*h+-u*c*x+(-t*a+d*u)*c,s};E.exports=S},26099:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(43855),x=new m({initialize:function(d,t){this.x=0,this.y=0,typeof d=="object"?(this.x=d.x||0,this.y=d.y||0):(t===void 0&&(t=d),this.x=d||0,this.y=t||0)},clone:function(){return new x(this.x,this.y)},copy:function(h){return this.x=h.x||0,this.y=h.y||0,this},setFromObject:function(h){return this.x=h.x||0,this.y=h.y||0,this},set:function(h,d){return d===void 0&&(d=h),this.x=h,this.y=d,this},setTo:function(h,d){return this.set(h,d)},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},invert:function(){return this.set(this.y,this.x)},setToPolar:function(h,d){return d==null&&(d=1),this.x=Math.cos(h)*d,this.y=Math.sin(h)*d,this},equals:function(h){return this.x===h.x&&this.y===h.y},fuzzyEquals:function(h,d){return S(this.x,h.x,d)&&S(this.y,h.y,d)},angle:function(){var h=Math.atan2(this.y,this.x);return h<0&&(h+=2*Math.PI),h},setAngle:function(h){return this.setToPolar(h,this.length())},add:function(h){return this.x+=h.x,this.y+=h.y,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this},scale:function(h){return isFinite(h)?(this.x*=h,this.y*=h):(this.x=0,this.y=0),this},divide:function(h){return this.x/=h.x,this.y/=h.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(h){var d=h.x-this.x,t=h.y-this.y;return Math.sqrt(d*d+t*t)},distanceSq:function(h){var d=h.x-this.x,t=h.y-this.y;return d*d+t*t},length:function(){var h=this.x,d=this.y;return Math.sqrt(h*h+d*d)},setLength:function(h){return this.normalize().scale(h)},lengthSq:function(){var h=this.x,d=this.y;return h*h+d*d},normalize:function(){var h=this.x,d=this.y,t=h*h+d*d;return t>0&&(t=1/Math.sqrt(t),this.x=h*t,this.y=d*t),this},normalizeRightHand:function(){var h=this.x;return this.x=this.y*-1,this.y=h,this},normalizeLeftHand:function(){var h=this.x;return this.x=this.y,this.y=h*-1,this},dot:function(h){return this.x*h.x+this.y*h.y},cross:function(h){return this.x*h.y-this.y*h.x},lerp:function(h,d){d===void 0&&(d=0);var t=this.x,e=this.y;return this.x=t+d*(h.x-t),this.y=e+d*(h.y-e),this},transformMat3:function(h){var d=this.x,t=this.y,e=h.val;return this.x=e[0]*d+e[3]*t+e[6],this.y=e[1]*d+e[4]*t+e[7],this},transformMat4:function(h){var d=this.x,t=this.y,e=h.val;return this.x=e[0]*d+e[4]*t+e[12],this.y=e[1]*d+e[5]*t+e[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(h){var d=this.length();return d&&d>h&&this.scale(h/d),this},reflect:function(h){return h=h.clone().normalize(),this.subtract(h.scale(2*this.dot(h)))},mirror:function(h){return this.reflect(h).negate()},rotate:function(h){var d=Math.cos(h),t=Math.sin(h);return this.set(d*this.x-t*this.y,t*this.x+d*this.y)},project:function(h){var d=this.dot(h)/h.dot(h);return this.copy(h).scale(d)},projectUnit:function(h,d){d===void 0&&(d=new x);var t=this.x*h.x+this.y*h.y;return t!==0&&(d.x=t*h.x,d.y=t*h.y),d}});x.ZERO=new x,x.RIGHT=new x(1,0),x.LEFT=new x(-1,0),x.UP=new x(0,-1),x.DOWN=new x(0,1),x.ONE=new x(1,1),E.exports=x},25836:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t){this.x=0,this.y=0,this.z=0,typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0):(this.x=h||0,this.y=d||0,this.z=t||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(x){return this.x=Math.min(this.x,x.x),this.y=Math.min(this.y,x.y),this.z=Math.min(this.z,x.z),this},max:function(x){return this.x=Math.max(this.x,x.x),this.y=Math.max(this.y,x.y),this.z=Math.max(this.z,x.z),this},clone:function(){return new S(this.x,this.y,this.z)},addVectors:function(x,h){return this.x=x.x+h.x,this.y=x.y+h.y,this.z=x.z+h.z,this},subVectors:function(x,h){return this.x=x.x-h.x,this.y=x.y-h.y,this.z=x.z-h.z,this},crossVectors:function(x,h){var d=x.x,t=x.y,e=x.z,l=h.x,i=h.y,s=h.z;return this.x=t*s-e*i,this.y=e*l-d*s,this.z=d*i-t*l,this},equals:function(x){return this.x===x.x&&this.y===x.y&&this.z===x.z},copy:function(x){return this.x=x.x,this.y=x.y,this.z=x.z||0,this},set:function(x,h,d){return typeof x=="object"?(this.x=x.x||0,this.y=x.y||0,this.z=x.z||0):(this.x=x||0,this.y=h||0,this.z=d||0),this},setFromMatrixPosition:function(x){return this.fromArray(x.val,12)},setFromMatrixColumn:function(x,h){return this.fromArray(x.val,h*4)},fromArray:function(x,h){return h===void 0&&(h=0),this.x=x[h],this.y=x[h+1],this.z=x[h+2],this},add:function(x){return this.x+=x.x,this.y+=x.y,this.z+=x.z||0,this},addScalar:function(x){return this.x+=x,this.y+=x,this.z+=x,this},addScale:function(x,h){return this.x+=x.x*h,this.y+=x.y*h,this.z+=x.z*h||0,this},subtract:function(x){return this.x-=x.x,this.y-=x.y,this.z-=x.z||0,this},multiply:function(x){return this.x*=x.x,this.y*=x.y,this.z*=x.z||1,this},scale:function(x){return isFinite(x)?(this.x*=x,this.y*=x,this.z*=x):(this.x=0,this.y=0,this.z=0),this},divide:function(x){return this.x/=x.x,this.y/=x.y,this.z/=x.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(x){var h=x.x-this.x,d=x.y-this.y,t=x.z-this.z||0;return Math.sqrt(h*h+d*d+t*t)},distanceSq:function(x){var h=x.x-this.x,d=x.y-this.y,t=x.z-this.z||0;return h*h+d*d+t*t},length:function(){var x=this.x,h=this.y,d=this.z;return Math.sqrt(x*x+h*h+d*d)},lengthSq:function(){var x=this.x,h=this.y,d=this.z;return x*x+h*h+d*d},normalize:function(){var x=this.x,h=this.y,d=this.z,t=x*x+h*h+d*d;return t>0&&(t=1/Math.sqrt(t),this.x=x*t,this.y=h*t,this.z=d*t),this},dot:function(x){return this.x*x.x+this.y*x.y+this.z*x.z},cross:function(x){var h=this.x,d=this.y,t=this.z,e=x.x,l=x.y,i=x.z;return this.x=d*i-t*l,this.y=t*e-h*i,this.z=h*l-d*e,this},lerp:function(x,h){h===void 0&&(h=0);var d=this.x,t=this.y,e=this.z;return this.x=d+h*(x.x-d),this.y=t+h*(x.y-t),this.z=e+h*(x.z-e),this},applyMatrix3:function(x){var h=this.x,d=this.y,t=this.z,e=x.val;return this.x=e[0]*h+e[3]*d+e[6]*t,this.y=e[1]*h+e[4]*d+e[7]*t,this.z=e[2]*h+e[5]*d+e[8]*t,this},applyMatrix4:function(x){var h=this.x,d=this.y,t=this.z,e=x.val,l=1/(e[3]*h+e[7]*d+e[11]*t+e[15]);return this.x=(e[0]*h+e[4]*d+e[8]*t+e[12])*l,this.y=(e[1]*h+e[5]*d+e[9]*t+e[13])*l,this.z=(e[2]*h+e[6]*d+e[10]*t+e[14])*l,this},transformMat3:function(x){var h=this.x,d=this.y,t=this.z,e=x.val;return this.x=h*e[0]+d*e[3]+t*e[6],this.y=h*e[1]+d*e[4]+t*e[7],this.z=h*e[2]+d*e[5]+t*e[8],this},transformMat4:function(x){var h=this.x,d=this.y,t=this.z,e=x.val;return this.x=e[0]*h+e[4]*d+e[8]*t+e[12],this.y=e[1]*h+e[5]*d+e[9]*t+e[13],this.z=e[2]*h+e[6]*d+e[10]*t+e[14],this},transformCoordinates:function(x){var h=this.x,d=this.y,t=this.z,e=x.val,l=h*e[0]+d*e[4]+t*e[8]+e[12],i=h*e[1]+d*e[5]+t*e[9]+e[13],s=h*e[2]+d*e[6]+t*e[10]+e[14],r=h*e[3]+d*e[7]+t*e[11]+e[15];return this.x=l/r,this.y=i/r,this.z=s/r,this},transformQuat:function(x){var h=this.x,d=this.y,t=this.z,e=x.x,l=x.y,i=x.z,s=x.w,r=s*h+l*t-i*d,o=s*d+i*h-e*t,a=s*t+e*d-l*h,u=-e*h-l*d-i*t;return this.x=r*s+u*-e+o*-i-a*-l,this.y=o*s+u*-l+a*-e-r*-i,this.z=a*s+u*-i+r*-l-o*-e,this},project:function(x){var h=this.x,d=this.y,t=this.z,e=x.val,l=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],u=e[6],f=e[7],v=e[8],c=e[9],g=e[10],p=e[11],T=e[12],C=e[13],M=e[14],A=e[15],R=1/(h*r+d*f+t*p+A);return this.x=(h*l+d*o+t*v+T)*R,this.y=(h*i+d*a+t*c+C)*R,this.z=(h*s+d*u+t*g+M)*R,this},projectViewMatrix:function(x,h){return this.applyMatrix4(x).applyMatrix4(h)},unprojectViewMatrix:function(x,h){return this.applyMatrix4(x).applyMatrix4(h)},unproject:function(x,h){var d=x.x,t=x.y,e=x.z,l=x.w,i=this.x-d,s=l-this.y-1-t,r=this.z;return this.x=2*i/e-1,this.y=2*s/l-1,this.z=2*r-1,this.project(h)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});S.ZERO=new S,S.RIGHT=new S(1,0,0),S.LEFT=new S(-1,0,0),S.UP=new S(0,-1,0),S.DOWN=new S(0,1,0),S.FORWARD=new S(0,0,1),S.BACK=new S(0,0,-1),S.ONE=new S(1,1,1),E.exports=S},61369:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t,e){this.x=0,this.y=0,this.z=0,this.w=0,typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0,this.w=h.w||0):(this.x=h||0,this.y=d||0,this.z=t||0,this.w=e||0)},clone:function(){return new S(this.x,this.y,this.z,this.w)},copy:function(x){return this.x=x.x,this.y=x.y,this.z=x.z||0,this.w=x.w||0,this},equals:function(x){return this.x===x.x&&this.y===x.y&&this.z===x.z&&this.w===x.w},set:function(x,h,d,t){return typeof x=="object"?(this.x=x.x||0,this.y=x.y||0,this.z=x.z||0,this.w=x.w||0):(this.x=x||0,this.y=h||0,this.z=d||0,this.w=t||0),this},add:function(x){return this.x+=x.x,this.y+=x.y,this.z+=x.z||0,this.w+=x.w||0,this},subtract:function(x){return this.x-=x.x,this.y-=x.y,this.z-=x.z||0,this.w-=x.w||0,this},scale:function(x){return this.x*=x,this.y*=x,this.z*=x,this.w*=x,this},length:function(){var x=this.x,h=this.y,d=this.z,t=this.w;return Math.sqrt(x*x+h*h+d*d+t*t)},lengthSq:function(){var x=this.x,h=this.y,d=this.z,t=this.w;return x*x+h*h+d*d+t*t},normalize:function(){var x=this.x,h=this.y,d=this.z,t=this.w,e=x*x+h*h+d*d+t*t;return e>0&&(e=1/Math.sqrt(e),this.x=x*e,this.y=h*e,this.z=d*e,this.w=t*e),this},dot:function(x){return this.x*x.x+this.y*x.y+this.z*x.z+this.w*x.w},lerp:function(x,h){h===void 0&&(h=0);var d=this.x,t=this.y,e=this.z,l=this.w;return this.x=d+h*(x.x-d),this.y=t+h*(x.y-t),this.z=e+h*(x.z-e),this.w=l+h*(x.w-l),this},multiply:function(x){return this.x*=x.x,this.y*=x.y,this.z*=x.z||1,this.w*=x.w||1,this},divide:function(x){return this.x/=x.x,this.y/=x.y,this.z/=x.z||1,this.w/=x.w||1,this},distance:function(x){var h=x.x-this.x,d=x.y-this.y,t=x.z-this.z||0,e=x.w-this.w||0;return Math.sqrt(h*h+d*d+t*t+e*e)},distanceSq:function(x){var h=x.x-this.x,d=x.y-this.y,t=x.z-this.z||0,e=x.w-this.w||0;return h*h+d*d+t*t+e*e},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(x){var h=this.x,d=this.y,t=this.z,e=this.w,l=x.val;return this.x=l[0]*h+l[4]*d+l[8]*t+l[12]*e,this.y=l[1]*h+l[5]*d+l[9]*t+l[13]*e,this.z=l[2]*h+l[6]*d+l[10]*t+l[14]*e,this.w=l[3]*h+l[7]*d+l[11]*t+l[15]*e,this},transformQuat:function(x){var h=this.x,d=this.y,t=this.z,e=x.x,l=x.y,i=x.z,s=x.w,r=s*h+l*t-i*d,o=s*d+i*h-e*t,a=s*t+e*d-l*h,u=-e*h-l*d-i*t;return this.x=r*s+u*-e+o*-i-a*-l,this.y=o*s+u*-l+a*-e-r*-i,this.z=a*s+u*-i+r*-l-o*-e,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});S.prototype.sub=S.prototype.subtract,S.prototype.mul=S.prototype.multiply,S.prototype.div=S.prototype.divide,S.prototype.dist=S.prototype.distance,S.prototype.distSq=S.prototype.distanceSq,S.prototype.len=S.prototype.length,S.prototype.lenSq=S.prototype.lengthSq,E.exports=S},60417:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return Math.abs(n-m)<=S};E.exports=y},15994:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=S-m;return m+((n-m)%x+x)%x};E.exports=y},31040:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){return Math.atan2(x-m,S-n)};E.exports=y},55495:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return Math.atan2(m.y-n.y,m.x-n.x)};E.exports=y},128:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return Math.atan2(m.x-n.x,m.y-n.y)};E.exports=y},41273:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){return Math.atan2(S-n,x-m)};E.exports=y},1432:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=function(x){return x>Math.PI&&(x-=m.TAU),Math.abs(((x+m.PI_OVER_2)%m.TAU-m.TAU)%m.TAU)};E.exports=S},49127:(E,y,n)=>{/**
|
||
* @author samme
|
||
* @copyright 2025 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(12407),S=function(x,h){return m(h-x)};E.exports=S},52285:(E,y,n)=>{/**
|
||
* @author samme
|
||
* @copyright 2025 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=n(12407),x=m.TAU,h=function(d,t){var e=S(t-d);return e>0&&(e-=x),e};E.exports=h},67317:(E,y,n)=>{/**
|
||
* @author samme
|
||
* @copyright 2025 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(86554),S=function(x,h){return m(h-x)};E.exports=S},12407:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n=n%(2*Math.PI),n>=0?n:n+2*Math.PI};E.exports=y},53993:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author @samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(99472),S=function(){return m(-Math.PI,Math.PI)};E.exports=S},86564:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author @samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(99472),S=function(){return m(-180,180)};E.exports=S},90154:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(12407),S=function(x){return m(x+Math.PI)};E.exports=S},48736:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=function(x,h,d){return d===void 0&&(d=.05),x===h||(Math.abs(h-x)<=d||Math.abs(h-x)>=m.TAU-d?x=h:(Math.abs(h-x)>Math.PI&&(h<x?h+=m.TAU:h-=m.TAU),h>x?x+=d:h<x&&(x-=d))),x};E.exports=S},61430:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=m-n;if(S===0)return 0;var x=Math.floor((S- -180)/360);return S-x*360};E.exports=y},86554:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(15994),S=function(x){return m(x,-Math.PI,Math.PI)};E.exports=S},30954:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(15994),S=function(x){return m(x,-180,180)};E.exports=S},25588:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Between:n(31040),BetweenPoints:n(55495),BetweenPointsY:n(128),BetweenY:n(41273),CounterClockwise:n(1432),GetClockwiseDistance:n(49127),GetCounterClockwiseDistance:n(52285),GetShortestDistance:n(67317),Normalize:n(12407),Random:n(53993),RandomDegrees:n(86564),Reverse:n(90154),RotateTo:n(48736),ShortestBetween:n(61430),Wrap:n(86554),WrapDegrees:n(30954)}},36383:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={TAU:Math.PI*2,PI_OVER_2:Math.PI/2,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};E.exports=y},20339:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=n-S,d=m-x;return Math.sqrt(h*h+d*d)};E.exports=y},52816:E=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.x-m.x,x=n.y-m.y;return Math.sqrt(S*S+x*x)};E.exports=y},64559:E=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.x-m.x,x=n.y-m.y;return S*S+x*x};E.exports=y},82340:E=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){return Math.max(Math.abs(n-S),Math.abs(m-x))};E.exports=y},14390:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h){return h===void 0&&(h=2),Math.sqrt(Math.pow(S-n,h)+Math.pow(x-m,h))};E.exports=y},2243:E=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){return Math.abs(n-S)+Math.abs(m-x)};E.exports=y},89774:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=n-S,d=m-x;return h*h+d*d};E.exports=y},50994:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Between:n(20339),BetweenPoints:n(52816),BetweenPointsSquared:n(64559),Chebyshev:n(82340),Power:n(14390),Snake:n(2243),Squared:n(89774)}},62640:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(54178),S=n(41521),x=n(79980),h=n(85433),d=n(99140),t=n(48857),e=n(81596),l=n(59133),i=n(98516),s=n(35248),r=n(82500),o=n(49752);E.exports={Power0:e,Power1:l.Out,Power2:h.Out,Power3:i.Out,Power4:s.Out,Linear:e,Quad:l.Out,Cubic:h.Out,Quart:i.Out,Quint:s.Out,Sine:r.Out,Expo:t.Out,Circ:x.Out,Elastic:d.Out,Back:m.Out,Bounce:S.Out,Stepped:o,"Quad.easeIn":l.In,"Cubic.easeIn":h.In,"Quart.easeIn":i.In,"Quint.easeIn":s.In,"Sine.easeIn":r.In,"Expo.easeIn":t.In,"Circ.easeIn":x.In,"Elastic.easeIn":d.In,"Back.easeIn":m.In,"Bounce.easeIn":S.In,"Quad.easeOut":l.Out,"Cubic.easeOut":h.Out,"Quart.easeOut":i.Out,"Quint.easeOut":s.Out,"Sine.easeOut":r.Out,"Expo.easeOut":t.Out,"Circ.easeOut":x.Out,"Elastic.easeOut":d.Out,"Back.easeOut":m.Out,"Bounce.easeOut":S.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":h.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":s.InOut,"Sine.easeInOut":r.InOut,"Expo.easeInOut":t.InOut,"Circ.easeInOut":x.InOut,"Elastic.easeInOut":d.InOut,"Back.easeInOut":m.InOut,"Bounce.easeInOut":S.InOut}},1639:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m=1.70158),n*n*((m+1)*n-m)};E.exports=y},50099:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=1.70158);var S=m*1.525;return(n*=2)<1?.5*(n*n*((S+1)*n-S)):.5*((n-=2)*n*((S+1)*n+S)+2)};E.exports=y},41286:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m=1.70158),--n*n*((m+1)*n+m)+1};E.exports=y},54178:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(1639),Out:n(41286),InOut:n(50099)}},59590:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n=1-n,n<.36363636363636365?1-7.5625*n*n:n<.7272727272727273?1-(7.5625*(n-=.5454545454545454)*n+.75):n<.9090909090909091?1-(7.5625*(n-=.8181818181818182)*n+.9375):1-(7.5625*(n-=.9545454545454546)*n+.984375)};E.exports=y},41788:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=!1;return n<.5?(n=1-n*2,m=!0):n=n*2-1,n<.36363636363636365?n=7.5625*n*n:n<.7272727272727273?n=7.5625*(n-=.5454545454545454)*n+.75:n<.9090909090909091?n=7.5625*(n-=.8181818181818182)*n+.9375:n=7.5625*(n-=.9545454545454546)*n+.984375,m?(1-n)*.5:n*.5+.5};E.exports=y},69905:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n<.36363636363636365?7.5625*n*n:n<.7272727272727273?7.5625*(n-=.5454545454545454)*n+.75:n<.9090909090909091?7.5625*(n-=.8181818181818182)*n+.9375:7.5625*(n-=.9545454545454546)*n+.984375};E.exports=y},41521:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(59590),Out:n(69905),InOut:n(41788)}},91861:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return 1-Math.sqrt(1-n*n)};E.exports=y},4177:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)};E.exports=y},57512:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return Math.sqrt(1- --n*n)};E.exports=y},79980:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(91861),Out:n(57512),InOut:n(4177)}},51150:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n*n*n};E.exports=y},82820:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)};E.exports=y},35033:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return--n*n*n+1};E.exports=y},85433:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(51150),Out:n(35033),InOut:n(82820)}},69965:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(m===void 0&&(m=.1),S===void 0&&(S=.1),n===0)return 0;if(n===1)return 1;var x=S/4;return m<1?m=1:x=S*Math.asin(1/m)/(2*Math.PI),-(m*Math.pow(2,10*(n-=1))*Math.sin((n-x)*(2*Math.PI)/S))};E.exports=y},50665:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(m===void 0&&(m=.1),S===void 0&&(S=.1),n===0)return 0;if(n===1)return 1;var x=S/4;return m<1?m=1:x=S*Math.asin(1/m)/(2*Math.PI),(n*=2)<1?-.5*(m*Math.pow(2,10*(n-=1))*Math.sin((n-x)*(2*Math.PI)/S)):m*Math.pow(2,-10*(n-=1))*Math.sin((n-x)*(2*Math.PI)/S)*.5+1};E.exports=y},7744:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(m===void 0&&(m=.1),S===void 0&&(S=.1),n===0)return 0;if(n===1)return 1;var x=S/4;return m<1?m=1:x=S*Math.asin(1/m)/(2*Math.PI),m*Math.pow(2,-10*n)*Math.sin((n-x)*(2*Math.PI)/S)+1};E.exports=y},99140:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(69965),Out:n(7744),InOut:n(50665)}},24590:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return Math.pow(2,10*(n-1))-.001};E.exports=y},87844:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return(n*=2)<1?.5*Math.pow(2,10*(n-1)):.5*(2-Math.pow(2,-10*(n-1)))};E.exports=y},89433:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return 1-Math.pow(2,-10*n)};E.exports=y},48857:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(24590),Out:n(89433),InOut:n(87844)}},48820:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Back:n(54178),Bounce:n(41521),Circular:n(79980),Cubic:n(85433),Elastic:n(99140),Expo:n(48857),Linear:n(81596),Quadratic:n(59133),Quartic:n(98516),Quintic:n(35248),Sine:n(82500),Stepped:n(49752)}},7147:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n};E.exports=y},81596:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports=n(7147)},34826:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n*n};E.exports=y},20544:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)};E.exports=y},92029:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n*(2-n)};E.exports=y},59133:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(34826),Out:n(92029),InOut:n(20544)}},64413:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n*n*n*n};E.exports=y},78137:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)};E.exports=y},45840:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return 1- --n*n*n*n};E.exports=y},98516:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(64413),Out:n(45840),InOut:n(78137)}},87745:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n*n*n*n*n};E.exports=y},16509:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)};E.exports=y},17868:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return--n*n*n*n*n+1};E.exports=y},35248:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(87745),Out:n(17868),InOut:n(16509)}},80461:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n===0?0:n===1?1:1-Math.cos(n*Math.PI/2)};E.exports=y},34025:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n===0?0:n===1?1:.5*(1-Math.cos(Math.PI*n))};E.exports=y},52768:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n===0?0:n===1?1:Math.sin(n*Math.PI/2)};E.exports=y},82500:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={In:n(80461),Out:n(52768),InOut:n(34025)}},72251:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m=1),n<=0?0:n>=1?1:((m*n|0)+1)*(1/m)};E.exports=y},49752:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports=n(72251)},75698:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m=1e-4),Math.ceil(n-m)};E.exports=y},43855:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return S===void 0&&(S=1e-4),Math.abs(n-m)<S};E.exports=y},25777:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m=1e-4),Math.floor(n+m)};E.exports=y},5470:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return S===void 0&&(S=1e-4),n>m-S};E.exports=y},94977:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return S===void 0&&(S=1e-4),n<m+S};E.exports=y},48379:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Ceil:n(75698),Equal:n(43855),Floor:n(25777),GreaterThan:n(5470),LessThan:n(94977)}},75508:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36383),S=n(79291),x={Angle:n(25588),Distance:n(50994),Easing:n(48820),Fuzzy:n(48379),Interpolation:n(38289),Pow2:n(49001),Snap:n(73697),RandomDataGenerator:n(28453),Average:n(53307),Bernstein:n(85710),Between:n(30976),CatmullRom:n(87842),CeilTo:n(26302),Clamp:n(45319),DegToRad:n(39506),Difference:n(61241),Euler:n(38857),Factorial:n(6411),FloatBetween:n(99472),FloorTo:n(77623),FromPercent:n(62945),GetCentroid:n(2672),GetSpeed:n(38265),GetVec2Bounds:n(55133),IsEven:n(78702),IsEvenStrict:n(94883),Linear:n(28915),LinearXY:n(94908),MaxAdd:n(86883),Median:n(50040),MinSub:n(37204),Percent:n(65201),RadToDeg:n(43396),RandomXY:n(74362),RandomXYZ:n(60706),RandomXYZW:n(67421),Rotate:n(36305),RotateAround:n(11520),RotateAroundDistance:n(1163),RotateTo:n(70336),RoundAwayFromZero:n(2284),RoundTo:n(41013),SmootherStep:n(54261),SmoothStep:n(7602),ToXY:n(44408),TransformXY:n(85955),Within:n(60417),Wrap:n(15994),Vector2:n(26099),Vector3:n(25836),Vector4:n(61369),Matrix3:n(94434),Matrix4:n(37867),Quaternion:n(15746),RotateVec3:n(72678)};x=S(!1,x,m),E.exports=x},89318:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(85710),S=function(x,h){for(var d=0,t=x.length-1,e=0;e<=t;e++)d+=Math.pow(1-h,t-e)*Math.pow(h,e)*x[e]*m(t,e);return d};E.exports=S},77259:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87842),S=function(x,h){var d=x.length-1,t=d*h,e=Math.floor(t);return x[0]===x[d]?(h<0&&(e=Math.floor(t=d*(1+h))),m(t-e,x[(e-1+d)%d],x[e],x[(e+1)%d],x[(e+2)%d])):h<0?x[0]-(m(-t,x[0],x[0],x[1],x[1])-x[0]):h>1?x[d]-(m(t-d,x[d],x[d],x[d-1],x[d-1])-x[d]):m(t-e,x[e?e-1:0],x[e],x[d<e+1?d:e+1],x[d<e+2?d:e+2])};E.exports=S},36316:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function y(h,d){var t=1-h;return t*t*t*d}function n(h,d){var t=1-h;return 3*t*t*h*d}function m(h,d){return 3*(1-h)*h*h*d}function S(h,d){return h*h*h*d}var x=function(h,d,t,e,l){return y(h,d)+n(h,t)+m(h,e)+S(h,l)};E.exports=x},28392:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(28915),S=function(x,h){var d=x.length-1,t=d*h,e=Math.floor(t);return h<0?m(x[0],x[1],t):h>1?m(x[d],x[d-1],d-t):m(x[e],x[e+1>d?d:e+1],t-e)};E.exports=S},32112:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function y(x,h){var d=1-x;return d*d*h}function n(x,h){return 2*(1-x)*x*h}function m(x,h){return x*x*h}var S=function(x,h,d,t){return y(x,h)+n(x,d)+m(x,t)};E.exports=S},47235:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7602),S=function(x,h,d){return h+(d-h)*m(x,0,1)};E.exports=S},50178:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(54261),S=function(x,h,d){return h+(d-h)*m(x,0,1)};E.exports=S},38289:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Bezier:n(89318),CatmullRom:n(77259),CubicBezier:n(36316),Linear:n(28392),QuadraticBezier:n(32112),SmoothStep:n(47235),SmootherStep:n(50178)}},98439:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=Math.log(n)/.6931471805599453;return 1<<Math.ceil(m)};E.exports=y},50030:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n>0&&(n&n-1)===0&&m>0&&(m&m-1)===0};E.exports=y},81230:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n>0&&(n&n-1)===0};E.exports=y},49001:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={GetNext:n(98439),IsSize:n(50030),IsValue:n(81230)}},28453:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h){h===void 0&&(h=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],h&&this.init(h)},rnd:function(){var x=2091639*this.s0+this.c*23283064365386963e-26;return this.c=x|0,this.s0=this.s1,this.s1=this.s2,this.s2=x-this.c,this.s2},hash:function(x){var h,d=this.n;x=x.toString();for(var t=0;t<x.length;t++)d+=x.charCodeAt(t),h=.02519603282416938*d,d=h>>>0,h-=d,h*=d,d=h>>>0,h-=d,d+=h*4294967296;return this.n=d,(d>>>0)*23283064365386963e-26},init:function(x){typeof x=="string"?this.state(x):this.sow(x)},sow:function(x){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!x)for(var h=0;h<x.length&&x[h]!=null;h++){var d=x[h];this.s0-=this.hash(d),this.s0+=~~(this.s0<0),this.s1-=this.hash(d),this.s1+=~~(this.s1<0),this.s2-=this.hash(d),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(x,h){return Math.floor(this.realInRange(0,h-x+1)+x)},between:function(x,h){return Math.floor(this.realInRange(0,h-x+1)+x)},realInRange:function(x,h){return this.frac()*(h-x)+x},normal:function(){return 1-2*this.frac()},uuid:function(){var x="",h="";for(h=x="";x++<36;h+=~x%5|x*3&4?(x^15?8^this.frac()*(x^20?16:4):4).toString(16):"-");return h},pick:function(x){return x[this.integerInRange(0,x.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(x){return x[~~(Math.pow(this.frac(),2)*(x.length-.5)+.5)]},timestamp:function(x,h){return this.realInRange(x||9466848e5,h||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(x){return typeof x=="string"&&x.match(/^!rnd/)&&(x=x.split(","),this.c=parseFloat(x[1]),this.s0=parseFloat(x[2]),this.s1=parseFloat(x[3]),this.s2=parseFloat(x[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(x){for(var h=x.length-1,d=h;d>0;d--){var t=Math.floor(this.frac()*(d+1)),e=x[t];x[t]=x[d],x[d]=e}return x}});E.exports=S},63448:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){return S===void 0&&(S=0),m===0?n:(n-=S,n=m*Math.ceil(n/m),x?(S+n)/m:S+n)};E.exports=y},56583:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){return S===void 0&&(S=0),m===0?n:(n-=S,n=m*Math.floor(n/m),x?(S+n)/m:S+n)};E.exports=y},77720:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){return S===void 0&&(S=0),m===0?n:(n-=S,n=m*Math.round(n/m),x?(S+n)/m:S+n)};E.exports=y},73697:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Ceil:n(63448),Floor:n(56583),To:n(77720)}},71289:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(92209),x=n(88571),h=new m({Extends:x,Mixins:[S.Acceleration,S.Angular,S.Bounce,S.Collision,S.Debug,S.Drag,S.Enable,S.Friction,S.Gravity,S.Immovable,S.Mass,S.Pushable,S.Size,S.Velocity],initialize:function(t,e,l,i,s){x.call(this,t,e,l,i,s),this.body=null}});E.exports=h},86689:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(39506),x=n(20339),h=n(89774),d=n(66022),t=n(95540),e=n(46975),l=n(72441),i=n(47956),s=n(37277),r=n(44594),o=n(26099),a=n(82248),u=new m({initialize:function(v){this.scene=v,this.systems=v.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,v.sys.events.once(r.BOOT,this.boot,this),v.sys.events.on(r.START,this.start,this)},boot:function(){this.world=new a(this.scene,this.config),this.add=new d(this.world),this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new a(this.scene,this.config),this.add=new d(this.world));var f=this.systems.events;t(this.config,"customUpdate",!1)||f.on(r.UPDATE,this.world.update,this.world),f.on(r.POST_UPDATE,this.world.postUpdate,this.world),f.once(r.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(r.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(r.UPDATE,this.world.update,this.world)},getConfig:function(){var f=this.systems.game.config.physics,v=this.systems.settings.physics,c=e(t(v,"arcade",{}),t(f,"arcade",{}));return c},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(f,v,c,g,p){return c===void 0&&(c=null),g===void 0&&(g=null),p===void 0&&(p=c),this.world.collideObjects(f,v,c,g,p,!0)},collide:function(f,v,c,g,p){return c===void 0&&(c=null),g===void 0&&(g=null),p===void 0&&(p=c),this.world.collideObjects(f,v,c,g,p,!1)},collideTiles:function(f,v,c,g,p){return this.world.collideTiles(f,v,c,g,p)},overlapTiles:function(f,v,c,g,p){return this.world.overlapTiles(f,v,c,g,p)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(f,v,c,g,p,T){g===void 0&&(g=60);var C=Math.atan2(c-f.y,v-f.x);return f.body.acceleration.setToPolar(C,g),p!==void 0&&T!==void 0&&f.body.maxVelocity.set(p,T),C},accelerateToObject:function(f,v,c,g,p){return this.accelerateTo(f,v.x,v.y,c,g,p)},closest:function(f,v){v||(v=Array.from(this.world.bodies));for(var c=Number.MAX_VALUE,g=null,p=f.x,T=f.y,C=v.length,M=0;M<C;M++){var A=v[M],R=A.body||A;if(!(f===A||f===R||f===R.gameObject||f===R.center)){var P=h(p,T,R.center.x,R.center.y);P<c&&(g=A,c=P)}}return g},furthest:function(f,v){v||(v=Array.from(this.world.bodies));for(var c=-1,g=null,p=f.x,T=f.y,C=v.length,M=0;M<C;M++){var A=v[M],R=A.body||A;if(!(f===A||f===R||f===R.gameObject||f===R.center)){var P=h(p,T,R.center.x,R.center.y);P>c&&(g=A,c=P)}}return g},moveTo:function(f,v,c,g,p){g===void 0&&(g=60),p===void 0&&(p=0);var T=Math.atan2(c-f.y,v-f.x);return p>0&&(g=x(f.x,f.y,v,c)/(p/1e3)),f.body.velocity.setToPolar(T,g),T},moveToObject:function(f,v,c,g){return this.moveTo(f,v.x,v.y,c,g)},velocityFromAngle:function(f,v,c){return v===void 0&&(v=60),c===void 0&&(c=new o),c.setToPolar(S(f),v)},velocityFromRotation:function(f,v,c){return v===void 0&&(v=60),c===void 0&&(c=new o),c.setToPolar(f,v)},overlapRect:function(f,v,c,g,p,T){return i(this.world,f,v,c,g,p,T)},overlapCirc:function(f,v,c,g,p){return l(this.world,f,v,c,g,p)},shutdown:function(){if(this.world){var f=this.systems.events;f.off(r.UPDATE,this.world.update,this.world),f.off(r.POST_UPDATE,this.world.postUpdate,this.world),f.off(r.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(r.START,this.start,this),this.scene=null,this.systems=null}});s.register("ArcadePhysics",u,"arcadePhysics"),E.exports=u},13759:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(92209),x=n(68287),h=new m({Extends:x,Mixins:[S.Acceleration,S.Angular,S.Bounce,S.Collision,S.Debug,S.Drag,S.Enable,S.Friction,S.Gravity,S.Immovable,S.Mass,S.Pushable,S.Size,S.Velocity],initialize:function(t,e,l,i,s){x.call(this,t,e,l,i,s),this.body=null}});E.exports=h},37742:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(78389),x=n(37747),h=n(63012),d=n(43396),t=n(87841),e=n(37303),l=n(95829),i=n(26099),s=new m({Mixins:[S],initialize:function(o,a){var u=64,f=64,v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},c=a!==void 0;c&&a.displayWidth&&(u=a.displayWidth,f=a.displayHeight),c||(a=v),this.world=o,this.gameObject=c?a:void 0,this.isBody=!0,this.transform={x:a.x,y:a.y,rotation:a.angle,scaleX:a.scaleX,scaleY:a.scaleY,displayOriginX:a.displayOriginX,displayOriginY:a.displayOriginY},this.debugShowBody=o.defaults.debugShowBody,this.debugShowVelocity=o.defaults.debugShowVelocity,this.debugBodyColor=o.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(a.x-a.scaleX*a.displayOriginX,a.y-a.scaleY*a.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=a.angle,this.preRotation=a.angle,this.width=u,this.height=f,this.sourceWidth=u,this.sourceHeight=f,a.frame&&(this.sourceWidth=a.frame.realWidth,this.sourceHeight=a.frame.realHeight),this.halfWidth=Math.abs(u/2),this.halfHeight=Math.abs(f/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=o.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=x.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=l(!1),this.touching=l(!0),this.wasTouching=l(!0),this.blocked=l(!0),this.syncBounds=!1,this.physicsType=x.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=a.scaleX,this._sy=a.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new t,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var r=this.gameObject,o=this.transform;if(r.parentContainer){var a=r.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);o.x=a.tx,o.y=a.ty,o.rotation=d(a.rotation),o.scaleX=a.scaleX,o.scaleY=a.scaleY,o.displayOriginX=r.displayOriginX,o.displayOriginY=r.displayOriginY}else o.x=r.x,o.y=r.y,o.rotation=r.angle,o.scaleX=r.scaleX,o.scaleY=r.scaleY,o.displayOriginX=r.displayOriginX,o.displayOriginY=r.displayOriginY;var u=!1;if(this.syncBounds){var f=r.getBounds(this._bounds);this.width=f.width,this.height=f.height,u=!0}else{var v=Math.abs(o.scaleX),c=Math.abs(o.scaleY);(this._sx!==v||this._sy!==c)&&(this.width=this.sourceWidth*v,this.height=this.sourceHeight*c,this._sx=v,this._sy=c,u=!0)}u&&(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 r=this.transform;this.position.x=r.x+r.scaleX*(this.offset.x-r.displayOriginX),this.position.y=r.y+r.scaleY*(this.offset.y-r.displayOriginY),this.updateCenter()},resetFlags:function(r){r===void 0&&(r=!1);var o=this.wasTouching,a=this.touching,u=this.blocked;r?l(!0,o):(o.none=a.none,o.up=a.up,o.down=a.down,o.left=a.left,o.right=a.right),l(!0,a),l(!0,u),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(r,o){if(r&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var a=this.position;this.prev.x=a.x,this.prev.y=a.y,this.prevFrame.x=a.x,this.prevFrame.y=a.y}r&&this.update(o)},update:function(r){var o=this.prev,a=this.position,u=this.velocity;if(o.set(a.x,a.y),!this.moves){this._dx=a.x-o.x,this._dy=a.y-o.y;return}if(this.directControl){var f=this.autoFrame;u.set((a.x-f.x)/r,(a.y-f.y)/r),this.world.updateMotion(this,r),this._dx=a.x-f.x,this._dy=a.y-f.y}else this.world.updateMotion(this,r),this.newVelocity.set(u.x*r,u.y*r),a.add(this.newVelocity),this._dx=a.x-o.x,this._dy=a.y-o.y;var v=u.x,c=u.y;if(this.updateCenter(),this.angle=Math.atan2(c,v),this.speed=Math.sqrt(v*v+c*c),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var g=this.blocked;this.world.emit(h.WORLD_BOUNDS,this,g.up,g.down,g.left,g.right)}},postUpdate:function(){var r=this.position,o=r.x-this.prevFrame.x,a=r.y-this.prevFrame.y,u=this.gameObject;if(this.moves){var f=this.deltaMax.x,v=this.deltaMax.y;f!==0&&o!==0&&(o<0&&o<-f?o=-f:o>0&&o>f&&(o=f)),v!==0&&a!==0&&(a<0&&a<-v?a=-v:a>0&&a>v&&(a=v)),u&&(u.x+=o,u.y+=a)}o<0?this.facing=x.FACING_LEFT:o>0&&(this.facing=x.FACING_RIGHT),a<0?this.facing=x.FACING_UP:a>0&&(this.facing=x.FACING_DOWN),this.allowRotation&&u&&(u.angle+=this.deltaZ()),this._tx=o,this._ty=a,this.autoFrame.set(r.x,r.y)},setBoundsRectangle:function(r){return this.customBoundsRectangle=r||this.world.bounds,this},checkWorldBounds:function(){var r=this.position,o=this.velocity,a=this.blocked,u=this.customBoundsRectangle,f=this.world.checkCollision,v=this.worldBounce?-this.worldBounce.x:-this.bounce.x,c=this.worldBounce?-this.worldBounce.y:-this.bounce.y,g=!1;return r.x<u.x&&f.left?(r.x=u.x,o.x*=v,a.left=!0,g=!0):this.right>u.right&&f.right&&(r.x=u.right-this.width,o.x*=v,a.right=!0,g=!0),r.y<u.y&&f.up?(r.y=u.y,o.y*=c,a.up=!0,g=!0):this.bottom>u.bottom&&f.down&&(r.y=u.bottom-this.height,o.y*=c,a.down=!0,g=!0),g&&(this.blocked.none=!1,this.updateCenter()),g},setOffset:function(r,o){return o===void 0&&(o=r),this.offset.set(r,o),this},setGameObject:function(r,o){if(o===void 0&&(o=!0),!r||!r.hasTransformComponent)return this;var a=this.world;return this.gameObject&&this.gameObject.body&&(a.disable(this.gameObject),this.gameObject.body=null),r.body&&a.disable(r),this.gameObject=r,r.body=this,this.setSize(),this.enable=o,this},setSize:function(r,o,a){a===void 0&&(a=!0);var u=this.gameObject;if(u&&(!r&&u.frame&&(r=u.frame.realWidth),!o&&u.frame&&(o=u.frame.realHeight)),this.sourceWidth=r,this.sourceHeight=o,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(),a&&u&&u.getCenter){var f=(u.width-r)/2,v=(u.height-o)/2;this.offset.set(f,v)}return this.isCircle=!1,this.radius=0,this},setCircle:function(r,o,a){return o===void 0&&(o=this.offset.x),a===void 0&&(a=this.offset.y),r>0?(this.isCircle=!0,this.radius=r,this.sourceWidth=r*2,this.sourceHeight=r*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(o,a),this.updateCenter()):this.isCircle=!1,this},reset:function(r,o){this.stop();var a=this.gameObject;a&&(a.setPosition(r,o),this.rotation=a.angle,this.preRotation=a.angle);var u=this.position;a&&a.getTopLeft?a.getTopLeft(u):u.set(r,o),this.prev.copy(u),this.prevFrame.copy(u),this.autoFrame.copy(u),a&&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(r){return r.x=this.x,r.y=this.y,r.right=this.right,r.bottom=this.bottom,r},hitTest:function(r,o){if(!this.isCircle)return e(this,r,o);if(this.radius>0&&r>=this.left&&r<=this.right&&o>=this.top&&o<=this.bottom){var a=(this.center.x-r)*(this.center.x-r),u=(this.center.y-o)*(this.center.y-o);return a+u<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.add(this)},drawDebug:function(r){var o=this.position,a=o.x+this.halfWidth,u=o.y+this.halfHeight;this.debugShowBody&&(r.lineStyle(r.defaultStrokeWidth,this.debugBodyColor),this.isCircle?r.strokeCircle(a,u,this.width/2):(this.checkCollision.up&&r.lineBetween(o.x,o.y,o.x+this.width,o.y),this.checkCollision.right&&r.lineBetween(o.x+this.width,o.y,o.x+this.width,o.y+this.height),this.checkCollision.down&&r.lineBetween(o.x,o.y+this.height,o.x+this.width,o.y+this.height),this.checkCollision.left&&r.lineBetween(o.x,o.y,o.x,o.y+this.height))),this.debugShowVelocity&&(r.lineStyle(r.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),r.lineBetween(a,u,a+this.velocity.x/2,u+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(r){return r===void 0&&(r=!0),this.directControl=r,this},setCollideWorldBounds:function(r,o,a,u){r===void 0&&(r=!0),this.collideWorldBounds=r;var f=o!==void 0,v=a!==void 0;return(f||v)&&(this.worldBounce||(this.worldBounce=new i),f&&(this.worldBounce.x=o),v&&(this.worldBounce.y=a)),u!==void 0&&(this.onWorldBounds=u),this},setVelocity:function(r,o){return this.velocity.set(r,o),r=this.velocity.x,o=this.velocity.y,this.speed=Math.sqrt(r*r+o*o),this},setVelocityX:function(r){return this.setVelocity(r,this.velocity.y)},setVelocityY:function(r){return this.setVelocity(this.velocity.x,r)},setMaxVelocity:function(r,o){return this.maxVelocity.set(r,o),this},setMaxVelocityX:function(r){return this.maxVelocity.x=r,this},setMaxVelocityY:function(r){return this.maxVelocity.y=r,this},setMaxSpeed:function(r){return this.maxSpeed=r,this},setSlideFactor:function(r,o){return this.slideFactor.set(r,o),this},setBounce:function(r,o){return this.bounce.set(r,o),this},setBounceX:function(r){return this.bounce.x=r,this},setBounceY:function(r){return this.bounce.y=r,this},setAcceleration:function(r,o){return this.acceleration.set(r,o),this},setAccelerationX:function(r){return this.acceleration.x=r,this},setAccelerationY:function(r){return this.acceleration.y=r,this},setAllowDrag:function(r){return r===void 0&&(r=!0),this.allowDrag=r,this},setAllowGravity:function(r){return r===void 0&&(r=!0),this.allowGravity=r,this},setAllowRotation:function(r){return r===void 0&&(r=!0),this.allowRotation=r,this},setDrag:function(r,o){return this.drag.set(r,o),this},setDamping:function(r){return this.useDamping=r,this},setDragX:function(r){return this.drag.x=r,this},setDragY:function(r){return this.drag.y=r,this},setGravity:function(r,o){return this.gravity.set(r,o),this},setGravityX:function(r){return this.gravity.x=r,this},setGravityY:function(r){return this.gravity.y=r,this},setFriction:function(r,o){return this.friction.set(r,o),this},setFrictionX:function(r){return this.friction.x=r,this},setFrictionY:function(r){return this.friction.y=r,this},setAngularVelocity:function(r){return this.angularVelocity=r,this},setAngularAcceleration:function(r){return this.angularAcceleration=r,this},setAngularDrag:function(r){return this.angularDrag=r,this},setMass:function(r){return this.mass=r,this},setImmovable:function(r){return r===void 0&&(r=!0),this.immovable=r,this},setEnable:function(r){return r===void 0&&(r=!0),this.enable=r,this},processX:function(r,o,a,u){this.x+=r,this.updateCenter(),o!==null&&(this.velocity.x=o*this.slideFactor.x);var f=this.blocked;a&&(f.left=!0,f.none=!1),u&&(f.right=!0,f.none=!1)},processY:function(r,o,a,u){this.y+=r,this.updateCenter(),o!==null&&(this.velocity.y=o*this.slideFactor.y);var f=this.blocked;a&&(f.up=!0,f.none=!1),u&&(f.down=!0,f.none=!1)},x:{get:function(){return this.position.x},set:function(r){this.position.x=r}},y:{get:function(){return this.position.y},set:function(r){this.position.y=r}},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}}});E.exports=s},79342:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t,e,l,i,s){this.world=h,this.name="",this.active=!0,this.overlapOnly=d,this.object1=t,this.object2=e,this.collideCallback=l,this.processCallback=i,this.callbackContext=s},setName:function(x){return this.name=x,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}});E.exports=S},66022:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(71289),S=n(13759),x=n(37742),h=n(83419),d=n(37747),t=n(60758),e=n(72624),l=n(71464),i=new h({initialize:function(r){this.world=r,this.scene=r.scene,this.sys=r.scene.sys},collider:function(s,r,o,a,u){return this.world.addCollider(s,r,o,a,u)},overlap:function(s,r,o,a,u){return this.world.addOverlap(s,r,o,a,u)},existing:function(s,r){var o=r?d.STATIC_BODY:d.DYNAMIC_BODY;return this.world.enableBody(s,o),s},staticImage:function(s,r,o,a){var u=new m(this.scene,s,r,o,a);return this.sys.displayList.add(u),this.world.enableBody(u,d.STATIC_BODY),u},image:function(s,r,o,a){var u=new m(this.scene,s,r,o,a);return this.sys.displayList.add(u),this.world.enableBody(u,d.DYNAMIC_BODY),u},staticSprite:function(s,r,o,a){var u=new S(this.scene,s,r,o,a);return this.sys.displayList.add(u),this.sys.updateList.add(u),this.world.enableBody(u,d.STATIC_BODY),u},sprite:function(s,r,o,a){var u=new S(this.scene,s,r,o,a);return this.sys.displayList.add(u),this.sys.updateList.add(u),this.world.enableBody(u,d.DYNAMIC_BODY),u},staticGroup:function(s,r){return this.sys.updateList.add(new l(this.world,this.world.scene,s,r))},group:function(s,r){return this.sys.updateList.add(new t(this.world,this.world.scene,s,r))},body:function(s,r,o,a){var u=new x(this.world);return u.position.set(s,r),o&&a&&u.setSize(o,a),this.world.add(u,d.DYNAMIC_BODY),u},staticBody:function(s,r,o,a){var u=new e(this.world);return u.position.set(s,r),o&&a&&u.setSize(o,a),this.world.add(u,d.STATIC_BODY),u},destroy:function(){this.world=null,this.scene=null,this.sys=null}});E.exports=i},79599:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=0;if(!Array.isArray(n))m=n;else for(var S=0;S<n.length;S++)m|=n[S];return m};E.exports=y},64897:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37747),S=function(x,h,d,t){var e=0,l=x.deltaAbsX()+h.deltaAbsX()+t;return x._dx===0&&h._dx===0?(x.embedded=!0,h.embedded=!0):x._dx>h._dx?(e=x.right-h.x,e>l&&!d||x.checkCollision.right===!1||h.checkCollision.left===!1?e=0:(x.touching.none=!1,x.touching.right=!0,h.touching.none=!1,h.touching.left=!0,h.physicsType===m.STATIC_BODY&&!d&&(x.blocked.none=!1,x.blocked.right=!0),x.physicsType===m.STATIC_BODY&&!d&&(h.blocked.none=!1,h.blocked.left=!0))):x._dx<h._dx&&(e=x.x-h.width-h.x,-e>l&&!d||x.checkCollision.left===!1||h.checkCollision.right===!1?e=0:(x.touching.none=!1,x.touching.left=!0,h.touching.none=!1,h.touching.right=!0,h.physicsType===m.STATIC_BODY&&!d&&(x.blocked.none=!1,x.blocked.left=!0),x.physicsType===m.STATIC_BODY&&!d&&(h.blocked.none=!1,h.blocked.right=!0))),x.overlapX=e,h.overlapX=e,e};E.exports=S},45170:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37747),S=function(x,h,d,t){var e=0,l=x.deltaAbsY()+h.deltaAbsY()+t;return x._dy===0&&h._dy===0?(x.embedded=!0,h.embedded=!0):x._dy>h._dy?(e=x.bottom-h.y,e>l&&!d||x.checkCollision.down===!1||h.checkCollision.up===!1?e=0:(x.touching.none=!1,x.touching.down=!0,h.touching.none=!1,h.touching.up=!0,h.physicsType===m.STATIC_BODY&&!d&&(x.blocked.none=!1,x.blocked.down=!0),x.physicsType===m.STATIC_BODY&&!d&&(h.blocked.none=!1,h.blocked.up=!0))):x._dy<h._dy&&(e=x.y-h.bottom,-e>l&&!d||x.checkCollision.up===!1||h.checkCollision.down===!1?e=0:(x.touching.none=!1,x.touching.up=!0,h.touching.none=!1,h.touching.down=!0,h.physicsType===m.STATIC_BODY&&!d&&(x.blocked.none=!1,x.blocked.up=!0),x.physicsType===m.STATIC_BODY&&!d&&(h.blocked.none=!1,h.blocked.down=!0))),x.overlapY=e,h.overlapY=e,e};E.exports=S},60758:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(13759),S=n(83419),x=n(78389),h=n(37747),d=n(95540),t=n(26479),e=n(41212),l=new S({Extends:t,Mixins:[x],initialize:function(s,r,o,a){if(!o&&!a)a={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(e(o))a=o,o=null,a.internalCreateCallback=this.createCallbackHandler,a.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(o)&&e(o[0])){var u=this;o.forEach(function(f){f.internalCreateCallback=u.createCallbackHandler,f.internalRemoveCallback=u.removeCallbackHandler,f.classType=d(f,"classType",m)}),a=null}else a={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=s,a&&(a.classType=d(a,"classType",m)),this.physicsType=h.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:d(a,"collideWorldBounds",!1),setBoundsRectangle:d(a,"customBoundsRectangle",null),setAccelerationX:d(a,"accelerationX",0),setAccelerationY:d(a,"accelerationY",0),setAllowDrag:d(a,"allowDrag",!0),setAllowGravity:d(a,"allowGravity",!0),setAllowRotation:d(a,"allowRotation",!0),setDamping:d(a,"useDamping",!1),setBounceX:d(a,"bounceX",0),setBounceY:d(a,"bounceY",0),setDragX:d(a,"dragX",0),setDragY:d(a,"dragY",0),setEnable:d(a,"enable",!0),setGravityX:d(a,"gravityX",0),setGravityY:d(a,"gravityY",0),setFrictionX:d(a,"frictionX",0),setFrictionY:d(a,"frictionY",0),setMaxSpeed:d(a,"maxSpeed",-1),setMaxVelocityX:d(a,"maxVelocityX",1e4),setMaxVelocityY:d(a,"maxVelocityY",1e4),setVelocityX:d(a,"velocityX",0),setVelocityY:d(a,"velocityY",0),setAngularVelocity:d(a,"angularVelocity",0),setAngularAcceleration:d(a,"angularAcceleration",0),setAngularDrag:d(a,"angularDrag",0),setMass:d(a,"mass",1),setImmovable:d(a,"immovable",!1)},t.call(this,r,o,a),this.type="PhysicsGroup"},createCallbackHandler:function(i){(!i.body||i.body.physicsType!==h.DYNAMIC_BODY)&&(i.body&&(i.body.destroy(),i.body=null),this.world.enableBody(i,h.DYNAMIC_BODY));var s=i.body;for(var r in this.defaults)s[r](this.defaults[r])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,s,r){r===void 0&&(r=0);for(var o=this.getChildren(),a=0;a<o.length;a++)o[a].body.velocity.set(i+a*r,s+a*r);return this},setVelocityX:function(i,s){s===void 0&&(s=0);for(var r=this.getChildren(),o=0;o<r.length;o++)r[o].body.velocity.x=i+o*s;return this},setVelocityY:function(i,s){s===void 0&&(s=0);for(var r=this.getChildren(),o=0;o<r.length;o++)r[o].body.velocity.y=i+o*s;return this}});E.exports=l},3017:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y,n,m,S,x,h,d,t,e,l,i,s,r,o,a,u,f,v=function(M,A,R){y=M,n=A;var P=y.velocity.x,L=n.velocity.x;return m=y.pushable,e=y._dx<0,l=y._dx>0,i=y._dx===0,a=Math.abs(y.right-n.x)<=Math.abs(n.right-y.x),d=L-P*y.bounce.x,S=n.pushable,s=n._dx<0,r=n._dx>0,o=n._dx===0,u=!a,t=P-L*n.bounce.x,f=Math.abs(R),c()},c=function(){return l&&a&&n.blocked.right?(y.processX(-f,d,!1,!0),1):e&&u&&n.blocked.left?(y.processX(f,d,!0),1):r&&u&&y.blocked.right?(n.processX(-f,t,!1,!0),2):s&&a&&y.blocked.left?(n.processX(f,t,!0),2):0},g=function(){var M=y.velocity.x,A=n.velocity.x,R=Math.sqrt(A*A*n.mass/y.mass)*(A>0?1:-1),P=Math.sqrt(M*M*y.mass/n.mass)*(M>0?1:-1),L=(R+P)*.5;return R-=L,P-=L,x=L+R*y.bounce.x,h=L+P*n.bounce.x,e&&u?p(0):s&&a?p(1):l&&a?p(2):r&&u?p(3):!1},p=function(M){if(m&&S)f*=.5,M===0||M===3?(y.processX(f,x),n.processX(-f,h)):(y.processX(-f,x),n.processX(f,h));else if(m&&!S)M===0||M===3?y.processX(f,d,!0):y.processX(-f,d,!1,!0);else if(!m&&S)M===0||M===3?n.processX(-f,t,!1,!0):n.processX(f,t,!0);else{var A=f*.5;M===0?o?(y.processX(f,0,!0),n.processX(0,null,!1,!0)):r?(y.processX(A,0,!0),n.processX(-A,0,!1,!0)):(y.processX(A,n.velocity.x,!0),n.processX(-A,null,!1,!0)):M===1?i?(y.processX(0,null,!1,!0),n.processX(f,0,!0)):l?(y.processX(-A,0,!1,!0),n.processX(A,0,!0)):(y.processX(-A,null,!1,!0),n.processX(A,y.velocity.x,!0)):M===2?o?(y.processX(-f,0,!1,!0),n.processX(0,null,!0)):s?(y.processX(-A,0,!1,!0),n.processX(A,0,!0)):(y.processX(-A,n.velocity.x,!1,!0),n.processX(A,null,!0)):M===3&&(i?(y.processX(0,null,!0),n.processX(-f,0,!1,!0)):e?(y.processX(A,0,!0),n.processX(-A,0,!1,!0)):(y.processX(A,n.velocity.y,!0),n.processX(-A,null,!1,!0)))}return!0},T=function(M){if(M===1?n.velocity.x=0:a?n.processX(f,t,!0):n.processX(-f,t,!1,!0),y.moves){var A=y.directControl?y.y-y.autoFrame.y:y.y-y.prev.y;n.y+=A*y.friction.y,n._dy=n.y-n.prev.y}},C=function(M){if(M===2?y.velocity.x=0:u?y.processX(f,d,!0):y.processX(-f,d,!1,!0),n.moves){var A=n.directControl?n.y-n.autoFrame.y:n.y-n.prev.y;y.y+=A*n.friction.y,y._dy=y.y-y.prev.y}};E.exports={BlockCheck:c,Check:g,Set:v,Run:p,RunImmovableBody1:T,RunImmovableBody2:C}},47962:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y,n,m,S,x,h,d,t,e,l,i,s,r,o,a,u,f,v=function(M,A,R){y=M,n=A;var P=y.velocity.y,L=n.velocity.y;return m=y.pushable,e=y._dy<0,l=y._dy>0,i=y._dy===0,a=Math.abs(y.bottom-n.y)<=Math.abs(n.bottom-y.y),d=L-P*y.bounce.y,S=n.pushable,s=n._dy<0,r=n._dy>0,o=n._dy===0,u=!a,t=P-L*n.bounce.y,f=Math.abs(R),c()},c=function(){return l&&a&&n.blocked.down?(y.processY(-f,d,!1,!0),1):e&&u&&n.blocked.up?(y.processY(f,d,!0),1):r&&u&&y.blocked.down?(n.processY(-f,t,!1,!0),2):s&&a&&y.blocked.up?(n.processY(f,t,!0),2):0},g=function(){var M=y.velocity.y,A=n.velocity.y,R=Math.sqrt(A*A*n.mass/y.mass)*(A>0?1:-1),P=Math.sqrt(M*M*y.mass/n.mass)*(M>0?1:-1),L=(R+P)*.5;return R-=L,P-=L,x=L+R*y.bounce.y,h=L+P*n.bounce.y,e&&u?p(0):s&&a?p(1):l&&a?p(2):r&&u?p(3):!1},p=function(M){if(m&&S)f*=.5,M===0||M===3?(y.processY(f,x),n.processY(-f,h)):(y.processY(-f,x),n.processY(f,h));else if(m&&!S)M===0||M===3?y.processY(f,d,!0):y.processY(-f,d,!1,!0);else if(!m&&S)M===0||M===3?n.processY(-f,t,!1,!0):n.processY(f,t,!0);else{var A=f*.5;M===0?o?(y.processY(f,0,!0),n.processY(0,null,!1,!0)):r?(y.processY(A,0,!0),n.processY(-A,0,!1,!0)):(y.processY(A,n.velocity.y,!0),n.processY(-A,null,!1,!0)):M===1?i?(y.processY(0,null,!1,!0),n.processY(f,0,!0)):l?(y.processY(-A,0,!1,!0),n.processY(A,0,!0)):(y.processY(-A,null,!1,!0),n.processY(A,y.velocity.y,!0)):M===2?o?(y.processY(-f,0,!1,!0),n.processY(0,null,!0)):s?(y.processY(-A,0,!1,!0),n.processY(A,0,!0)):(y.processY(-A,n.velocity.y,!1,!0),n.processY(A,null,!0)):M===3&&(i?(y.processY(0,null,!0),n.processY(-f,0,!1,!0)):e?(y.processY(A,0,!0),n.processY(-A,0,!1,!0)):(y.processY(A,n.velocity.y,!0),n.processY(-A,null,!1,!0)))}return!0},T=function(M){if(M===1?n.velocity.y=0:a?n.processY(f,t,!0):n.processY(-f,t,!1,!0),y.moves){var A=y.directControl?y.x-y.autoFrame.x:y.x-y.prev.x;n.x+=A*y.friction.x,n._dx=n.x-n.prev.x}},C=function(M){if(M===2?y.velocity.y=0:u?y.processY(f,d,!0):y.processY(-f,d,!1,!0),n.moves){var A=n.directControl?n.x-n.autoFrame.x:n.x-n.prev.x;y.x+=A*n.friction.x,y._dx=y.x-y.prev.x}};E.exports={BlockCheck:c,Check:g,Set:v,Run:p,RunImmovableBody1:T,RunImmovableBody2:C}},14087:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(64897),S=n(3017),x=function(h,d,t,e,l){l===void 0&&(l=m(h,d,t,e));var i=h.immovable,s=d.immovable;if(t||l===0||i&&s||h.customSeparateX||d.customSeparateX)return l!==0||h.embedded&&d.embedded;var r=S.Set(h,d,l);return!i&&!s?r>0?!0:S.Check():(i?S.RunImmovableBody1(r):s&&S.RunImmovableBody2(r),!0)};E.exports=x},89936:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45170),S=n(47962),x=function(h,d,t,e,l){l===void 0&&(l=m(h,d,t,e));var i=h.immovable,s=d.immovable;if(t||l===0||i&&s||h.customSeparateY||d.customSeparateY)return l!==0||h.embedded&&d.embedded;var r=S.Set(h,d,l);return!i&&!s?r>0?!0:S.Check():(i?S.RunImmovableBody1(r):s&&S.RunImmovableBody2(r),!0)};E.exports=x},95829:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===void 0&&(m={}),m.none=n,m.up=!1,m.down=!1,m.left=!1,m.right=!1,n||(m.up=!0,m.down=!0,m.left=!0,m.right=!0),m};E.exports=y},72624:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87902),S=n(83419),x=n(78389),h=n(37747),d=n(37303),t=n(95829),e=n(26099),l=new S({Mixins:[x],initialize:function(s,r){var o=64,a=64,u={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},f=r!==void 0;f&&r.displayWidth&&(o=r.displayWidth,a=r.displayHeight),f||(r=u),this.world=s,this.gameObject=f?r:void 0,this.isBody=!0,this.debugShowBody=s.defaults.debugShowStaticBody,this.debugBodyColor=s.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new e,this.position=new e(r.x-o*r.originX,r.y-a*r.originY),this.width=o,this.height=a,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new e(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=e.ZERO,this.allowGravity=!1,this.gravity=e.ZERO,this.bounce=e.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=t(!1),this.touching=t(!0),this.wasTouching=t(!0),this.blocked=t(!0),this.physicsType=h.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(i,s,r){if(s===void 0&&(s=!0),r===void 0&&(r=!0),!i||!i.hasTransformComponent)return this;var o=this.world;return this.gameObject&&this.gameObject.body&&(o.disable(this.gameObject),this.gameObject.body=null),i.body&&o.disable(i),this.gameObject=i,i.body=this,this.setSize(),s&&this.updateFromGameObject(),this.enable=r,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,s){return s===void 0&&(s=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,s),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,s,r){r===void 0&&(r=!0);var o=this.gameObject;if(o&&o.frame&&(i||(i=o.frame.realWidth),s||(s=o.frame.realHeight)),this.world.staticTree.remove(this),this.width=i,this.height=s,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(s/2),r&&o&&o.getCenter){var a=o.displayWidth/2,u=o.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(a-this.halfWidth,u-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,s,r){return s===void 0&&(s=this.offset.x),r===void 0&&(r=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(s,r),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,s){var r=this.gameObject;i===void 0&&(i=r.x),s===void 0&&(s=r.y),this.world.staticTree.remove(this),r.setPosition(i,s),r.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,s){return this.isCircle?m(this,i,s):d(this,i,s)},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.add(this)},drawDebug:function(i){var s=this.position,r=s.x+this.halfWidth,o=s.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(r,o,this.width/2):i.strokeRect(s.x,s.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}}});E.exports=l},71464:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(13759),S=n(83419),x=n(78389),h=n(37747),d=n(95540),t=n(26479),e=n(41212),l=new S({Extends:t,Mixins:[x],initialize:function(s,r,o,a){!o&&!a?a={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:m}:e(o)?(a=o,o=null,a.internalCreateCallback=this.createCallbackHandler,a.internalRemoveCallback=this.removeCallbackHandler,a.createMultipleCallback=this.createMultipleCallbackHandler,a.classType=d(a,"classType",m)):Array.isArray(o)&&e(o[0])?(a=o,o=null,a.forEach(function(u){u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler,u.createMultipleCallback=this.createMultipleCallbackHandler,u.classType=d(u,"classType",m)},this)):a={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=s,this.physicsType=h.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,t.call(this,r,o,a),this.type="StaticPhysicsGroup"},createCallbackHandler:function(i){(!i.body||i.body.physicsType!==h.STATIC_BODY)&&(i.body&&(i.body.destroy(),i.body=null),this.world.enableBody(i,h.STATIC_BODY))},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var i=Array.from(this.children),s=0;s<i.length;s++)i[s].body.reset();return this}});E.exports=l},82248:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(55495),S=n(37742),x=n(45319),h=n(83419),d=n(79342),t=n(37747),e=n(20339),l=n(52816),i=n(50792),s=n(63012),r=n(43855),o=n(5470),a=n(94977),u=n(64897),f=n(45170),v=n(96523),c=n(35154),g=n(36383),p=n(25774),T=n(96602),C=n(87841),M=n(59542),A=n(40012),R=n(14087),P=n(89936),L=n(72624),F=n(2483),w=n(61340),O=n(26099),B=n(15994),I=new h({Extends:i,initialize:function(N,z){i.call(this),this.scene=N,this.bodies=new Set,this.staticBodies=new Set,this.pendingDestroy=new Set,this.colliders=new p,this.gravity=new O(c(z,"gravity.x",0),c(z,"gravity.y",0)),this.bounds=new C(c(z,"x",0),c(z,"y",0),c(z,"width",N.sys.scale.width),c(z,"height",N.sys.scale.height)),this.checkCollision={up:c(z,"checkCollision.up",!0),down:c(z,"checkCollision.down",!0),left:c(z,"checkCollision.left",!0),right:c(z,"checkCollision.right",!0)},this.fps=c(z,"fps",60),this.fixedStep=c(z,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=c(z,"timeScale",1),this.OVERLAP_BIAS=c(z,"overlapBias",4),this.TILE_BIAS=c(z,"tileBias",16),this.forceX=c(z,"forceX",!1),this.isPaused=c(z,"isPaused",!1),this._total=0,this.drawDebug=c(z,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:c(z,"debugShowBody",!0),debugShowStaticBody:c(z,"debugShowStaticBody",!0),debugShowVelocity:c(z,"debugShowVelocity",!0),bodyDebugColor:c(z,"debugBodyColor",16711935),staticBodyDebugColor:c(z,"debugStaticBodyColor",255),velocityDebugColor:c(z,"debugVelocityColor",65280)},this.maxEntries=c(z,"maxEntries",16),this.useTree=c(z,"useTree",!0),this.tree=new M(this.maxEntries),this.staticTree=new M(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new w,this._tempMatrix2=new w,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(D,N){N===void 0&&(N=t.DYNAMIC_BODY),Array.isArray(D)||(D=[D]);for(var z=0;z<D.length;z++){var V=D[z];if(V.isParent)for(var U=V.getChildren(),G=0;G<U.length;G++){var b=U[G];b.isParent?this.enable(b,N):this.enableBody(b,N)}else this.enableBody(V,N)}},enableBody:function(D,N){return N===void 0&&(N=t.DYNAMIC_BODY),D.hasTransformComponent&&(D.body||(N===t.DYNAMIC_BODY?D.body=new S(this,D):N===t.STATIC_BODY&&(D.body=new L(this,D))),this.add(D.body)),D},add:function(D){return D.physicsType===t.DYNAMIC_BODY?this.bodies.add(D):D.physicsType===t.STATIC_BODY&&(this.staticBodies.add(D),this.staticTree.insert(D)),D.enable=!0,D},disable:function(D){Array.isArray(D)||(D=[D]);for(var N=0;N<D.length;N++){var z=D[N];if(z.isParent)for(var V=z.getChildren(),U=0;U<V.length;U++){var G=V[U];G.isParent?this.disable(G):this.disableBody(G.body)}else this.disableBody(z.body)}},disableBody:function(D){this.remove(D),D.enable=!1},remove:function(D){D.physicsType===t.DYNAMIC_BODY?(this.tree.remove(D),this.bodies.delete(D)):D.physicsType===t.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,N,z,V,U,G,b,Y){return this.bounds.setTo(D,N,z,V),U!==void 0&&this.setBoundsCollision(U,G,b,Y),this},setBoundsCollision:function(D,N,z,V){return D===void 0&&(D=!0),N===void 0&&(N=!0),z===void 0&&(z=!0),V===void 0&&(V=!0),this.checkCollision.left=D,this.checkCollision.right=N,this.checkCollision.up=z,this.checkCollision.down=V,this},pause:function(){return this.isPaused=!0,this.emit(s.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(s.RESUME),this},addCollider:function(D,N,z,V,U){z===void 0&&(z=null),V===void 0&&(V=null),U===void 0&&(U=z);var G=new d(this,!1,D,N,z,V,U);return this.colliders.add(G),G},addOverlap:function(D,N,z,V,U){z===void 0&&(z=null),V===void 0&&(V=null),U===void 0&&(U=z);var G=new d(this,!0,D,N,z,V,U);return this.colliders.add(G),G},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,N){if(!(this.isPaused||this.bodies.size===0)){var z=this._frameTime,V=this._frameTimeMS*this.timeScale;this._elapsed+=N;var U=this.bodies,G=this._elapsed>=V;if(this.fixedStep||(z=N*.001,G=!0,this._elapsed=0),U.forEach(function(H){H.enable&&H.preUpdate(G,z)}),G){this._elapsed-=V,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(Array.from(U)));for(var b=this.colliders.update(),Y=0;Y<b.length;Y++){var W=b[Y];W.active&&W.update()}this.emit(s.WORLD_STEP,z)}for(;this._elapsed>=V;)this._elapsed-=V,this.step(z)}},step:function(D){var N=this.bodies;N.forEach(function(G){G.enable&&G.update(D)}),this.useTree&&(this.tree.clear(),this.tree.load(Array.from(N)));for(var z=this.colliders.update(),V=0;V<z.length;V++){var U=z[V];U.active&&U.update()}this.emit(s.WORLD_STEP,D),this.stepsLastFrame++},singleStep:function(){this.update(0,this._frameTimeMS),this.postUpdate()},postUpdate:function(){var D=this.bodies,N=this.staticBodies;if(this.stepsLastFrame&&(this.stepsLastFrame=0,D.forEach(function(b){b.enable&&b.postUpdate()})),this.drawDebug){var z=this.debugGraphic;z.clear(),D.forEach(function(b){b.willDrawDebug()&&b.drawDebug(z)}),N.forEach(function(b){b.willDrawDebug()&&b.drawDebug(z)})}var V=this.pendingDestroy;if(V.size>0){var U=this.tree,G=this.staticTree;V.forEach(function(b){b.physicsType===t.DYNAMIC_BODY?(U.remove(b),D.delete(b)):b.physicsType===t.STATIC_BODY&&(G.remove(b),N.delete(b)),b.world=void 0,b.gameObject=void 0}),V.clear()}},updateMotion:function(D,N){D.allowRotation&&this.computeAngularVelocity(D,N),this.computeVelocity(D,N)},computeAngularVelocity:function(D,N){var z=D.angularVelocity,V=D.angularAcceleration,U=D.angularDrag,G=D.maxAngular;V?z+=V*N:D.allowDrag&&U&&(U*=N,o(z-U,0,.1)?z-=U:a(z+U,0,.1)?z+=U:z=0),z=x(z,-G,G);var b=z-D.angularVelocity;D.angularVelocity+=b,D.rotation+=D.angularVelocity*N},computeVelocity:function(D,N){var z=D.velocity.x,V=D.acceleration.x,U=D.drag.x,G=D.maxVelocity.x,b=D.velocity.y,Y=D.acceleration.y,W=D.drag.y,H=D.maxVelocity.y,X=D.speed,K=D.maxSpeed,Z=D.allowDrag,Q=D.useDamping;D.allowGravity&&(z+=(this.gravity.x+D.gravity.x)*N,b+=(this.gravity.y+D.gravity.y)*N),V?z+=V*N:Z&&U&&(Q?(U=Math.pow(U,N),z*=U,X=Math.sqrt(z*z+b*b),r(X,0,.001)&&(z=0)):(U*=N,o(z-U,0,.01)?z-=U:a(z+U,0,.01)?z+=U:z=0)),Y?b+=Y*N:Z&&W&&(Q?(W=Math.pow(W,N),b*=W,X=Math.sqrt(z*z+b*b),r(X,0,.001)&&(b=0)):(W*=N,o(b-W,0,.01)?b-=W:a(b+W,0,.01)?b+=W:b=0)),z=x(z,-G,G),b=x(b,-H,H),D.velocity.set(z,b),K>-1&&D.velocity.length()>K&&(D.velocity.normalize().scale(K),X=K),D.speed=X},separate:function(D,N,z,V,U){var G,b,Y=!1,W=!0;if(!D.enable||!N.enable||D.checkCollision.none||N.checkCollision.none||!this.intersects(D,N)||z&&z.call(V,D.gameObject||D,N.gameObject||N)===!1)return Y;if(D.isCircle||N.isCircle){var H=this.separateCircle(D,N,U);H.result?(Y=!0,W=!1):(G=H.x,b=H.y,W=!0)}if(W){var X=!1,K=!1,Z=this.OVERLAP_BIAS;U?(X=R(D,N,U,Z,G),K=P(D,N,U,Z,b)):this.forceX||Math.abs(this.gravity.y+D.gravity.y)<Math.abs(this.gravity.x+D.gravity.x)?(X=R(D,N,U,Z,G),this.intersects(D,N)&&(K=P(D,N,U,Z,b))):(K=P(D,N,U,Z,b),this.intersects(D,N)&&(X=R(D,N,U,Z,G))),Y=X||K}return Y&&(U?(D.onOverlap||N.onOverlap)&&this.emit(s.OVERLAP,D.gameObject,N.gameObject,D,N):(D.onCollide||N.onCollide)&&this.emit(s.COLLIDE,D.gameObject,N.gameObject,D,N)),Y},separateCircle:function(D,N,z){u(D,N,!1,0),f(D,N,!1,0);var V=D.isCircle,U=N.isCircle,G=D.center,b=N.center,Y=D.immovable,W=N.immovable,H=D.velocity,X=N.velocity,K=0,Z=!0;if(V!==U){Z=!1;var Q=G.x,j=G.y,J=D.halfWidth,tt=N.position.x,k=N.position.y,q=N.right,_=N.bottom;U&&(Q=b.x,j=b.y,J=N.halfWidth,tt=D.position.x,k=D.position.y,q=D.right,_=D.bottom),j<k?Q<tt?K=e(Q,j,tt,k)-J:Q>q&&(K=e(Q,j,q,k)-J):j>_&&(Q<tt?K=e(Q,j,tt,_)-J:Q>q&&(K=e(Q,j,q,_)-J)),K*=-1}else K=D.halfWidth+N.halfWidth-l(G,b);D.overlapR=K,N.overlapR=K;var rt=m(G,b),at=(K+g.EPSILON)*Math.cos(rt),ht=(K+g.EPSILON)*Math.sin(rt),ot={overlap:K,result:!1,x:at,y:ht};if(z&&(!Z||Z&&K!==0))return ot.result=!0,ot;if(!Z&&K===0||Y&&W||D.customSeparateX||N.customSeparateX)return ot.x=void 0,ot.y=void 0,ot;var nt=!D.pushable&&!N.pushable;if(Z){var it=G.x-b.x,lt=G.y-b.y,dt=Math.sqrt(Math.pow(it,2)+Math.pow(lt,2)),ct=(b.x-G.x)/dt||0,Bt=(b.y-G.y)/dt||0,Lt=2*(H.x*ct+H.y*Bt-X.x*ct-X.y*Bt)/(D.mass+N.mass);(Y||W||!D.pushable||!N.pushable)&&(Lt*=2),!Y&&D.pushable&&(H.x=H.x-Lt/D.mass*ct,H.y=H.y-Lt/D.mass*Bt,H.multiply(D.bounce)),!W&&N.pushable&&(X.x=X.x+Lt/N.mass*ct,X.y=X.y+Lt/N.mass*Bt,X.multiply(N.bounce)),!Y&&!W&&(at*=.5,ht*=.5),(!Y||D.pushable||nt)&&(D.x-=at,D.y-=ht,D.updateCenter()),(!W||N.pushable||nt)&&(N.x+=at,N.y+=ht,N.updateCenter()),ot.result=!0}else(!Y||D.pushable||nt)&&(D.x-=at,D.y-=ht,D.updateCenter()),(!W||N.pushable||nt)&&(N.x+=at,N.y+=ht,N.updateCenter()),ot.x=void 0,ot.y=void 0;return ot},intersects:function(D,N){return D===N?!1:!D.isCircle&&!N.isCircle?!(D.right<=N.left||D.bottom<=N.top||D.left>=N.right||D.top>=N.bottom):D.isCircle?N.isCircle?l(D.center,N.center)<=D.halfWidth+N.halfWidth:this.circleBodyIntersects(D,N):this.circleBodyIntersects(N,D)},circleBodyIntersects:function(D,N){var z=x(D.center.x,N.left,N.right),V=x(D.center.y,N.top,N.bottom),U=(D.center.x-z)*(D.center.x-z),G=(D.center.y-V)*(D.center.y-V);return U+G<=D.halfWidth*D.halfWidth},overlap:function(D,N,z,V,U){return z===void 0&&(z=null),V===void 0&&(V=null),U===void 0&&(U=z),this.collideObjects(D,N,z,V,U,!0)},collide:function(D,N,z,V,U){return z===void 0&&(z=null),V===void 0&&(V=null),U===void 0&&(U=z),this.collideObjects(D,N,z,V,U,!1)},collideObjects:function(D,N,z,V,U,G){var b,Y;D.isParent&&(D.physicsType===void 0||N===void 0||D===N)&&(D=Array.from(D.children)),N&&N.isParent&&N.physicsType===void 0&&(N=Array.from(N.children));var W=Array.isArray(D),H=Array.isArray(N);if(this._total=0,!W&&!H)this.collideHandler(D,N,z,V,U,G);else if(!W&&H)for(b=0;b<N.length;b++)this.collideHandler(D,N[b],z,V,U,G);else if(W&&!H)if(N)for(b=0;b<D.length;b++)this.collideHandler(D[b],N,z,V,U,G);else for(b=0;b<D.length;b++){var X=D[b];for(Y=b+1;Y<D.length;Y++)b!==Y&&this.collideHandler(X,D[Y],z,V,U,G)}else for(b=0;b<D.length;b++)for(Y=0;Y<N.length;Y++)this.collideHandler(D[b],N[Y],z,V,U,G);return this._total>0},collideHandler:function(D,N,z,V,U,G){if(N===void 0&&D.isParent)return this.collideGroupVsGroup(D,D,z,V,U,G);if(!D||!N)return!1;if(D.body||D.isBody){if(N.body||N.isBody)return this.collideSpriteVsSprite(D,N,z,V,U,G);if(N.isParent)return this.collideSpriteVsGroup(D,N,z,V,U,G);if(N.isTilemap)return this.collideSpriteVsTilemapLayer(D,N,z,V,U,G)}else if(D.isParent){if(N.body||N.isBody)return this.collideSpriteVsGroup(N,D,z,V,U,G);if(N.isParent)return this.collideGroupVsGroup(D,N,z,V,U,G);if(N.isTilemap)return this.collideGroupVsTilemapLayer(D,N,z,V,U,G)}else if(D.isTilemap){if(N.body||N.isBody)return this.collideSpriteVsTilemapLayer(N,D,z,V,U,G);if(N.isParent)return this.collideGroupVsTilemapLayer(N,D,z,V,U,G)}},canCollide:function(D,N){return D&&N&&(D.collisionMask&N.collisionCategory)!==0&&(N.collisionMask&D.collisionCategory)!==0},collideSpriteVsSprite:function(D,N,z,V,U,G){var b=D.isBody?D:D.body,Y=N.isBody?N:N.body;return this.canCollide(b,Y)?(this.separate(b,Y,V,U,G)&&(z&&z.call(U,D,N),this._total++),!0):!1},collideSpriteVsGroup:function(D,N,z,V,U,G){var b=D.isBody?D:D.body;if(!(N.getLength()===0||!b||!b.enable||b.checkCollision.none||!this.canCollide(b,N))){var Y,W,H;if(this.useTree||N.physicsType===t.STATIC_BODY){var X=this.treeMinMax;X.minX=b.left,X.minY=b.top,X.maxX=b.right,X.maxY=b.bottom;var K=N.physicsType===t.DYNAMIC_BODY?this.tree.search(X):this.staticTree.search(X);for(W=K.length,Y=0;Y<W;Y++)H=K[Y],!(b===H||!H.enable||H.checkCollision.none||!N.contains(H.gameObject))&&this.separate(b,H,V,U,G)&&(z&&z.call(U,b.gameObject,H.gameObject),this._total++)}else{var Z=N.getChildren(),Q=Z.indexOf(D);for(W=Z.length,Y=0;Y<W;Y++)H=Z[Y].body,!(!H||Y===Q||!H.enable)&&this.separate(b,H,V,U,G)&&(z&&z.call(U,b.gameObject,H.gameObject),this._total++)}}},collideGroupVsTilemapLayer:function(D,N,z,V,U,G){if(!this.canCollide(D,N))return!1;var b=D.getChildren();if(b.length===0)return!1;for(var Y=!1,W=0;W<b.length;W++)(b[W].body||b[W].isBody)&&this.collideSpriteVsTilemapLayer(b[W],N,z,V,U,G)&&(Y=!0);return Y},collideTiles:function(D,N,z,V,U){return N.length===0||D.body&&!D.body.enable||D.isBody&&!D.enable?!1:this.collideSpriteVsTilesHandler(D,N,z,V,U,!1,!1)},overlapTiles:function(D,N,z,V,U){return N.length===0||D.body&&!D.body.enable||D.isBody&&!D.enable?!1:this.collideSpriteVsTilesHandler(D,N,z,V,U,!0,!1)},collideSpriteVsTilemapLayer:function(D,N,z,V,U,G){var b=D.isBody?D:D.body;if(!b.enable||b.checkCollision.none||!this.canCollide(b,N))return!1;var Y=N.layer,W=b.x-Y.tileWidth*N.scaleX,H=b.y-Y.tileHeight*N.scaleY,X=b.width+Y.tileWidth*N.scaleX,K=b.height+Y.tileHeight*N.scaleY,Z=G?null:this.tileFilterOptions,Q=v(W,H,X,K,Z,N.scene.cameras.main,N.layer);return Q.length===0?!1:this.collideSpriteVsTilesHandler(D,Q,z,V,U,G,!0)},collideSpriteVsTilesHandler:function(D,N,z,V,U,G,b){for(var Y=D.isBody?D:D.body,W,H={left:0,right:0,top:0,bottom:0},X,K=!1,Z=0;Z<N.length;Z++){W=N[Z],X=W.tilemapLayer;var Q=X.tileToWorldXY(W.x,W.y);H.left=Q.x,H.top=Q.y,H.right=H.left+W.width*X.scaleX,H.bottom=H.top+W.height*X.scaleY,F(H,Y)&&(!V||V.call(U,D,W))&&T(W,D)&&(G||A(Z,Y,W,H,X,this.TILE_BIAS,b))&&(this._total++,K=!0,z&&z.call(U,D,W),G&&Y.onOverlap?this.emit(s.TILE_OVERLAP,D,W,Y):Y.onCollide&&this.emit(s.TILE_COLLIDE,D,W,Y))}return K},collideGroupVsGroup:function(D,N,z,V,U,G){if(!(D.getLength()===0||N.getLength()===0||!this.canCollide(D,N)))for(var b=D.getChildren(),Y=0;Y<b.length;Y++)this.collideSpriteVsGroup(b[Y],N,z,V,U,G)},wrap:function(D,N){D.body?this.wrapObject(D,N):D.getChildren?this.wrapArray(D.getChildren(),N):Array.isArray(D)?this.wrapArray(D,N):this.wrapObject(D,N)},wrapArray:function(D,N){for(var z=0;z<D.length;z++)this.wrapObject(D[z],N)},wrapObject:function(D,N){N===void 0&&(N=0),D.x=B(D.x,this.bounds.left-N,this.bounds.right+N),D.y=B(D.y,this.bounds.top-N,this.bounds.bottom+N)},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)}});E.exports=I},1093:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setAcceleration:function(n,m){return this.body.acceleration.set(n,m),this},setAccelerationX:function(n){return this.body.acceleration.x=n,this},setAccelerationY:function(n){return this.body.acceleration.y=n,this}};E.exports=y},59023:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setAngularVelocity:function(n){return this.body.angularVelocity=n,this},setAngularAcceleration:function(n){return this.body.angularAcceleration=n,this},setAngularDrag:function(n){return this.body.angularDrag=n,this}};E.exports=y},62069:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setBounce:function(n,m){return this.body.bounce.set(n,m),this},setBounceX:function(n){return this.body.bounce.x=n,this},setBounceY:function(n){return this.body.bounce.y=n,this},setCollideWorldBounds:function(n,m,S,x){return this.body.setCollideWorldBounds(n,m,S,x),this}};E.exports=y},78389:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(79599),S={setCollisionCategory:function(x){var h=this.body?this.body:this;return h.collisionCategory=x,this},willCollideWith:function(x){var h=this.body?this.body:this;return(h.collisionMask&x)!==0},addCollidesWith:function(x){var h=this.body?this.body:this;return h.collisionMask=h.collisionMask|x,this},removeCollidesWith:function(x){var h=this.body?this.body:this;return h.collisionMask=h.collisionMask&~x,this},setCollidesWith:function(x){var h=this.body?this.body:this;return h.collisionMask=m(x),this},resetCollisionCategory:function(){var x=this.body?this.body:this;return x.collisionCategory=1,x.collisionMask=2147483647,this}};E.exports=S},87118:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setDebug:function(n,m,S){return this.debugShowBody=n,this.debugShowVelocity=m,this.debugBodyColor=S,this},setDebugBodyColor:function(n){return this.body.debugBodyColor=n,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(n){this.body.debugShowBody=n}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(n){this.body.debugShowVelocity=n}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(n){this.body.debugBodyColor=n}}};E.exports=y},52819:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setDrag:function(n,m){return this.body.drag.set(n,m),this},setDragX:function(n){return this.body.drag.x=n,this},setDragY:function(n){return this.body.drag.y=n,this},setDamping:function(n){return this.body.useDamping=n,this}};E.exports=y},4074:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setDirectControl:function(n){return this.body.setDirectControl(n),this},enableBody:function(n,m,S,x,h){return n&&this.body.reset(m,S),x&&(this.body.gameObject.active=!0),h&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(n,m){return n===void 0&&(n=!1),m===void 0&&(m=!1),this.body.stop(),this.body.enable=!1,n&&(this.body.gameObject.active=!1),m&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};E.exports=y},40831:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setFriction:function(n,m){return this.body.friction.set(n,m),this},setFrictionX:function(n){return this.body.friction.x=n,this},setFrictionY:function(n){return this.body.friction.y=n,this}};E.exports=y},26775:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setGravity:function(n,m){return this.body.gravity.set(n,m),this},setGravityX:function(n){return this.body.gravity.x=n,this},setGravityY:function(n){return this.body.gravity.y=n,this}};E.exports=y},9437:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setImmovable:function(n){return n===void 0&&(n=!0),this.body.immovable=n,this}};E.exports=y},30621:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setMass:function(n){return this.body.mass=n,this}};E.exports=y},72441:(E,y,n)=>{var m=n(47956),S=n(96503),x=n(2044),h=n(81491),d=function(t,e,l,i,s,r){var o=m(t,e-i,l-i,2*i,2*i,s,r);if(o.length===0)return o;for(var a=new S(e,l,i),u=new S,f=[],v=0;v<o.length;v++){var c=o[v];c.isCircle?(u.setTo(c.center.x,c.center.y,c.halfWidth),x(a,u)&&f.push(c)):h(a,c)&&f.push(c)}return f};E.exports=d},47956:E=>{var y=function(n,m,S,x,h,d,t){d===void 0&&(d=!0),t===void 0&&(t=!1);var e=[],l=[],i=n.treeMinMax;if(i.minX=m,i.minY=S,i.maxX=m+x,i.maxY=S+h,t&&(l=n.staticTree.search(i)),d&&n.useTree)e=n.tree.search(i);else if(d)for(var s=Array.from(n.bodies),r={position:{x:m,y:S},left:m,top:S,right:m+x,bottom:S+h,isCircle:!1},o=n.intersects,a=0;a<s.length;a++){var u=s[a];o(u,r)&&e.push(u)}return l.concat(e)};E.exports=y},62121:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setPushable:function(n){return n===void 0&&(n=!0),this.body.pushable=n,this}};E.exports=y},29384:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setOffset:function(n,m){return this.body.setOffset(n,m),this},setSize:function(n,m,S){return this.body.setSize(n,m,S),this},setBodySize:function(n,m,S){return this.body.setSize(n,m,S),this},setCircle:function(n,m,S){return this.body.setCircle(n,m,S),this}};E.exports=y},15098:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setVelocity:function(n,m){return this.body.setVelocity(n,m),this},setVelocityX:function(n){return this.body.setVelocityX(n),this},setVelocityY:function(n){return this.body.setVelocityY(n),this},setMaxVelocity:function(n,m){return this.body.maxVelocity.set(n,m),this}};E.exports=y},92209:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Acceleration:n(1093),Angular:n(59023),Bounce:n(62069),Collision:n(78389),Debug:n(87118),Drag:n(52819),Enable:n(4074),Friction:n(40831),Gravity:n(26775),Immovable:n(9437),Mass:n(30621),OverlapCirc:n(72441),OverlapRect:n(47956),Pushable:n(62121),Size:n(29384),Velocity:n(15098)}},37747:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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};E.exports=y},20009:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="collide"},36768:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="overlap"},60473:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pause"},89954:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resume"},61804:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="tilecollide"},7161:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="tileoverlap"},34689:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="worldbounds"},16006:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="worldstep"},63012:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={COLLIDE:n(20009),OVERLAP:n(36768),PAUSE:n(60473),RESUME:n(89954),TILE_COLLIDE:n(61804),TILE_OVERLAP:n(7161),WORLD_BOUNDS:n(34689),WORLD_STEP:n(16006)}},27064:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37747),S=n(79291),x={ArcadePhysics:n(86689),Body:n(37742),Collider:n(79342),Components:n(92209),Events:n(63012),Factory:n(66022),GetCollidesWith:n(79599),GetOverlapX:n(64897),GetOverlapY:n(45170),SeparateX:n(14087),SeparateY:n(89936),Group:n(60758),Image:n(71289),Sprite:n(13759),StaticBody:n(72624),StaticGroup:n(71464),Tilemap:n(55173),World:n(82248)};x=S(!1,x,m),E.exports=x},96602:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.collisionCallback?!n.collisionCallback.call(n.collisionCallbackContext,m,n):n.layer.callbacks[n.index]?!n.layer.callbacks[n.index].callback.call(n.layer.callbacks[n.index].callbackContext,m,n):!0};E.exports=y},36294:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m<0?(n.blocked.none=!1,n.blocked.left=!0):m>0&&(n.blocked.none=!1,n.blocked.right=!0),n.position.x-=m,n.updateCenter(),n.bounce.x===0?n.velocity.x=0:n.velocity.x=-n.velocity.x*n.bounce.x};E.exports=y},67013:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m<0?(n.blocked.none=!1,n.blocked.up=!0):m>0&&(n.blocked.none=!1,n.blocked.down=!0),n.position.y-=m,n.updateCenter(),n.bounce.y===0?n.velocity.y=0:n.velocity.y=-n.velocity.y*n.bounce.y};E.exports=y},40012:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(21329),S=n(53442),x=n(2483),h=function(d,t,e,l,i,s,r){var o=l.left,a=l.top,u=l.right,f=l.bottom,v=e.faceLeft||e.faceRight,c=e.faceTop||e.faceBottom;if(r||(v=!0,c=!0),!v&&!c)return!1;var g=0,p=0,T=0,C=1;if(t.deltaAbsX()>t.deltaAbsY()?T=-1:t.deltaAbsX()<t.deltaAbsY()&&(C=-1),t.deltaX()!==0&&t.deltaY()!==0&&v&&c&&(T=Math.min(Math.abs(t.position.x-u),Math.abs(t.right-o)),C=Math.min(Math.abs(t.position.y-f),Math.abs(t.bottom-a))),T<C){if(v&&(g=m(t,e,o,u,s,r),g!==0&&!x(l,t)))return!0;c&&(p=S(t,e,a,f,s,r))}else{if(c&&(p=S(t,e,a,f,s,r),p!==0&&!x(l,t)))return!0;v&&(g=m(t,e,o,u,s,r))}return g!==0||p!==0};E.exports=h},21329:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(36294),S=function(x,h,d,t,e,l){var i=0,s=h.faceLeft,r=h.faceRight,o=h.collideLeft,a=h.collideRight;return l||(s=!0,r=!0,o=!0,a=!0),x.deltaX()<0&&a&&x.checkCollision.left?r&&x.x<t&&(i=x.x-t,i<-e&&(i=0)):x.deltaX()>0&&o&&x.checkCollision.right&&s&&x.right>d&&(i=x.right-d,i>e&&(i=0)),i!==0&&(x.customSeparateX?x.overlapX=i:m(x,i)),i};E.exports=S},53442:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(67013),S=function(x,h,d,t,e,l){var i=0,s=h.faceTop,r=h.faceBottom,o=h.collideUp,a=h.collideDown;return l||(s=!0,r=!0,o=!0,a=!0),x.deltaY()<0&&a&&x.checkCollision.up?r&&x.y<t&&(i=x.y-t,i<-e&&(i=0)):x.deltaY()>0&&o&&x.checkCollision.down&&s&&x.bottom>d&&(i=x.bottom-d,i>e&&(i=0)),i!==0&&(x.customSeparateY?x.overlapY=i:m(x,i)),i};E.exports=S},2483:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return!(m.right<=n.left||m.bottom<=n.top||m.position.x>=n.right||m.position.y>=n.bottom)};E.exports=y},55173:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={ProcessTileCallbacks:n(96602),ProcessTileSeparationX:n(36294),ProcessTileSeparationY:n(67013),SeparateTile:n(40012),TileCheckX:n(21329),TileCheckY:n(53442),TileIntersectsBody:n(2483)};E.exports=m},44563:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Arcade:n(27064),Matter:n(3875)}},68174:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(26099),x=new m({initialize:function(){this.boundsCenter=new S,this.centerDiff=new S},parseBody:function(h){if(h=h.hasOwnProperty("body")?h.body:h,!h.hasOwnProperty("bounds")||!h.hasOwnProperty("centerOfMass"))return!1;var d=this.boundsCenter,t=this.centerDiff,e=h.bounds.max.x-h.bounds.min.x,l=h.bounds.max.y-h.bounds.min.y,i=e*h.centerOfMass.x,s=l*h.centerOfMass.y;return d.set(e/2,l/2),t.set(i-d.x,s-d.y),!0},getTopLeft:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.boundsCenter,l=this.centerDiff;return new S(d+e.x+l.x,t+e.y+l.y)}return!1},getTopCenter:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.boundsCenter,l=this.centerDiff;return new S(d+l.x,t+e.y+l.y)}return!1},getTopRight:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.boundsCenter,l=this.centerDiff;return new S(d-(e.x-l.x),t+e.y+l.y)}return!1},getLeftCenter:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.boundsCenter,l=this.centerDiff;return new S(d+e.x+l.x,t+l.y)}return!1},getCenter:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.centerDiff;return new S(d+e.x,t+e.y)}return!1},getRightCenter:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.boundsCenter,l=this.centerDiff;return new S(d-(e.x-l.x),t+l.y)}return!1},getBottomLeft:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.boundsCenter,l=this.centerDiff;return new S(d+e.x+l.x,t-(e.y-l.y))}return!1},getBottomCenter:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.boundsCenter,l=this.centerDiff;return new S(d+l.x,t-(e.y-l.y))}return!1},getBottomRight:function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),this.parseBody(h)){var e=this.boundsCenter,l=this.centerDiff;return new S(d-(e.x-l.x),t-(e.y-l.y))}return!1}});E.exports=x},19933:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(6790);m.Body=n(22562),m.Composite=n(69351),m.World=n(4372),m.Collision=n(52284),m.Detector=n(81388),m.Pairs=n(99561),m.Pair=n(4506),m.Query=n(73296),m.Resolver=n(66272),m.Constraint=n(48140),m.Common=n(53402),m.Engine=n(48413),m.Events=n(35810),m.Sleeping=n(53614),m.Plugin=n(73832),m.Bodies=n(66280),m.Composites=n(74116),m.Axes=n(66615),m.Bounds=n(15647),m.Svg=n(74058),m.Vector=n(31725),m.Vertices=n(41598),m.World.add=m.Composite.add,m.World.remove=m.Composite.remove,m.World.addComposite=m.Composite.addComposite,m.World.addBody=m.Composite.addBody,m.World.addConstraint=m.Composite.addConstraint,m.World.clear=m.Composite.clear,E.exports=m},28137:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66280),S=n(83419),x=n(74116),h=n(48140),d=n(74058),t=n(75803),e=n(23181),l=n(34803),i=n(73834),s=n(19496),r=n(85791),o=n(98713),a=n(41598),u=new S({initialize:function(v){this.world=v,this.scene=v.scene,this.sys=v.scene.sys},rectangle:function(f,v,c,g,p){var T=m.rectangle(f,v,c,g,p);return this.world.add(T),T},trapezoid:function(f,v,c,g,p,T){var C=m.trapezoid(f,v,c,g,p,T);return this.world.add(C),C},circle:function(f,v,c,g,p){var T=m.circle(f,v,c,g,p);return this.world.add(T),T},polygon:function(f,v,c,g,p){var T=m.polygon(f,v,c,g,p);return this.world.add(T),T},fromVertices:function(f,v,c,g,p,T,C){typeof c=="string"&&(c=a.fromPath(c));var M=m.fromVertices(f,v,c,g,p,T,C);return this.world.add(M),M},fromPhysicsEditor:function(f,v,c,g,p){p===void 0&&(p=!0);var T=s.parseBody(f,v,c,g);return p&&!this.world.has(T)&&this.world.add(T),T},fromSVG:function(f,v,c,g,p,T){g===void 0&&(g=1),p===void 0&&(p={}),T===void 0&&(T=!0);for(var C=c.getElementsByTagName("path"),M=[],A=0;A<C.length;A++){var R=d.pathToVertices(C[A],30);g!==1&&a.scale(R,g,g),M.push(R)}var P=m.fromVertices(f,v,M,p);return T&&this.world.add(P),P},fromJSON:function(f,v,c,g,p){g===void 0&&(g={}),p===void 0&&(p=!0);var T=r.parseBody(f,v,c,g);return T&&p&&this.world.add(T),T},imageStack:function(f,v,c,g,p,T,C,M,A){C===void 0&&(C=0),M===void 0&&(M=0),A===void 0&&(A={});var R=this.world,P=this.sys.displayList;A.addToWorld=!1;var L=x.stack(c,g,p,T,C,M,function(F,w){var O=new e(R,F,w,f,v,A);return P.add(O),O.body});return R.add(L),L},stack:function(f,v,c,g,p,T,C){var M=x.stack(f,v,c,g,p,T,C);return this.world.add(M),M},pyramid:function(f,v,c,g,p,T,C){var M=x.pyramid(f,v,c,g,p,T,C);return this.world.add(M),M},chain:function(f,v,c,g,p,T){return x.chain(f,v,c,g,p,T)},mesh:function(f,v,c,g,p){return x.mesh(f,v,c,g,p)},newtonsCradle:function(f,v,c,g,p){var T=x.newtonsCradle(f,v,c,g,p);return this.world.add(T),T},car:function(f,v,c,g,p){var T=x.car(f,v,c,g,p);return this.world.add(T),T},softBody:function(f,v,c,g,p,T,C,M,A,R){var P=x.softBody(f,v,c,g,p,T,C,M,A,R);return this.world.add(P),P},joint:function(f,v,c,g,p){return this.constraint(f,v,c,g,p)},spring:function(f,v,c,g,p){return this.constraint(f,v,c,g,p)},constraint:function(f,v,c,g,p){g===void 0&&(g=1),p===void 0&&(p={}),p.bodyA=f.type==="body"?f:f.body,p.bodyB=v.type==="body"?v:v.body,isNaN(c)||(p.length=c),p.stiffness=g;var T=h.create(p);return this.world.add(T),T},worldConstraint:function(f,v,c,g){c===void 0&&(c=1),g===void 0&&(g={}),g.bodyB=f.type==="body"?f:f.body,isNaN(v)||(g.length=v),g.stiffness=c;var p=h.create(g);return this.world.add(p),p},mouseSpring:function(f){return this.pointerConstraint(f)},pointerConstraint:function(f){f===void 0&&(f={}),f.hasOwnProperty("render")||(f.render={visible:!1});var v=new o(this.scene,this.world,f);return this.world.add(v.constraint),v},image:function(f,v,c,g,p){var T=new e(this.world,f,v,c,g,p);return this.sys.displayList.add(T),T},tileBody:function(f,v){return new i(this.world,f,v)},sprite:function(f,v,c,g,p){var T=new l(this.world,f,v,c,g,p);return this.sys.displayList.add(T),this.sys.updateList.add(T),T},gameObject:function(f,v,c){return t(this.world,f,v,c)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});E.exports=u},75803:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(9503),S=n(95540),x=n(26099);function h(t){return!!t.get&&typeof t.get=="function"||!!t.set&&typeof t.set=="function"}var d=function(t,e,l,i){l===void 0&&(l={}),i===void 0&&(i=!0);var s=e.x,r=e.y;e.body={temp:!0,position:{x:s,y:r}};var o=[m.Bounce,m.Collision,m.Force,m.Friction,m.Gravity,m.Mass,m.Sensor,m.SetBody,m.Sleep,m.Static,m.Transform,m.Velocity];if(o.forEach(function(u){for(var f in u)h(u[f])?Object.defineProperty(e,f,{get:u[f].get,set:u[f].set}):Object.defineProperty(e,f,{value:u[f]})}),e.world=t,e._tempVec2=new x(s,r),l.hasOwnProperty("type")&&l.type==="body")e.setExistingBody(l,i);else{var a=S(l,"shape",null);a||(a="rectangle"),l.addToWorld=i,e.setBody(a,l)}return e};E.exports=d},23181:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(9503),x=n(95643),h=n(95540),d=n(88571),t=n(26099),e=new m({Extends:d,Mixins:[S.Bounce,S.Collision,S.Force,S.Friction,S.Gravity,S.Mass,S.Sensor,S.SetBody,S.Sleep,S.Static,S.Transform,S.Velocity],initialize:function(i,s,r,o,a,u){x.call(this,i.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(o,a),this.setSizeToFrame(),this.setOrigin(),this.initRenderNodes(this._defaultRenderNodesMap),this.world=i,this._tempVec2=new t(s,r);var f=h(u,"shape",null);f?this.setBody(f,u):this.setRectangle(this.width,this.height,u),this.setPosition(s,r)}});E.exports=e},42045:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(60461),S=n(66615),x=n(66280),h=n(22562),d=n(68174),t=n(15647),e=n(83419),l=n(52284),i=n(53402),s=n(69351),r=n(74116),o=n(48140),a=n(81388),u=n(20339),f=n(28137),v=n(95540),c=n(35154),g=n(46975),p=n(4506),T=n(99561),C=n(37277),M=n(73296),A=n(66272),R=n(44594),P=n(74058),L=n(31725),F=n(41598),w=n(68243);i.setDecomp(n(55973));var O=new e({initialize:function(I){this.scene=I,this.systems=I.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=h,this.composite=s,this.collision=l,this.detector=a,this.pair=p,this.pairs=T,this.query=M,this.resolver=A,this.constraint=o,this.bodies=x,this.composites=r,this.axes=S,this.bounds=t,this.svg=P,this.vector=L,this.vertices=F,this.verts=F,this._tempVec2=L.create(),A._restingThresh=c(this.config,"restingThresh",4),A._restingThreshTangent=c(this.config,"restingThreshTangent",6),A._positionDampen=c(this.config,"positionDampen",.9),A._positionWarming=c(this.config,"positionWarming",.8),A._frictionNormalMultiplier=c(this.config,"frictionNormalMultiplier",5),I.sys.events.once(R.BOOT,this.boot,this),I.sys.events.on(R.START,this.start,this)},boot:function(){this.world=new w(this.scene,this.config),this.add=new f(this.world),this.bodyBounds=new d,this.systems.events.once(R.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new w(this.scene,this.config),this.add=new f(this.world));var B=this.systems.events;B.on(R.UPDATE,this.world.update,this.world),B.on(R.POST_UPDATE,this.world.postUpdate,this.world),B.once(R.SHUTDOWN,this.shutdown,this)},getConfig:function(){var B=this.systems.game.config.physics,I=this.systems.settings.physics,D=g(v(I,"matter",{}),v(B,"matter",{}));return D},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(B,I){this.world.step(B,I)},containsPoint:function(B,I,D){B=this.getMatterBodies(B);var N=L.create(I,D),z=M.point(B,N);return z.length>0},intersectPoint:function(B,I,D){D=this.getMatterBodies(D);var N=L.create(B,I),z=[],V=M.point(D,N);return V.forEach(function(U){z.indexOf(U)===-1&&z.push(U)}),z},intersectRect:function(B,I,D,N,z,V){z===void 0&&(z=!1),V=this.getMatterBodies(V);var U={min:{x:B,y:I},max:{x:B+D,y:I+N}},G=[],b=M.region(V,U,z);return b.forEach(function(Y){G.indexOf(Y)===-1&&G.push(Y)}),G},intersectRay:function(B,I,D,N,z,V){z===void 0&&(z=1),V=this.getMatterBodies(V);for(var U=[],G=M.ray(V,L.create(B,I),L.create(D,N),z),b=0;b<G.length;b++)U.push(G[b].body);return U},intersectBody:function(B,I){I=this.getMatterBodies(I);for(var D=[],N=M.collides(B,I),z=0;z<N.length;z++){var V=N[z];V.bodyA===B?D.push(V.bodyB):D.push(V.bodyA)}return D},overlap:function(B,I,D,N,z){D===void 0&&(D=null),N===void 0&&(N=null),z===void 0&&(z=D),Array.isArray(B)||(B=[B]),B=this.getMatterBodies(B),I=this.getMatterBodies(I);for(var V=!1,U=0;U<B.length;U++)for(var G=B[U],b=M.collides(G,I),Y=0;Y<b.length;Y++){var W=b[Y],H=W.bodyA.id===G.id?W.bodyB:W.bodyA;if(!N||N.call(z,G,H,W)){if(V=!0,D)D.call(z,G,H,W);else if(!N)return!0}}return V},setCollisionCategory:function(B,I){return B=this.getMatterBodies(B),B.forEach(function(D){D.collisionFilter.category=I}),this},setCollisionGroup:function(B,I){return B=this.getMatterBodies(B),B.forEach(function(D){D.collisionFilter.group=I}),this},setCollidesWith:function(B,I){B=this.getMatterBodies(B);var D=0;if(!Array.isArray(I))D=I;else for(var N=0;N<I.length;N++)D|=I[N];return B.forEach(function(z){z.collisionFilter.mask=D}),this},getMatterBodies:function(B){if(!B)return this.world.getAllBodies();Array.isArray(B)||(B=[B]);for(var I=[],D=0;D<B.length;D++){var N=B[D].hasOwnProperty("body")?B[D].body:B[D];I.push(N)}return I},setVelocity:function(B,I,D){B=this.getMatterBodies(B);var N=this._tempVec2;return N.x=I,N.y=D,B.forEach(function(z){h.setVelocity(z,N)}),this},setVelocityX:function(B,I){B=this.getMatterBodies(B);var D=this._tempVec2;return D.x=I,B.forEach(function(N){D.y=N.velocity.y,h.setVelocity(N,D)}),this},setVelocityY:function(B,I){B=this.getMatterBodies(B);var D=this._tempVec2;return D.y=I,B.forEach(function(N){D.x=N.velocity.x,h.setVelocity(N,D)}),this},setAngularVelocity:function(B,I){return B=this.getMatterBodies(B),B.forEach(function(D){h.setAngularVelocity(D,I)}),this},applyForce:function(B,I){B=this.getMatterBodies(B);var D=this._tempVec2;return B.forEach(function(N){D.x=N.position.x,D.y=N.position.y,h.applyForce(N,D,I)}),this},applyForceFromPosition:function(B,I,D,N){B=this.getMatterBodies(B);var z=this._tempVec2;return B.forEach(function(V){N===void 0&&(N=V.angle),z.x=D*Math.cos(N),z.y=D*Math.sin(N),h.applyForce(V,I,z)}),this},applyForceFromAngle:function(B,I,D){B=this.getMatterBodies(B);var N=this._tempVec2;return B.forEach(function(z){D===void 0&&(D=z.angle),N.x=I*Math.cos(D),N.y=I*Math.sin(D),h.applyForce(z,{x:z.position.x,y:z.position.y},N)}),this},getConstraintLength:function(B){var I=B.pointA.x,D=B.pointA.y,N=B.pointB.x,z=B.pointB.y;return B.bodyA&&(I+=B.bodyA.position.x,D+=B.bodyA.position.y),B.bodyB&&(N+=B.bodyB.position.x,z+=B.bodyB.position.y),u(I,D,N,z)},alignBody:function(B,I,D,N){B=B.hasOwnProperty("body")?B.body:B;var z;switch(N){case m.TOP_LEFT:case m.LEFT_TOP:z=this.bodyBounds.getTopLeft(B,I,D);break;case m.TOP_CENTER:z=this.bodyBounds.getTopCenter(B,I,D);break;case m.TOP_RIGHT:case m.RIGHT_TOP:z=this.bodyBounds.getTopRight(B,I,D);break;case m.LEFT_CENTER:z=this.bodyBounds.getLeftCenter(B,I,D);break;case m.CENTER:z=this.bodyBounds.getCenter(B,I,D);break;case m.RIGHT_CENTER:z=this.bodyBounds.getRightCenter(B,I,D);break;case m.LEFT_BOTTOM:case m.BOTTOM_LEFT:z=this.bodyBounds.getBottomLeft(B,I,D);break;case m.BOTTOM_CENTER:z=this.bodyBounds.getBottomCenter(B,I,D);break;case m.BOTTOM_RIGHT:case m.RIGHT_BOTTOM:z=this.bodyBounds.getBottomRight(B,I,D);break}return z&&h.setPosition(B,z),this},shutdown:function(){var B=this.systems.events;this.world&&(B.off(R.UPDATE,this.world.update,this.world),B.off(R.POST_UPDATE,this.world.postUpdate,this.world)),B.off(R.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(R.START,this.start,this),this.scene=null,this.systems=null}});C.register("MatterPhysics",O,"matterPhysics"),E.exports=O},34803:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(9674),S=n(83419),x=n(9503),h=n(95643),d=n(95540),t=n(68287),e=n(26099),l=new S({Extends:t,Mixins:[x.Bounce,x.Collision,x.Force,x.Friction,x.Gravity,x.Mass,x.Sensor,x.SetBody,x.Sleep,x.Static,x.Transform,x.Velocity],initialize:function(s,r,o,a,u,f){h.call(this,s.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new m(this),this.setTexture(a,u),this.setSizeToFrame(),this.setOrigin(),this.initRenderNodes(this._defaultRenderNodesMap),this.world=s,this._tempVec2=new e(r,o);var v=d(f,"shape",null);v?this.setBody(v,f):this.setRectangle(this.width,this.height,f),this.setPosition(r,o)}});E.exports=l},73834:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66280),S=n(22562),x=n(83419),h=n(9503),d=n(62644),t=n(50792),e=n(95540),l=n(97022),i=n(41598),s=new x({Extends:t,Mixins:[h.Bounce,h.Collision,h.Friction,h.Gravity,h.Mass,h.Sensor,h.Sleep,h.Static],initialize:function(o,a,u){t.call(this),this.tile=a,this.world=o,a.physics.matterBody&&a.physics.matterBody.destroy(),a.physics.matterBody=this;var f=e(u,"body",null),v=e(u,"addToWorld",!0);if(f)this.setBody(f,v);else{var c=a.getCollisionGroup(),g=e(c,"objects",[]);g.length>0?this.setFromTileCollision(u):this.setFromTileRectangle(u)}if(a.flipX||a.flipY){var p={x:a.getCenterX(),y:a.getCenterY()},T=a.flipX?-1:1,C=a.flipY?-1:1;S.scale(f,T,C,p)}},setFromTileRectangle:function(r){r===void 0&&(r={}),l(r,"isStatic")||(r.isStatic=!0),l(r,"addToWorld")||(r.addToWorld=!0);var o=this.tile.getBounds(),a=o.x+o.width/2,u=o.y+o.height/2,f=m.rectangle(a,u,o.width,o.height,r);return this.setBody(f,r.addToWorld),this},setFromTileCollision:function(r){r===void 0&&(r={}),l(r,"isStatic")||(r.isStatic=!0),l(r,"addToWorld")||(r.addToWorld=!0);for(var o=this.tile.tilemapLayer.scaleX,a=this.tile.tilemapLayer.scaleY,u=this.tile.getLeft(),f=this.tile.getTop(),v=this.tile.getCollisionGroup(),c=e(v,"objects",[]),g=[],p=0;p<c.length;p++){var T=c[p],C=u+T.x*o,M=f+T.y*a,A=T.width*o,R=T.height*a,P=null;if(T.rectangle)P=m.rectangle(C+A/2,M+R/2,A,R,r);else if(T.ellipse)P=m.circle(C+A/2,M+R/2,A/2,r);else if(T.polygon||T.polyline){var L=T.polygon?T.polygon:T.polyline,F=L.map(function(I){return{x:I.x*o,y:I.y*a}}),w=i.create(F),O=i.centre(w);C+=O.x,M+=O.y,P=m.fromVertices(C,M,w,r)}P&&g.push(P)}if(g.length===1)this.setBody(g[0],r.addToWorld);else if(g.length>1){var B=d(r);B.parts=g,this.setBody(S.create(B),B.addToWorld)}return this},setBody:function(r,o){return o===void 0&&(o=!0),this.body&&this.removeBody(),this.body=r,this.body.gameObject=this,o&&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()}});E.exports=s},19496:(E,y,n)=>{/**
|
||
* @author Joachim Grill <joachim@codeandweb.com>
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2018 CodeAndWeb GmbH
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66280),S=n(22562),x=n(53402),h=n(95540),d=n(41598),t={parseBody:function(e,l,i,s){s===void 0&&(s={});for(var r=h(i,"fixtures",[]),o=[],a=0;a<r.length;a++)for(var u=this.parseFixture(r[a]),f=0;f<u.length;f++)o.push(u[f]);var v=x.clone(i,!0);x.extend(v,s,!0),delete v.fixtures,delete v.type;var c=S.create(v);return S.setParts(c,o),S.setPosition(c,{x:e,y:l}),c},parseFixture:function(e){var l=x.extend({},!1,e);delete l.circle,delete l.vertices;var i;if(e.circle){var s=h(e.circle,"x"),r=h(e.circle,"y"),o=h(e.circle,"radius");i=[m.circle(s,r,o,l)]}else e.vertices&&(i=this.parseVertices(e.vertices,l));return i},parseVertices:function(e,l){l===void 0&&(l={});for(var i=[],s=0;s<e.length;s++)d.clockwiseSort(e[s]),i.push(S.create(x.extend({position:d.centre(e[s]),vertices:e[s]},l)));return m.flagCoincidentParts(i)}};E.exports=t},85791:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66280),S=n(22562),x={parseBody:function(h,d,t,e){e===void 0&&(e={});var l,i=t.vertices;if(i.length===1)e.vertices=i[0],l=S.create(e),m.flagCoincidentParts(l.parts);else{for(var s=[],r=0;r<i.length;r++){var o=S.create({vertices:i[r]});s.push(o)}m.flagCoincidentParts(s),e.parts=s,l=S.create(e)}return l.label=t.label,S.setPosition(l,{x:h,y:d}),l}};E.exports=x},98713:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(15647),S=n(83419),x=n(69351),h=n(48140),d=n(81388),t=n(1121),e=n(8214),l=n(46975),i=n(53614),s=n(26099),r=n(41598),o=new S({initialize:function(u,f,v){v===void 0&&(v={});var c={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=u,this.world=f,this.camera=null,this.pointer=null,this.active=!0,this.position=new s,this.body=null,this.part=null,this.constraint=h.create(l(v,c)),this.world.on(t.BEFORE_UPDATE,this.update,this),u.sys.input.on(e.POINTER_DOWN,this.onDown,this),u.sys.input.on(e.POINTER_UP,this.onUp,this)},onDown:function(a){this.pointer||(this.pointer=a,this.camera=a.camera)},onUp:function(a){a===this.pointer&&(this.pointer=null)},getBody:function(a){var u=this.position,f=this.constraint;this.camera.getWorldPoint(a.x,a.y,u);for(var v=x.allBodies(this.world.localWorld),c=0;c<v.length;c++){var g=v[c];if(!g.ignorePointer&&m.contains(g.bounds,u)&&d.canCollide(g.collisionFilter,f.collisionFilter)&&this.hitTestBody(g,u))return this.world.emit(t.DRAG_START,g,this.part,this),!0}return!1},hitTestBody:function(a,u){for(var f=this.constraint,v=a.parts.length,c=v>1?1:0,g=c;g<v;g++){var p=a.parts[g];if(r.contains(p.vertices,u))return f.pointA=u,f.pointB={x:u.x-a.position.x,y:u.y-a.position.y},f.bodyB=a,f.angleB=a.angle,i.set(a,!1),this.part=p,this.body=a,!0}return!1},update:function(){var a=this.pointer,u=this.body;if(!this.active||!a){u&&this.stopDrag();return}if(!a.isDown&&u){this.stopDrag();return}else if(a.isDown){if(!this.camera||!u&&!this.getBody(a))return;u=this.body;var f=this.position,v=this.constraint;this.camera.getWorldPoint(a.x,a.y,f),v.pointA.x=f.x,v.pointA.y=f.y,i.set(u,!1),this.world.emit(t.DRAG,u,this)}},stopDrag:function(){var a=this.body,u=this.constraint;u.bodyB=null,u.pointB=null,this.pointer=null,this.body=null,this.part=null,a&&this.world.emit(t.DRAG_END,a,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(t.BEFORE_UPDATE,this.update),this.scene.sys.input.off(e.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(e.POINTER_UP,this.onUp,this)}});E.exports=o},68243:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66280),S=n(22562),x=n(83419),h=n(53402),d=n(69351),t=n(48413),e=n(50792),l=n(1121),i=n(95540),s=n(35154),r=n(22562),o=n(35810),a=n(73834),u=n(4372),f=n(13037),v=n(31725),c=new x({Extends:e,initialize:function(p,T){e.call(this),this.scene=p,this.engine=t.create(T),this.localWorld=this.engine.world;var C=s(T,"gravity",null);C?this.setGravity(C.x,C.y,C.scale):C===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=s(T,"enabled",!0),this.getDelta=s(T,"getDelta",this.update60Hz);var M=i(T,"runner",{}),A=i(M,"fps",!1);A&&(M.delta=1e3/i(M,"fps",60)),this.runner=f.create(M),this.autoUpdate=s(T,"autoUpdate",!0);var R=s(T,"debug",!1);if(this.drawDebug=typeof R=="object"?!0:R,this.debugGraphic,this.debugConfig={showAxes:i(R,"showAxes",!1),showAngleIndicator:i(R,"showAngleIndicator",!1),angleColor:i(R,"angleColor",15208787),showBroadphase:i(R,"showBroadphase",!1),broadphaseColor:i(R,"broadphaseColor",16757760),showBounds:i(R,"showBounds",!1),boundsColor:i(R,"boundsColor",16777215),showVelocity:i(R,"showVelocity",!1),velocityColor:i(R,"velocityColor",44783),showCollisions:i(R,"showCollisions",!1),collisionColor:i(R,"collisionColor",16094476),showSeparations:i(R,"showSeparations",!1),separationColor:i(R,"separationColor",16753920),showBody:i(R,"showBody",!0),showStaticBody:i(R,"showStaticBody",!0),showInternalEdges:i(R,"showInternalEdges",!1),renderFill:i(R,"renderFill",!1),renderLine:i(R,"renderLine",!0),fillColor:i(R,"fillColor",1075465),fillOpacity:i(R,"fillOpacity",1),lineColor:i(R,"lineColor",2678297),lineOpacity:i(R,"lineOpacity",1),lineThickness:i(R,"lineThickness",1),staticFillColor:i(R,"staticFillColor",857979),staticLineColor:i(R,"staticLineColor",1255396),showSleeping:i(R,"showSleeping",!1),staticBodySleepOpacity:i(R,"staticBodySleepOpacity",.7),sleepFillColor:i(R,"sleepFillColor",4605510),sleepLineColor:i(R,"sleepLineColor",10066585),showSensors:i(R,"showSensors",!0),sensorFillColor:i(R,"sensorFillColor",857979),sensorLineColor:i(R,"sensorLineColor",1255396),showPositions:i(R,"showPositions",!0),positionSize:i(R,"positionSize",4),positionColor:i(R,"positionColor",14697178),showJoint:i(R,"showJoint",!0),jointColor:i(R,"jointColor",14737474),jointLineOpacity:i(R,"jointLineOpacity",1),jointLineThickness:i(R,"jointLineThickness",2),pinSize:i(R,"pinSize",4),pinColor:i(R,"pinColor",4382944),springColor:i(R,"springColor",14697184),anchorColor:i(R,"anchorColor",15724527),anchorSize:i(R,"anchorSize",4),showConvexHulls:i(R,"showConvexHulls",!1),hullColor:i(R,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(T,"setBounds",!1)){var P=T.setBounds;if(typeof P=="boolean")this.setBounds();else{var L=i(P,"x",0),F=i(P,"y",0),w=i(P,"width",p.sys.scale.width),O=i(P,"height",p.sys.scale.height),B=i(P,"thickness",64),I=i(P,"left",!0),D=i(P,"right",!0),N=i(P,"top",!0),z=i(P,"bottom",!0);this.setBounds(L,F,w,O,B,I,D,N,z)}}},setCompositeRenderStyle:function(g){var p=g.bodies,T=g.constraints,C=g.composites,M,A,R;for(M=0;M<p.length;M++)A=p[M],R=A.render,this.setBodyRenderStyle(A,R.lineColor,R.lineOpacity,R.lineThickness,R.fillColor,R.fillOpacity);for(M=0;M<T.length;M++)A=T[M],R=A.render,this.setConstraintRenderStyle(A,R.lineColor,R.lineOpacity,R.lineThickness,R.pinSize,R.anchorColor,R.anchorSize);for(M=0;M<C.length;M++)A=C[M],this.setCompositeRenderStyle(A);return this},setBodyRenderStyle:function(g,p,T,C,M,A){var R=g.render,P=this.debugConfig;return R?(p==null&&(p=g.isStatic?P.staticLineColor:P.lineColor),T==null&&(T=P.lineOpacity),C==null&&(C=P.lineThickness),M==null&&(M=g.isStatic?P.staticFillColor:P.fillColor),A==null&&(A=P.fillOpacity),p!==!1&&(R.lineColor=p),T!==!1&&(R.lineOpacity=T),C!==!1&&(R.lineThickness=C),M!==!1&&(R.fillColor=M),A!==!1&&(R.fillOpacity=A),this):this},setConstraintRenderStyle:function(g,p,T,C,M,A,R){var P=g.render,L=this.debugConfig;if(!P)return this;if(p==null){var F=P.type;F==="line"?p=L.jointColor:F==="pin"?p=L.pinColor:F==="spring"&&(p=L.springColor)}return T==null&&(T=L.jointLineOpacity),C==null&&(C=L.jointLineThickness),M==null&&(M=L.pinSize),A==null&&(A=L.anchorColor),R==null&&(R=L.anchorSize),p!==!1&&(P.lineColor=p),T!==!1&&(P.lineOpacity=T),C!==!1&&(P.lineThickness=C),M!==!1&&(P.pinSize=M),A!==!1&&(P.anchorColor=A),R!==!1&&(P.anchorSize=R),this},setEventsProxy:function(){var g=this,p=this.engine,T=this.localWorld;this.drawDebug&&(o.on(T,"compositeModified",function(C){g.setCompositeRenderStyle(C)}),o.on(T,"beforeAdd",function(C){for(var M=[].concat(C.object),A=0;A<M.length;A++){var R=M[A],P=R.render;R.type==="body"?g.setBodyRenderStyle(R,P.lineColor,P.lineOpacity,P.lineThickness,P.fillColor,P.fillOpacity):R.type==="composite"?g.setCompositeRenderStyle(R):R.type==="constraint"&&g.setConstraintRenderStyle(R,P.lineColor,P.lineOpacity,P.lineThickness,P.pinSize,P.anchorColor,P.anchorSize)}})),o.on(T,"beforeAdd",function(C){g.emit(l.BEFORE_ADD,C)}),o.on(T,"afterAdd",function(C){g.emit(l.AFTER_ADD,C)}),o.on(T,"beforeRemove",function(C){g.emit(l.BEFORE_REMOVE,C)}),o.on(T,"afterRemove",function(C){g.emit(l.AFTER_REMOVE,C)}),o.on(p,"beforeUpdate",function(C){g.emit(l.BEFORE_UPDATE,C)}),o.on(p,"afterUpdate",function(C){g.emit(l.AFTER_UPDATE,C)}),o.on(p,"collisionStart",function(C){var M=C.pairs,A,R;M.length>0&&M.map(function(P){A=P.bodyA,R=P.bodyB,A.gameObject&&A.gameObject.emit("collide",A,R,P),R.gameObject&&R.gameObject.emit("collide",R,A,P),o.trigger(A,"onCollide",{pair:P}),o.trigger(R,"onCollide",{pair:P}),A.onCollideCallback&&A.onCollideCallback(P),R.onCollideCallback&&R.onCollideCallback(P),A.onCollideWith[R.id]&&A.onCollideWith[R.id](R,P),R.onCollideWith[A.id]&&R.onCollideWith[A.id](A,P)}),g.emit(l.COLLISION_START,C,A,R)}),o.on(p,"collisionActive",function(C){var M=C.pairs,A,R;M.length>0&&M.map(function(P){A=P.bodyA,R=P.bodyB,A.gameObject&&A.gameObject.emit("collideActive",A,R,P),R.gameObject&&R.gameObject.emit("collideActive",R,A,P),o.trigger(A,"onCollideActive",{pair:P}),o.trigger(R,"onCollideActive",{pair:P}),A.onCollideActiveCallback&&A.onCollideActiveCallback(P),R.onCollideActiveCallback&&R.onCollideActiveCallback(P)}),g.emit(l.COLLISION_ACTIVE,C,A,R)}),o.on(p,"collisionEnd",function(C){var M=C.pairs,A,R;M.length>0&&M.map(function(P){A=P.bodyA,R=P.bodyB,A.gameObject&&A.gameObject.emit("collideEnd",A,R,P),R.gameObject&&R.gameObject.emit("collideEnd",R,A,P),o.trigger(A,"onCollideEnd",{pair:P}),o.trigger(R,"onCollideEnd",{pair:P}),A.onCollideEndCallback&&A.onCollideEndCallback(P),R.onCollideEndCallback&&R.onCollideEndCallback(P)}),g.emit(l.COLLISION_END,C,A,R)})},setBounds:function(g,p,T,C,M,A,R,P,L){return g===void 0&&(g=0),p===void 0&&(p=0),T===void 0&&(T=this.scene.sys.scale.width),C===void 0&&(C=this.scene.sys.scale.height),M===void 0&&(M=64),A===void 0&&(A=!0),R===void 0&&(R=!0),P===void 0&&(P=!0),L===void 0&&(L=!0),this.updateWall(A,"left",g-M,p-M,M,C+M*2),this.updateWall(R,"right",g+T,p-M,M,C+M*2),this.updateWall(P,"top",g,p-M,T,M),this.updateWall(L,"bottom",g,p+C,T,M),this},updateWall:function(g,p,T,C,M,A){var R=this.walls[p];g?(R&&u.remove(this.localWorld,R),T+=M/2,C+=A/2,this.walls[p]=this.create(T,C,M,A,{isStatic:!0,friction:0,frictionStatic:0})):(R&&u.remove(this.localWorld,R),this.walls[p]=null)},createDebugGraphic:function(){var g=this.scene.sys.add.graphics({x:0,y:0});return g.setDepth(Number.MAX_VALUE),this.debugGraphic=g,this.drawDebug=!0,g},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(g,p,T){return g===void 0&&(g=0),p===void 0&&(p=1),T===void 0&&(T=.001),this.localWorld.gravity.x=g,this.localWorld.gravity.y=p,this.localWorld.gravity.scale=T,this},create:function(g,p,T,C,M){var A=m.rectangle(g,p,T,C,M);return u.add(this.localWorld,A),A},add:function(g){return u.add(this.localWorld,g),this},remove:function(g,p){Array.isArray(g)||(g=[g]);for(var T=0;T<g.length;T++){var C=g[T],M=C.body?C.body:C;d.remove(this.localWorld,M,p)}return this},removeConstraint:function(g,p){return d.remove(this.localWorld,g,p),this},convertTilemapLayer:function(g,p){var T=g.layer,C=g.getTilesWithin(0,0,T.width,T.height,{isColliding:!0});return this.convertTiles(C,p),this},convertTiles:function(g,p){if(g.length===0)return this;for(var T=0;T<g.length;T++)new a(this,g[T],p);return this},nextGroup:function(g){return r.nextGroup(g)},nextCategory:function(){return r.nextCategory()},pause:function(){return this.enabled=!1,this.emit(l.PAUSE),this},resume:function(){return this.enabled=!0,this.runner.timeLastTick=h.now(),this.emit(l.RESUME),this},update:function(g){if(!(!this.enabled||!this.autoUpdate)){var p=this.engine,T=this.runner,C=h.now(),M=T.delta,A=0,R=g-T.timeLastTick;if((!R||!T.timeLastTick||R>Math.max(f._maxFrameDelta,T.maxFrameTime))&&(R=T.frameDelta||f._frameDeltaFallback),T.frameDeltaSmoothing){T.frameDeltaHistory.push(R),T.frameDeltaHistory=T.frameDeltaHistory.slice(-T.frameDeltaHistorySize);var P=T.frameDeltaHistory.slice(0).sort(),L=T.frameDeltaHistory.slice(P.length*f._smoothingLowerBound,P.length*f._smoothingUpperBound),F=f._mean(L);R=F||R}T.frameDeltaSnapping&&(R=1e3/Math.round(1e3/R)),T.frameDelta=R,T.timeLastTick=g,T.timeBuffer+=T.frameDelta,T.timeBuffer=h.clamp(T.timeBuffer,0,T.frameDelta+M*f._timeBufferMargin),T.lastUpdatesDeferred=0;for(var w=T.maxUpdates||Math.ceil(T.maxFrameTime/M),O=h.now();M>0&&T.timeBuffer>=M*f._timeBufferMargin;){t.update(p,M),T.timeBuffer-=M,A+=1;var B=h.now()-C,I=h.now()-O,D=B+f._elapsedNextEstimate*I/A;if(A>=w||D>T.maxFrameTime){T.lastUpdatesDeferred=Math.round(Math.max(0,T.timeBuffer/M-f._timeBufferMargin));break}}}},step:function(g){t.update(this.engine,g)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(g){var p=g.hasOwnProperty("body")?g.body:g;return d.get(this.localWorld,p.id,p.type)!==null},getAllBodies:function(){return d.allBodies(this.localWorld)},getAllConstraints:function(){return d.allConstraints(this.localWorld)},getAllComposites:function(){return d.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var g=this.debugConfig,p=this.engine,T=this.debugGraphic,C=d.allBodies(this.localWorld);this.debugGraphic.clear(),g.showBroadphase&&p.broadphase.controller&&this.renderGrid(p.broadphase,T,g.broadphaseColor,.5),g.showBounds&&this.renderBodyBounds(C,T,g.boundsColor,.5),(g.showBody||g.showStaticBody)&&this.renderBodies(C),g.showJoint&&this.renderJoints(),(g.showAxes||g.showAngleIndicator)&&this.renderBodyAxes(C,T,g.showAxes,g.angleColor,.5),g.showVelocity&&this.renderBodyVelocity(C,T,g.velocityColor,1,2),g.showSeparations&&this.renderSeparations(p.pairs.list,T,g.separationColor),g.showCollisions&&this.renderCollisions(p.pairs.list,T,g.collisionColor)}},renderGrid:function(g,p,T,C){p.lineStyle(1,T,C);for(var M=h.keys(g.buckets),A=0;A<M.length;A++){var R=M[A];if(!(g.buckets[R].length<2)){var P=R.split(/C|R/);p.strokeRect(parseInt(P[1],10)*g.bucketWidth,parseInt(P[2],10)*g.bucketHeight,g.bucketWidth,g.bucketHeight)}}return this},renderSeparations:function(g,p,T){p.lineStyle(1,T,1);for(var C=0;C<g.length;C++){var M=g[C];if(M.isActive){var A=M.collision,R=A.bodyA,P=A.bodyB,L=R.position,F=P.position,w=A.penetration,O=!R.isStatic&&!P.isStatic?4:1;P.isStatic&&(O=0),p.lineBetween(F.x,F.y,F.x-w.x*O,F.y-w.y*O),O=!R.isStatic&&!P.isStatic?4:1,R.isStatic&&(O=0),p.lineBetween(L.x,L.y,L.x-w.x*O,L.y-w.y*O)}}return this},renderCollisions:function(g,p,T){p.lineStyle(1,T,.5),p.fillStyle(T,1);var C,M;for(C=0;C<g.length;C++)if(M=g[C],!!M.isActive)for(var A=0;A<M.contactCount;A++){var R=M.contacts[A],P=R.vertex;P&&p.fillRect(P.x-2,P.y-2,5,5)}for(C=0;C<g.length;C++)if(M=g[C],!!M.isActive){var L=M.collision,F=M.contacts;if(M.contactCount>0){var w=F[0].vertex.x,O=F[0].vertex.y;M.contactCount===2&&(w=(F[0].vertex.x+F[1].vertex.x)/2,O=(F[0].vertex.y+F[1].vertex.y)/2),L.bodyB===L.supports[0].body||L.bodyA.isStatic?p.lineBetween(w-L.normal.x*8,O-L.normal.y*8,w,O):p.lineBetween(w+L.normal.x*8,O+L.normal.y*8,w,O)}}return this},renderBodyBounds:function(g,p,T,C){p.lineStyle(1,T,C);for(var M=0;M<g.length;M++){var A=g[M];if(A.render.visible){var R=A.bounds;if(R)p.strokeRect(R.min.x,R.min.y,R.max.x-R.min.x,R.max.y-R.min.y);else for(var P=A.parts,L=P.length>1?1:0;L<P.length;L++){var F=P[L];p.strokeRect(F.bounds.min.x,F.bounds.min.y,F.bounds.max.x-F.bounds.min.x,F.bounds.max.y-F.bounds.min.y)}}}return this},renderBodyAxes:function(g,p,T,C,M){p.lineStyle(1,C,M);for(var A=0;A<g.length;A++){var R=g[A],P=R.parts;if(R.render.visible){var L,F,w;if(T)for(F=P.length>1?1:0;F<P.length;F++)for(L=P[F],w=0;w<L.axes.length;w++){var O=L.axes[w];p.lineBetween(L.position.x,L.position.y,L.position.x+O.x*20,L.position.y+O.y*20)}else for(F=P.length>1?1:0;F<P.length;F++)for(L=P[F],w=0;w<L.axes.length;w++)p.lineBetween(L.position.x,L.position.y,(L.vertices[0].x+L.vertices[L.vertices.length-1].x)/2,(L.vertices[0].y+L.vertices[L.vertices.length-1].y)/2)}}return this},renderBodyVelocity:function(g,p,T,C,M){p.lineStyle(M,T,C);for(var A=0;A<g.length;A++){var R=g[A];R.render.visible&&p.lineBetween(R.position.x,R.position.y,R.position.x+(R.position.x-R.positionPrev.x)*2,R.position.y+(R.position.y-R.positionPrev.y)*2)}return this},renderBodies:function(g){for(var p=this.debugGraphic,T=this.debugConfig,C=T.showBody,M=T.showStaticBody,A=T.showSleeping,R=T.showInternalEdges,P=T.showConvexHulls,L=T.renderFill,F=T.renderLine,w=T.staticBodySleepOpacity,O=T.sleepFillColor,B=T.sleepLineColor,I=T.hullColor,D=0;D<g.length;D++){var N=g[D];if(N.render.visible&&!(!M&&N.isStatic||!C&&!N.isStatic)){var z=N.render.lineColor,V=N.render.lineOpacity,U=N.render.lineThickness,G=N.render.fillColor,b=N.render.fillOpacity;A&&N.isSleeping&&(N.isStatic?(V*=w,b*=w):(z=B,G=O)),L||(G=null),F||(z=null),this.renderBody(N,p,R,z,V,U,G,b);var Y=N.parts.length;P&&Y>1&&this.renderConvexHull(N,p,I,U)}}},renderBody:function(g,p,T,C,M,A,R,P){C===void 0&&(C=null),M===void 0&&(M=null),A===void 0&&(A=1),R===void 0&&(R=null),P===void 0&&(P=null);for(var L=this.debugConfig,F=L.sensorFillColor,w=L.sensorLineColor,O=g.parts,B=O.length,I=B>1?1:0;I<B;I++){var D=O[I],N=D.render,z=N.opacity;if(!(!N.visible||z===0||D.isSensor&&!L.showSensors)){var V=D.circleRadius;if(p.beginPath(),D.isSensor?(R!==null&&p.fillStyle(F,P*z),C!==null&&p.lineStyle(A,w,M*z)):(R!==null&&p.fillStyle(R,P*z),C!==null&&p.lineStyle(A,C,M*z)),V)p.arc(D.position.x,D.position.y,V,0,2*Math.PI);else{var U=D.vertices,G=U.length;p.moveTo(U[0].x,U[0].y);for(var b=1;b<G;b++){var Y=U[b];if(!U[b-1].isInternal||T?p.lineTo(Y.x,Y.y):p.moveTo(Y.x,Y.y),b<G&&Y.isInternal&&!T){var W=(b+1)%G;p.moveTo(U[W].x,U[W].y)}}p.closePath()}R!==null&&p.fillPath(),C!==null&&p.strokePath()}}if(L.showPositions&&!g.isStatic){var H=g.position.x,X=g.position.y,K=Math.ceil(L.positionSize/2);p.fillStyle(L.positionColor,1),p.fillRect(H-K,X-K,L.positionSize,L.positionSize)}return this},renderConvexHull:function(g,p,T,C){C===void 0&&(C=1);var M=g.parts,A=M.length;if(A>1){var R=g.vertices;p.lineStyle(C,T),p.beginPath(),p.moveTo(R[0].x,R[0].y);for(var P=1;P<R.length;P++)p.lineTo(R[P].x,R[P].y);p.lineTo(R[0].x,R[0].y),p.strokePath()}return this},renderJoints:function(){for(var g=this.debugGraphic,p=d.allConstraints(this.localWorld),T=0;T<p.length;T++){var C=p[T].render,M=C.lineColor,A=C.lineOpacity,R=C.lineThickness,P=C.pinSize,L=C.anchorColor,F=C.anchorSize;this.renderConstraint(p[T],g,M,A,R,P,L,F)}},renderConstraint:function(g,p,T,C,M,A,R,P){var L=g.render;if(!L.visible||!g.pointA||!g.pointB)return this;p.lineStyle(M,T,C);var F=g.bodyA,w=g.bodyB,O,B;if(F?O=v.add(F.position,g.pointA):O=g.pointA,L.type==="pin")p.strokeCircle(O.x,O.y,A);else{if(w?B=v.add(w.position,g.pointB):B=g.pointB,p.beginPath(),p.moveTo(O.x,O.y),L.type==="spring")for(var I=v.sub(B,O),D=v.perp(v.normalise(I)),N=Math.ceil(h.clamp(g.length/5,12,20)),z,V=1;V<N;V+=1)z=V%2===0?1:-1,p.lineTo(O.x+I.x*(V/N)+D.x*z*4,O.y+I.y*(V/N)+D.y*z*4);p.lineTo(B.x,B.y)}return p.strokePath(),L.anchors&&P>0&&(p.fillStyle(R),p.fillCircle(O.x,O.y,P),p.fillCircle(B.x,B.y,P)),this},resetCollisionIDs:function(){return S._nextCollidingGroupId=1,S._nextNonCollidingGroupId=-1,S._nextCategory=1,this},shutdown:function(){o.off(this.engine),this.removeAllListeners(),u.clear(this.localWorld,!1),t.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});E.exports=c},70410:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setBounce:function(n){return this.body.restitution=n,this}};E.exports=y},66968:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setCollisionCategory:function(n){return this.body.collisionFilter.category=n,this},setCollisionGroup:function(n){return this.body.collisionFilter.group=n,this},setCollidesWith:function(n){var m=0;if(!Array.isArray(n))m=n;else for(var S=0;S<n.length;S++)m|=n[S];return this.body.collisionFilter.mask=m,this},setOnCollide:function(n){return this.body.onCollideCallback=n,this},setOnCollideEnd:function(n){return this.body.onCollideEndCallback=n,this},setOnCollideActive:function(n){return this.body.onCollideActiveCallback=n,this},setOnCollideWith:function(n,m){Array.isArray(n)||(n=[n]);for(var S=0;S<n.length;S++){var x=n[S].hasOwnProperty("body")?n[S].body:n[S];this.body.setOnCollideWith(x,m)}return this}};E.exports=y},51607:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(22562),S={applyForce:function(x){return this._tempVec2.set(this.body.position.x,this.body.position.y),m.applyForce(this.body,this._tempVec2,x),this},applyForceFrom:function(x,h){return m.applyForce(this.body,x,h),this},thrust:function(x){var h=this.body.angle;return this._tempVec2.set(x*Math.cos(h),x*Math.sin(h)),m.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(x){var h=this.body.angle-Math.PI/2;return this._tempVec2.set(x*Math.cos(h),x*Math.sin(h)),m.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(x){var h=this.body.angle+Math.PI/2;return this._tempVec2.set(x*Math.cos(h),x*Math.sin(h)),m.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(x){var h=this.body.angle-Math.PI;return this._tempVec2.set(x*Math.cos(h),x*Math.sin(h)),m.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};E.exports=S},5436:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setFriction:function(n,m,S){return this.body.friction=n,m!==void 0&&(this.body.frictionAir=m),S!==void 0&&(this.body.frictionStatic=S),this},setFrictionAir:function(n){return this.body.frictionAir=n,this},setFrictionStatic:function(n){return this.body.frictionStatic=n,this}};E.exports=y},39858:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setIgnoreGravity:function(n){return this.body.ignoreGravity=n,this}};E.exports=y},37302:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(22562),S=n(26099),x={setMass:function(h){return m.setMass(this.body,h),this},setDensity:function(h){return m.setDensity(this.body,h),this},centerOfMass:{get:function(){return new S(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};E.exports=x},39132:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={setSensor:function(n){return this.body.isSensor=n,this},isSensor:function(){return this.body.isSensor}};E.exports=y},57772:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(66280),S=n(22562),x=n(43855),h=n(95540),d=n(19496),t=n(85791),e=n(41598),l={setRectangle:function(i,s,r){return this.setBody({type:"rectangle",width:i,height:s},r)},setCircle:function(i,s){return this.setBody({type:"circle",radius:i},s)},setPolygon:function(i,s,r){return this.setBody({type:"polygon",sides:s,radius:i},r)},setTrapezoid:function(i,s,r,o){return this.setBody({type:"trapezoid",width:i,height:s,slope:r},o)},setExistingBody:function(i,s){s===void 0&&(s=!0),this.body&&this.world.remove(this.body,!0),this.body=i;for(var r=0;r<i.parts.length;r++)i.parts[r].gameObject=this;var o=this;if(i.destroy=function(){o.world.remove(o.body,!0),o.body.gameObject=null},s&&(this.world.has(i)&&this.world.remove(i,!0),this.world.add(i)),this._originComponent){var a=i.render.sprite.xOffset,u=i.render.sprite.yOffset,f=i.centerOfMass.x,v=i.centerOfMass.y;if(x(f,.5)&&x(v,.5))this.setOrigin(a+.5,u+.5);else{var c=i.centerOffset.x,g=i.centerOffset.y;this.setOrigin(a+c/this.displayWidth,u+g/this.displayHeight)}}return this},setBody:function(i,s){if(!i)return this;var r;typeof i=="string"&&(i={type:i});var o=h(i,"type","rectangle"),a=h(i,"x",this._tempVec2.x),u=h(i,"y",this._tempVec2.y),f=h(i,"width",this.width),v=h(i,"height",this.height);switch(o){case"rectangle":r=m.rectangle(a,u,f,v,s);break;case"circle":var c=h(i,"radius",Math.max(f,v)/2),g=h(i,"maxSides",25);r=m.circle(a,u,c,s,g);break;case"trapezoid":var p=h(i,"slope",.5);r=m.trapezoid(a,u,f,v,p,s);break;case"polygon":var T=h(i,"sides",5),C=h(i,"radius",Math.max(f,v)/2);r=m.polygon(a,u,T,C,s);break;case"fromVertices":case"fromVerts":var M=h(i,"verts",null);if(M)if(typeof M=="string"&&(M=e.fromPath(M)),this.body&&!this.body.hasOwnProperty("temp"))S.setVertices(this.body,M),r=this.body;else{var A=h(i,"flagInternal",!1),R=h(i,"removeCollinear",.01),P=h(i,"minimumArea",10);r=m.fromVertices(a,u,M,s,A,R,P)}break;case"fromPhysicsEditor":r=d.parseBody(a,u,i,s);break;case"fromPhysicsTracer":r=t.parseBody(a,u,i,s);break}return r&&this.setExistingBody(r,i.addToWorld),this}};E.exports=l},38083:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(1121),S=n(53614),x=n(35810),h={setToSleep:function(){return S.set(this.body,!0),this},setAwake:function(){return S.set(this.body,!1),this},setSleepThreshold:function(d){return d===void 0&&(d=60),this.body.sleepThreshold=d,this},setSleepEvents:function(d,t){return this.setSleepStartEvent(d),this.setSleepEndEvent(t),this},setSleepStartEvent:function(d){if(d){var t=this.world;x.on(this.body,"sleepStart",function(e){t.emit(m.SLEEP_START,e,this)})}else x.off(this.body,"sleepStart");return this},setSleepEndEvent:function(d){if(d){var t=this.world;x.on(this.body,"sleepEnd",function(e){t.emit(m.SLEEP_END,e,this)})}else x.off(this.body,"sleepEnd");return this}};E.exports=h},90556:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(22562),S={setStatic:function(x){return m.setStatic(this.body,x),this},isStatic:function(){return this.body.isStatic}};E.exports=S},85436:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(22562),S=n(36383),x=n(86554),h=n(30954),d=4,t={x:{get:function(){return this.body.position.x},set:function(e){this._tempVec2.set(e,this.y),m.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(e){this._tempVec2.set(this.x,e),m.setPosition(this.body,this._tempVec2)}},scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(e){this.setScale(e,e)}},scaleX:{get:function(){return this._scaleX},set:function(e){var l=1/this._scaleX,i=1/this._scaleY;this._scaleX=e,this._scaleX===0?this.renderFlags&=~d:this.renderFlags|=d,m.scale(this.body,l,i),m.scale(this.body,e,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(e){var l=1/this._scaleX,i=1/this._scaleY;this._scaleY=e,this._scaleY===0?this.renderFlags&=~d:this.renderFlags|=d,m.scale(this.body,l,i),m.scale(this.body,this._scaleX,e)}},angle:{get:function(){return h(this.body.angle*S.RAD_TO_DEG)},set:function(e){this.rotation=h(e)*S.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(e){this._rotation=x(e),m.setAngle(this.body,this._rotation)}},setPosition:function(e,l){return e===void 0&&(e=0),l===void 0&&(l=e),this._tempVec2.set(e,l),m.setPosition(this.body,this._tempVec2),this},setRotation:function(e){return e===void 0&&(e=0),this._rotation=x(e),m.setAngle(this.body,e),this},setFixedRotation:function(){return m.setInertia(this.body,1/0),this},setAngle:function(e){return e===void 0&&(e=0),this.angle=e,m.setAngle(this.body,this.rotation),this},setScale:function(e,l,i){e===void 0&&(e=1),l===void 0&&(l=e);var s=1/this._scaleX,r=1/this._scaleY;return this._scaleX=e,this._scaleY=l,m.scale(this.body,s,r,i),m.scale(this.body,e,l,i),this}};E.exports=t},42081:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(22562),S={setVelocityX:function(x){return this._tempVec2.set(x,this.body.velocity.y),m.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(x){return this._tempVec2.set(this.body.velocity.x,x),m.setVelocity(this.body,this._tempVec2),this},setVelocity:function(x,h){return this._tempVec2.set(x,h),m.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return m.getVelocity(this.body)},setAngularVelocity:function(x){return m.setAngularVelocity(this.body,x),this},getAngularVelocity:function(){return m.getAngularVelocity(this.body)},setAngularSpeed:function(x){return m.setAngularSpeed(this.body,x),this},getAngularSpeed:function(){return m.getAngularSpeed(this.body)}};E.exports=S},9503:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Bounce:n(70410),Collision:n(66968),Force:n(51607),Friction:n(5436),Gravity:n(39858),Mass:n(37302),Sensor:n(39132),SetBody:n(57772),Sleep:n(38083),Static:n(90556),Transform:n(85436),Velocity:n(42081)}},85608:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="afteradd"},1213:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="afterremove"},25968:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="afterupdate"},67205:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="beforeadd"},39438:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="beforeremove"},44823:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="beforeupdate"},92593:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="collisionactive"},60128:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="collisionend"},76861:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="collisionstart"},92362:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragend"},76408:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="drag"},93971:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="dragstart"},5656:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pause"},47861:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resume"},79099:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="sleepend"},35906:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="sleepstart"},1121:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={AFTER_ADD:n(85608),AFTER_REMOVE:n(1213),AFTER_UPDATE:n(25968),BEFORE_ADD:n(67205),BEFORE_REMOVE:n(39438),BEFORE_UPDATE:n(44823),COLLISION_ACTIVE:n(92593),COLLISION_END:n(60128),COLLISION_START:n(76861),DRAG_END:n(92362),DRAG:n(76408),DRAG_START:n(93971),PAUSE:n(5656),RESUME:n(47861),SLEEP_END:n(79099),SLEEP_START:n(35906)}},3875:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={BodyBounds:n(68174),Components:n(9503),Events:n(1121),Factory:n(28137),MatterGameObject:n(75803),Image:n(23181),Matter:n(19933),MatterPhysics:n(42045),PolyDecomp:n(55973),Sprite:n(34803),TileBody:n(73834),PhysicsEditorParser:n(19496),PhysicsJSONParser:n(85791),PointerConstraint:n(98713),World:n(68243)}},22562:(E,y,n)=>{var m={};E.exports=m;var S=n(41598),x=n(31725),h=n(53614),d=n(53402),t=n(15647),e=n(66615);(function(){m._timeCorrection=!0,m._inertiaScale=4,m._nextCollidingGroupId=1,m._nextNonCollidingGroupId=-1,m._nextCategory=1,m._baseDelta=1e3/60,m.create=function(i){var s={id:d.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=S.centre(i.vertices):i.hasOwnProperty("vertices")||(s.vertices=S.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var r=d.extend(s,i);return l(r,i),r.setOnCollideWith=function(o,a){return a?this.onCollideWith[o.id]=a:delete this.onCollideWith[o.id],this},r},m.nextGroup=function(i){return i?m._nextNonCollidingGroupId--:m._nextCollidingGroupId++},m.nextCategory=function(){return m._nextCategory=m._nextCategory<<1,m._nextCategory};var l=function(i,s){if(s=s||{},m.set(i,{bounds:i.bounds||t.create(i.vertices),positionPrev:i.positionPrev||x.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}),S.rotate(i.vertices,i.angle,i.position),e.rotate(i.axes,i.angle),t.update(i.bounds,i.vertices,i.velocity),m.set(i,{axes:s.axes||i.axes,area:s.area||i.area,mass:s.mass||i.mass,inertia:s.inertia||i.inertia}),i.parts.length===1){var r=i.bounds,o=i.centerOfMass,a=i.centerOffset,u=r.max.x-r.min.x,f=r.max.y-r.min.y;o.x=-(r.min.x-i.position.x)/u,o.y=-(r.min.y-i.position.y)/f,a.x=u*o.x,a.y=f*o.y}};m.set=function(i,s,r){var o;typeof s=="string"&&(o=s,s={},s[o]=r);for(o in s)if(Object.prototype.hasOwnProperty.call(s,o))switch(r=s[o],o){case"isStatic":m.setStatic(i,r);break;case"isSleeping":h.set(i,r);break;case"mass":m.setMass(i,r);break;case"density":m.setDensity(i,r);break;case"inertia":m.setInertia(i,r);break;case"vertices":m.setVertices(i,r);break;case"position":m.setPosition(i,r);break;case"angle":m.setAngle(i,r);break;case"velocity":m.setVelocity(i,r);break;case"angularVelocity":m.setAngularVelocity(i,r);break;case"speed":m.setSpeed(i,r);break;case"angularSpeed":m.setAngularSpeed(i,r);break;case"parts":m.setParts(i,r);break;case"centre":m.setCentre(i,r);break;default:i[o]=r}},m.setStatic=function(i,s){for(var r=0;r<i.parts.length;r++){var o=i.parts[r];s?(o.isStatic||(o._original={restitution:o.restitution,friction:o.friction,mass:o.mass,inertia:o.inertia,density:o.density,inverseMass:o.inverseMass,inverseInertia:o.inverseInertia}),o.restitution=0,o.friction=1,o.mass=o.inertia=o.density=1/0,o.inverseMass=o.inverseInertia=0,o.positionPrev.x=o.position.x,o.positionPrev.y=o.position.y,o.anglePrev=o.angle,o.angularVelocity=0,o.speed=0,o.angularSpeed=0,o.motion=0):o._original&&(o.restitution=o._original.restitution,o.friction=o._original.friction,o.mass=o._original.mass,o.inertia=o._original.inertia,o.density=o._original.density,o.inverseMass=o._original.inverseMass,o.inverseInertia=o._original.inverseInertia,o._original=null),o.isStatic=s}},m.setMass=function(i,s){var r=i.inertia/(i.mass/6);i.inertia=r*(s/6),i.inverseInertia=1/i.inertia,i.mass=s,i.inverseMass=1/i.mass,i.density=i.mass/i.area},m.setDensity=function(i,s){m.setMass(i,s*i.area),i.density=s},m.setInertia=function(i,s){i.inertia=s,i.inverseInertia=1/i.inertia},m.setVertices=function(i,s){s[0].body===i?i.vertices=s:i.vertices=S.create(s,i),i.axes=e.fromVertices(i.vertices),i.area=S.area(i.vertices),m.setMass(i,i.density*i.area);var r=S.centre(i.vertices);S.translate(i.vertices,r,-1),m.setInertia(i,m._inertiaScale*S.inertia(i.vertices,i.mass)),S.translate(i.vertices,i.position),t.update(i.bounds,i.vertices,i.velocity)},m.setParts=function(i,s,r){var o;for(s=s.slice(0),i.parts.length=0,i.parts.push(i),i.parent=i,o=0;o<s.length;o++){var a=s[o];a!==i&&(a.parent=i,i.parts.push(a))}if(i.parts.length!==1){if(r=typeof r<"u"?r:!0,r){var u=[];for(o=0;o<s.length;o++)u=u.concat(s[o].vertices);S.clockwiseSort(u);var f=S.hull(u),v=S.centre(f);m.setVertices(i,f),S.translate(i.vertices,v)}var c=m._totalProperties(i),g=c.centre.x,p=c.centre.y,T=i.bounds,C=i.centerOfMass,M=i.centerOffset;t.update(T,i.vertices,i.velocity),C.x=-(T.min.x-g)/(T.max.x-T.min.x),C.y=-(T.min.y-p)/(T.max.y-T.min.y),M.x=g,M.y=p,i.area=c.area,i.parent=i,i.position.x=g,i.position.y=p,i.positionPrev.x=g,i.positionPrev.y=p,m.setMass(i,c.mass),m.setInertia(i,c.inertia),m.setPosition(i,c.centre)}},m.setCentre=function(i,s,r){r?(i.positionPrev.x+=s.x,i.positionPrev.y+=s.y,i.position.x+=s.x,i.position.y+=s.y):(i.positionPrev.x=s.x-(i.position.x-i.positionPrev.x),i.positionPrev.y=s.y-(i.position.y-i.positionPrev.y),i.position.x=s.x,i.position.y=s.y)},m.setPosition=function(i,s,r){var o=x.sub(s,i.position);r?(i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.velocity.x=o.x,i.velocity.y=o.y,i.speed=x.magnitude(o)):(i.positionPrev.x+=o.x,i.positionPrev.y+=o.y);for(var a=0;a<i.parts.length;a++){var u=i.parts[a];u.position.x+=o.x,u.position.y+=o.y,S.translate(u.vertices,o),t.update(u.bounds,u.vertices,i.velocity)}},m.setAngle=function(i,s,r){var o=s-i.angle;r?(i.anglePrev=i.angle,i.angularVelocity=o,i.angularSpeed=Math.abs(o)):i.anglePrev+=o;for(var a=0;a<i.parts.length;a++){var u=i.parts[a];u.angle+=o,S.rotate(u.vertices,o,i.position),e.rotate(u.axes,o),t.update(u.bounds,u.vertices,i.velocity),a>0&&x.rotateAbout(u.position,o,i.position,u.position)}},m.setVelocity=function(i,s){var r=i.deltaTime/m._baseDelta;i.positionPrev.x=i.position.x-s.x*r,i.positionPrev.y=i.position.y-s.y*r,i.velocity.x=(i.position.x-i.positionPrev.x)/r,i.velocity.y=(i.position.y-i.positionPrev.y)/r,i.speed=x.magnitude(i.velocity)},m.getVelocity=function(i){var s=m._baseDelta/i.deltaTime;return{x:(i.position.x-i.positionPrev.x)*s,y:(i.position.y-i.positionPrev.y)*s}},m.getSpeed=function(i){return x.magnitude(m.getVelocity(i))},m.setSpeed=function(i,s){m.setVelocity(i,x.mult(x.normalise(m.getVelocity(i)),s))},m.setAngularVelocity=function(i,s){var r=i.deltaTime/m._baseDelta;i.anglePrev=i.angle-s*r,i.angularVelocity=(i.angle-i.anglePrev)/r,i.angularSpeed=Math.abs(i.angularVelocity)},m.getAngularVelocity=function(i){return(i.angle-i.anglePrev)*m._baseDelta/i.deltaTime},m.getAngularSpeed=function(i){return Math.abs(m.getAngularVelocity(i))},m.setAngularSpeed=function(i,s){m.setAngularVelocity(i,d.sign(m.getAngularVelocity(i))*s)},m.translate=function(i,s,r){m.setPosition(i,x.add(i.position,s),r)},m.rotate=function(i,s,r,o){if(!r)m.setAngle(i,i.angle+s,o);else{var a=Math.cos(s),u=Math.sin(s),f=i.position.x-r.x,v=i.position.y-r.y;m.setPosition(i,{x:r.x+(f*a-v*u),y:r.y+(f*u+v*a)},o),m.setAngle(i,i.angle+s,o)}},m.scale=function(i,s,r,o){var a=0,u=0;o=o||i.position;for(var f=i.inertia===1/0,v=0;v<i.parts.length;v++){var c=i.parts[v];c.scale.x=s,c.scale.y=r,S.scale(c.vertices,s,r,o),c.axes=e.fromVertices(c.vertices),c.area=S.area(c.vertices),m.setMass(c,i.density*c.area),S.translate(c.vertices,{x:-c.position.x,y:-c.position.y}),m.setInertia(c,m._inertiaScale*S.inertia(c.vertices,c.mass)),S.translate(c.vertices,{x:c.position.x,y:c.position.y}),v>0&&(a+=c.area,u+=c.inertia),c.position.x=o.x+(c.position.x-o.x)*s,c.position.y=o.y+(c.position.y-o.y)*r,t.update(c.bounds,c.vertices,i.velocity)}i.parts.length>1&&(i.area=a,i.isStatic||(m.setMass(i,i.density*a),m.setInertia(i,u))),i.circleRadius&&(s===r?i.circleRadius*=s:i.circleRadius=null),f&&m.setInertia(i,1/0)},m.update=function(i,s){s=(typeof s<"u"?s:1e3/60)*i.timeScale;var r=s*s,o=m._timeCorrection?s/(i.deltaTime||s):1,a=1-i.frictionAir*(s/d._baseDelta),u=(i.position.x-i.positionPrev.x)*o,f=(i.position.y-i.positionPrev.y)*o;i.velocity.x=u*a+i.force.x/i.mass*r,i.velocity.y=f*a+i.force.y/i.mass*r,i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.position.x+=i.velocity.x,i.position.y+=i.velocity.y,i.deltaTime=s,i.angularVelocity=(i.angle-i.anglePrev)*a*o+i.torque/i.inertia*r,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=x.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var v=0;v<i.parts.length;v++){var c=i.parts[v];S.translate(c.vertices,i.velocity),v>0&&(c.position.x+=i.velocity.x,c.position.y+=i.velocity.y),i.angularVelocity!==0&&(S.rotate(c.vertices,i.angularVelocity,i.position),e.rotate(c.axes,i.angularVelocity),v>0&&x.rotateAbout(c.position,i.angularVelocity,i.position,c.position)),t.update(c.bounds,c.vertices,i.velocity)}},m.updateVelocities=function(i){var s=m._baseDelta/i.deltaTime,r=i.velocity;r.x=(i.position.x-i.positionPrev.x)*s,r.y=(i.position.y-i.positionPrev.y)*s,i.speed=Math.sqrt(r.x*r.x+r.y*r.y),i.angularVelocity=(i.angle-i.anglePrev)*s,i.angularSpeed=Math.abs(i.angularVelocity)},m.applyForce=function(i,s,r){var o={x:s.x-i.position.x,y:s.y-i.position.y};i.force.x+=r.x,i.force.y+=r.y,i.torque+=o.x*r.y-o.y*r.x},m._totalProperties=function(i){for(var s={mass:0,area:0,inertia:0,centre:{x:0,y:0}},r=i.parts.length===1?0:1;r<i.parts.length;r++){var o=i.parts[r],a=o.mass!==1/0?o.mass:1;s.mass+=a,s.area+=o.area,s.inertia+=o.inertia,s.centre=x.add(s.centre,x.mult(o.position,a))}return s.centre=x.div(s.centre,s.mass),s},m.wrap=function(i,s){var r=t.wrap(i.bounds,s);return r&&m.translate(i,r),r}})()},69351:(E,y,n)=>{var m={};E.exports=m;var S=n(35810),x=n(53402),h=n(15647),d=n(22562);(function(){m.create=function(t){return x.extend({id:x.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},t)},m.setModified=function(t,e,l,i){if(S.trigger(t,"compositeModified",t),t.isModified=e,e&&t.cache&&(t.cache.allBodies=null,t.cache.allConstraints=null,t.cache.allComposites=null),l&&t.parent&&m.setModified(t.parent,e,l,i),i)for(var s=0;s<t.composites.length;s++){var r=t.composites[s];m.setModified(r,e,l,i)}},m.add=function(t,e){var l=[].concat(e);S.trigger(t,"beforeAdd",{object:e});for(var i=0;i<l.length;i++){var s=l[i];switch(s.type){case"body":if(s.parent!==s){x.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}m.addBody(t,s);break;case"constraint":m.addConstraint(t,s);break;case"composite":m.addComposite(t,s);break;case"mouseConstraint":m.addConstraint(t,s.constraint);break}}return S.trigger(t,"afterAdd",{object:e}),t},m.remove=function(t,e,l){var i=[].concat(e);S.trigger(t,"beforeRemove",{object:e});for(var s=0;s<i.length;s++){var r=i[s];switch(r.type){case"body":m.removeBody(t,r,l);break;case"constraint":m.removeConstraint(t,r,l);break;case"composite":m.removeComposite(t,r,l);break;case"mouseConstraint":m.removeConstraint(t,r.constraint);break}}return S.trigger(t,"afterRemove",{object:e}),t},m.addComposite=function(t,e){return t.composites.push(e),e.parent=t,m.setModified(t,!0,!0,!1),t},m.removeComposite=function(t,e,l){var i=x.indexOf(t.composites,e);if(i!==-1){var s=m.allBodies(e);m.removeCompositeAt(t,i);for(var r=0;r<s.length;r++)s[r].sleepCounter=0}if(l)for(var r=0;r<t.composites.length;r++)m.removeComposite(t.composites[r],e,!0);return t},m.removeCompositeAt=function(t,e){return t.composites.splice(e,1),m.setModified(t,!0,!0,!1),t},m.addBody=function(t,e){return t.bodies.push(e),m.setModified(t,!0,!0,!1),t},m.removeBody=function(t,e,l){var i=x.indexOf(t.bodies,e);if(i!==-1&&(m.removeBodyAt(t,i),e.sleepCounter=0),l)for(var s=0;s<t.composites.length;s++)m.removeBody(t.composites[s],e,!0);return t},m.removeBodyAt=function(t,e){return t.bodies.splice(e,1),m.setModified(t,!0,!0,!1),t},m.addConstraint=function(t,e){return t.constraints.push(e),m.setModified(t,!0,!0,!1),t},m.removeConstraint=function(t,e,l){var i=x.indexOf(t.constraints,e);if(i!==-1&&m.removeConstraintAt(t,i),l)for(var s=0;s<t.composites.length;s++)m.removeConstraint(t.composites[s],e,!0);return t},m.removeConstraintAt=function(t,e){return t.constraints.splice(e,1),m.setModified(t,!0,!0,!1),t},m.clear=function(t,e,l){if(l)for(var i=0;i<t.composites.length;i++)m.clear(t.composites[i],e,!0);return e?t.bodies=t.bodies.filter(function(s){return s.isStatic}):t.bodies.length=0,t.constraints.length=0,t.composites.length=0,m.setModified(t,!0,!0,!1),t},m.allBodies=function(t){if(t.cache&&t.cache.allBodies)return t.cache.allBodies;for(var e=[].concat(t.bodies),l=0;l<t.composites.length;l++)e=e.concat(m.allBodies(t.composites[l]));return t.cache&&(t.cache.allBodies=e),e},m.allConstraints=function(t){if(t.cache&&t.cache.allConstraints)return t.cache.allConstraints;for(var e=[].concat(t.constraints),l=0;l<t.composites.length;l++)e=e.concat(m.allConstraints(t.composites[l]));return t.cache&&(t.cache.allConstraints=e),e},m.allComposites=function(t){if(t.cache&&t.cache.allComposites)return t.cache.allComposites;for(var e=[].concat(t.composites),l=0;l<t.composites.length;l++)e=e.concat(m.allComposites(t.composites[l]));return t.cache&&(t.cache.allComposites=e),e},m.get=function(t,e,l){var i,s;switch(l){case"body":i=m.allBodies(t);break;case"constraint":i=m.allConstraints(t);break;case"composite":i=m.allComposites(t).concat(t);break}return i?(s=i.filter(function(r){return r.id.toString()===e.toString()}),s.length===0?null:s[0]):null},m.move=function(t,e,l){return m.remove(t,e),m.add(l,e),t},m.rebase=function(t){for(var e=m.allBodies(t).concat(m.allConstraints(t)).concat(m.allComposites(t)),l=0;l<e.length;l++)e[l].id=x.nextId();return t},m.translate=function(t,e,l){for(var i=l?m.allBodies(t):t.bodies,s=0;s<i.length;s++)d.translate(i[s],e);return t},m.rotate=function(t,e,l,i){for(var s=Math.cos(e),r=Math.sin(e),o=i?m.allBodies(t):t.bodies,a=0;a<o.length;a++){var u=o[a],f=u.position.x-l.x,v=u.position.y-l.y;d.setPosition(u,{x:l.x+(f*s-v*r),y:l.y+(f*r+v*s)}),d.rotate(u,e)}return t},m.scale=function(t,e,l,i,s){for(var r=s?m.allBodies(t):t.bodies,o=0;o<r.length;o++){var a=r[o],u=a.position.x-i.x,f=a.position.y-i.y;d.setPosition(a,{x:i.x+u*e,y:i.y+f*l}),d.scale(a,e,l)}return t},m.bounds=function(t){for(var e=m.allBodies(t),l=[],i=0;i<e.length;i+=1){var s=e[i];l.push(s.bounds.min,s.bounds.max)}return h.create(l)},m.wrap=function(t,e){var l=h.wrap(m.bounds(t),e);return l&&m.translate(t,l),l}})()},4372:(E,y,n)=>{var m={};E.exports=m;var S=n(69351);(function(){m.create=S.create,m.add=S.add,m.remove=S.remove,m.clear=S.clear,m.addComposite=S.addComposite,m.addBody=S.addBody,m.addConstraint=S.addConstraint})()},52284:(E,y,n)=>{var m={};E.exports=m;var S=n(41598),x=n(4506);(function(){var h=[],d={overlap:0,axis:null},t={overlap:0,axis:null};m.create=function(e,l){return{pair:null,collided:!1,bodyA:e,bodyB:l,parentA:e.parent,parentB:l.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},m.collides=function(e,l,i){if(m._overlapAxes(d,e.vertices,l.vertices,e.axes),d.overlap<=0||(m._overlapAxes(t,l.vertices,e.vertices,l.axes),t.overlap<=0))return null;var s=i&&i.table[x.id(e,l)],r;s?r=s.collision:(r=m.create(e,l),r.collided=!0,r.bodyA=e.id<l.id?e:l,r.bodyB=e.id<l.id?l:e,r.parentA=r.bodyA.parent,r.parentB=r.bodyB.parent),e=r.bodyA,l=r.bodyB;var o;d.overlap<t.overlap?o=d:o=t;var a=r.normal,u=r.tangent,f=r.penetration,v=r.supports,c=o.overlap,g=o.axis,p=g.x,T=g.y,C=l.position.x-e.position.x,M=l.position.y-e.position.y;p*C+T*M>=0&&(p=-p,T=-T),a.x=p,a.y=T,u.x=-T,u.y=p,f.x=p*c,f.y=T*c,r.depth=c;var A=m._findSupports(e,l,a,1),R=0;if(S.contains(e.vertices,A[0])&&(v[R++]=A[0]),S.contains(e.vertices,A[1])&&(v[R++]=A[1]),R<2){var P=m._findSupports(l,e,a,-1);S.contains(l.vertices,P[0])&&(v[R++]=P[0]),R<2&&S.contains(l.vertices,P[1])&&(v[R++]=P[1])}return R===0&&(v[R++]=A[0]),r.supportCount=R,r},m._overlapAxes=function(e,l,i,s){var r=l.length,o=i.length,a=l[0].x,u=l[0].y,f=i[0].x,v=i[0].y,c=s.length,g=Number.MAX_VALUE,p=0,T,C,M,A,R,P;for(R=0;R<c;R++){var L=s[R],F=L.x,w=L.y,O=a*F+u*w,B=f*F+v*w,I=O,D=B;for(P=1;P<r;P+=1)A=l[P].x*F+l[P].y*w,A>I?I=A:A<O&&(O=A);for(P=1;P<o;P+=1)A=i[P].x*F+i[P].y*w,A>D?D=A:A<B&&(B=A);if(C=I-B,M=D-O,T=C<M?C:M,T<g&&(g=T,p=R,T<=0))break}e.axis=s[p],e.overlap=g},m._findSupports=function(e,l,i,s){var r=l.vertices,o=r.length,a=e.position.x,u=e.position.y,f=i.x*s,v=i.y*s,c=r[0],g=c,p=f*(a-g.x)+v*(u-g.y),T,C,M;for(M=1;M<o;M+=1)g=r[M],C=f*(a-g.x)+v*(u-g.y),C<p&&(p=C,c=g);return T=r[(o+c.index-1)%o],p=f*(a-T.x)+v*(u-T.y),g=r[(c.index+1)%o],f*(a-g.x)+v*(u-g.y)<p?(h[0]=c,h[1]=g,h):(h[0]=c,h[1]=T,h)}})()},43424:E=>{var y={};E.exports=y,function(){y.create=function(n){return{vertex:n,normalImpulse:0,tangentImpulse:0}}}()},81388:(E,y,n)=>{var m={};E.exports=m;var S=n(53402),x=n(52284);(function(){m.create=function(h){var d={bodies:[],collisions:[],pairs:null};return S.extend(d,h)},m.setBodies=function(h,d){h.bodies=d.slice(0)},m.clear=function(h){h.bodies=[],h.collisions=[]},m.collisions=function(h){var d=h.pairs,t=h.bodies,e=t.length,l=m.canCollide,i=x.collides,s=h.collisions,r=0,o,a;for(t.sort(m._compareBoundsX),o=0;o<e;o++){var u=t[o],f=u.bounds,v=u.bounds.max.x,c=u.bounds.max.y,g=u.bounds.min.y,p=u.isStatic||u.isSleeping,T=u.parts.length,C=T===1;for(a=o+1;a<e;a++){var M=t[a],A=M.bounds;if(A.min.x>v)break;if(!(c<A.min.y||g>A.max.y)&&!(p&&(M.isStatic||M.isSleeping))&&l(u.collisionFilter,M.collisionFilter)){var R=M.parts.length;if(C&&R===1){var P=i(u,M,d);P&&(s[r++]=P)}else for(var L=T>1?1:0,F=R>1?1:0,w=L;w<T;w++)for(var O=u.parts[w],f=O.bounds,B=F;B<R;B++){var I=M.parts[B],A=I.bounds;if(!(f.min.x>A.max.x||f.max.x<A.min.x||f.max.y<A.min.y||f.min.y>A.max.y)){var P=i(O,I,d);P&&(s[r++]=P)}}}}}return s.length!==r&&(s.length=r),s},m.canCollide=function(h,d){return h.group===d.group&&h.group!==0?h.group>0:(h.mask&d.category)!==0&&(d.mask&h.category)!==0},m._compareBoundsX=function(h,d){return h.bounds.min.x-d.bounds.min.x}})()},4506:(E,y,n)=>{var m={};E.exports=m;var S=n(43424);(function(){m.create=function(x,h){var d=x.bodyA,t=x.bodyB,e={id:m.id(d,t),bodyA:d,bodyB:t,collision:x,contacts:[S.create(),S.create()],contactCount:0,separation:0,isActive:!0,isSensor:d.isSensor||t.isSensor,timeCreated:h,timeUpdated:h,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return m.update(e,x,h),e},m.update=function(x,h,d){var t=h.supports,e=h.supportCount,l=x.contacts,i=h.parentA,s=h.parentB;x.isActive=!0,x.timeUpdated=d,x.collision=h,x.separation=h.depth,x.inverseMass=i.inverseMass+s.inverseMass,x.friction=i.friction<s.friction?i.friction:s.friction,x.frictionStatic=i.frictionStatic>s.frictionStatic?i.frictionStatic:s.frictionStatic,x.restitution=i.restitution>s.restitution?i.restitution:s.restitution,x.slop=i.slop>s.slop?i.slop:s.slop,x.contactCount=e,h.pair=x;var r=t[0],o=l[0],a=t[1],u=l[1];(u.vertex===r||o.vertex===a)&&(l[1]=o,l[0]=o=u,u=l[1]),o.vertex=r,u.vertex=a},m.setActive=function(x,h,d){h?(x.isActive=!0,x.timeUpdated=d):(x.isActive=!1,x.contactCount=0)},m.id=function(x,h){return x.id<h.id?x.id.toString(36)+":"+h.id.toString(36):h.id.toString(36)+":"+x.id.toString(36)}})()},99561:(E,y,n)=>{var m={};E.exports=m;var S=n(4506),x=n(53402);(function(){m.create=function(h){return x.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},h)},m.update=function(h,d,t){var e=S.update,l=S.create,i=S.setActive,s=h.table,r=h.list,o=r.length,a=o,u=h.collisionStart,f=h.collisionEnd,v=h.collisionActive,c=d.length,g=0,p=0,T=0,C,M,A;for(A=0;A<c;A++)C=d[A],M=C.pair,M?(M.isActive&&(v[T++]=M),e(M,C,t)):(M=l(C,t),s[M.id]=M,u[g++]=M,r[a++]=M);for(a=0,o=r.length,A=0;A<o;A++)M=r[A],M.timeUpdated>=t?r[a++]=M:(i(M,!1,t),M.collision.bodyA.sleepCounter>0&&M.collision.bodyB.sleepCounter>0?r[a++]=M:(f[p++]=M,delete s[M.id]));r.length!==a&&(r.length=a),u.length!==g&&(u.length=g),f.length!==p&&(f.length=p),v.length!==T&&(v.length=T)},m.clear=function(h){return h.table={},h.list.length=0,h.collisionStart.length=0,h.collisionActive.length=0,h.collisionEnd.length=0,h}})()},73296:(E,y,n)=>{var m={};E.exports=m;var S=n(31725),x=n(52284),h=n(15647),d=n(66280),t=n(41598);(function(){m.collides=function(e,l){for(var i=[],s=l.length,r=e.bounds,o=x.collides,a=h.overlaps,u=0;u<s;u++){var f=l[u],v=f.parts.length,c=v===1?0:1;if(e!==f&&a(f.bounds,r))for(var g=c;g<v;g++){var p=f.parts[g];if(a(p.bounds,r)){var T=o(p,e);if(T){i.push(T);break}}}}return i},m.ray=function(e,l,i,s){s=s||1e-100;for(var r=S.angle(l,i),o=S.magnitude(S.sub(l,i)),a=(i.x+l.x)*.5,u=(i.y+l.y)*.5,f=d.rectangle(a,u,o,s,{angle:r}),v=m.collides(f,e),c=0;c<v.length;c+=1){var g=v[c];g.body=g.bodyB=g.bodyA}return v},m.region=function(e,l,i){for(var s=[],r=0;r<e.length;r++){var o=e[r],a=h.overlaps(o.bounds,l);(a&&!i||!a&&i)&&s.push(o)}return s},m.point=function(e,l){for(var i=[],s=0;s<e.length;s++){var r=e[s];if(h.contains(r.bounds,l))for(var o=r.parts.length===1?0:1;o<r.parts.length;o++){var a=r.parts[o];if(h.contains(a.bounds,l)&&t.contains(a.vertices,l)){i.push(r);break}}}return i}})()},66272:(E,y,n)=>{var m={};E.exports=m;var S=n(41598),x=n(53402),h=n(15647);(function(){m._restingThresh=2,m._restingThreshTangent=Math.sqrt(6),m._positionDampen=.9,m._positionWarming=.8,m._frictionNormalMultiplier=5,m._frictionMaxStatic=Number.MAX_VALUE,m.preSolvePosition=function(d){var t,e,l,i=d.length;for(t=0;t<i;t++)e=d[t],e.isActive&&(l=e.contactCount,e.collision.parentA.totalContacts+=l,e.collision.parentB.totalContacts+=l)},m.solvePosition=function(d,t,e){var l,i,s,r,o,a,u,f,v=m._positionDampen*(e||1),c=x.clamp(t/x._baseDelta,0,1),g=d.length;for(l=0;l<g;l++)i=d[l],!(!i.isActive||i.isSensor)&&(s=i.collision,r=s.parentA,o=s.parentB,a=s.normal,i.separation=s.depth+a.x*(o.positionImpulse.x-r.positionImpulse.x)+a.y*(o.positionImpulse.y-r.positionImpulse.y));for(l=0;l<g;l++)i=d[l],!(!i.isActive||i.isSensor)&&(s=i.collision,r=s.parentA,o=s.parentB,a=s.normal,f=i.separation-i.slop*c,(r.isStatic||o.isStatic)&&(f*=2),r.isStatic||r.isSleeping||(u=v/r.totalContacts,r.positionImpulse.x+=a.x*f*u,r.positionImpulse.y+=a.y*f*u),o.isStatic||o.isSleeping||(u=v/o.totalContacts,o.positionImpulse.x-=a.x*f*u,o.positionImpulse.y-=a.y*f*u))},m.postSolvePosition=function(d){for(var t=m._positionWarming,e=d.length,l=S.translate,i=h.update,s=0;s<e;s++){var r=d[s],o=r.positionImpulse,a=o.x,u=o.y,f=r.velocity;if(r.totalContacts=0,a!==0||u!==0){for(var v=0;v<r.parts.length;v++){var c=r.parts[v];l(c.vertices,o),i(c.bounds,c.vertices,f),c.position.x+=a,c.position.y+=u}r.positionPrev.x+=a,r.positionPrev.y+=u,a*f.x+u*f.y<0?(o.x=0,o.y=0):(o.x*=t,o.y*=t)}}},m.preSolveVelocity=function(d){var t=d.length,e,l;for(e=0;e<t;e++){var i=d[e];if(!(!i.isActive||i.isSensor)){var s=i.contacts,r=i.contactCount,o=i.collision,a=o.parentA,u=o.parentB,f=o.normal,v=o.tangent;for(l=0;l<r;l++){var c=s[l],g=c.vertex,p=c.normalImpulse,T=c.tangentImpulse;if(p!==0||T!==0){var C=f.x*p+v.x*T,M=f.y*p+v.y*T;a.isStatic||a.isSleeping||(a.positionPrev.x+=C*a.inverseMass,a.positionPrev.y+=M*a.inverseMass,a.anglePrev+=a.inverseInertia*((g.x-a.position.x)*M-(g.y-a.position.y)*C)),u.isStatic||u.isSleeping||(u.positionPrev.x-=C*u.inverseMass,u.positionPrev.y-=M*u.inverseMass,u.anglePrev-=u.inverseInertia*((g.x-u.position.x)*M-(g.y-u.position.y)*C))}}}}},m.solveVelocity=function(d,t){var e=t/x._baseDelta,l=e*e,i=l*e,s=-m._restingThresh*e,r=m._restingThreshTangent,o=m._frictionNormalMultiplier*e,a=m._frictionMaxStatic,u=d.length,f,v,c,g;for(c=0;c<u;c++){var p=d[c];if(!(!p.isActive||p.isSensor)){var T=p.collision,C=T.parentA,M=T.parentB,A=T.normal.x,R=T.normal.y,P=T.tangent.x,L=T.tangent.y,F=p.inverseMass,w=p.friction*p.frictionStatic*o,O=p.contacts,B=p.contactCount,I=1/B,D=C.position.x-C.positionPrev.x,N=C.position.y-C.positionPrev.y,z=C.angle-C.anglePrev,V=M.position.x-M.positionPrev.x,U=M.position.y-M.positionPrev.y,G=M.angle-M.anglePrev;for(g=0;g<B;g++){var b=O[g],Y=b.vertex,W=Y.x-C.position.x,H=Y.y-C.position.y,X=Y.x-M.position.x,K=Y.y-M.position.y,Z=D-H*z,Q=N+W*z,j=V-K*G,J=U+X*G,tt=Z-j,k=Q-J,q=A*tt+R*k,_=P*tt+L*k,rt=p.separation+q,at=Math.min(rt,1);at=rt<0?0:at;var ht=at*w;_<-ht||_>ht?(v=_>0?_:-_,f=p.friction*(_>0?1:-1)*i,f<-v?f=-v:f>v&&(f=v)):(f=_,v=a);var ot=W*R-H*A,nt=X*R-K*A,it=I/(F+C.inverseInertia*ot*ot+M.inverseInertia*nt*nt),lt=(1+p.restitution)*q*it;if(f*=it,q<s)b.normalImpulse=0;else{var dt=b.normalImpulse;b.normalImpulse+=lt,b.normalImpulse>0&&(b.normalImpulse=0),lt=b.normalImpulse-dt}if(_<-r||_>r)b.tangentImpulse=0;else{var ct=b.tangentImpulse;b.tangentImpulse+=f,b.tangentImpulse<-v&&(b.tangentImpulse=-v),b.tangentImpulse>v&&(b.tangentImpulse=v),f=b.tangentImpulse-ct}var Bt=A*lt+P*f,Lt=R*lt+L*f;C.isStatic||C.isSleeping||(C.positionPrev.x+=Bt*C.inverseMass,C.positionPrev.y+=Lt*C.inverseMass,C.anglePrev+=(W*Lt-H*Bt)*C.inverseInertia),M.isStatic||M.isSleeping||(M.positionPrev.x-=Bt*M.inverseMass,M.positionPrev.y-=Lt*M.inverseMass,M.anglePrev-=(X*Lt-K*Bt)*M.inverseInertia)}}}}})()},48140:(E,y,n)=>{var m={};E.exports=m;var S=n(41598),x=n(31725),h=n(53614),d=n(15647),t=n(66615),e=n(53402);(function(){m._warming=.4,m._torqueDampen=1,m._minLength=1e-6,m.create=function(l){var i=l;i.bodyA&&!i.pointA&&(i.pointA={x:0,y:0}),i.bodyB&&!i.pointB&&(i.pointB={x:0,y:0});var s=i.bodyA?x.add(i.bodyA.position,i.pointA):i.pointA,r=i.bodyB?x.add(i.bodyB.position,i.pointB):i.pointB,o=x.magnitude(x.sub(s,r));i.length=typeof i.length<"u"?i.length:o,i.id=i.id||e.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 a={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?(a.type="pin",a.anchors=!1):i.stiffness<.9&&(a.type="spring"),i.render=e.extend(a,i.render),i},m.preSolveAll=function(l){for(var i=0;i<l.length;i+=1){var s=l[i],r=s.constraintImpulse;s.isStatic||r.x===0&&r.y===0&&r.angle===0||(s.position.x+=r.x,s.position.y+=r.y,s.angle+=r.angle)}},m.solveAll=function(l,i){for(var s=e.clamp(i/e._baseDelta,0,1),r=0;r<l.length;r+=1){var o=l[r],a=!o.bodyA||o.bodyA&&o.bodyA.isStatic,u=!o.bodyB||o.bodyB&&o.bodyB.isStatic;(a||u)&&m.solve(l[r],s)}for(r=0;r<l.length;r+=1)o=l[r],a=!o.bodyA||o.bodyA&&o.bodyA.isStatic,u=!o.bodyB||o.bodyB&&o.bodyB.isStatic,!a&&!u&&m.solve(l[r],s)},m.solve=function(l,i){var s=l.bodyA,r=l.bodyB,o=l.pointA,a=l.pointB;if(!(!s&&!r)){s&&!s.isStatic&&(x.rotate(o,s.angle-l.angleA,o),l.angleA=s.angle),r&&!r.isStatic&&(x.rotate(a,r.angle-l.angleB,a),l.angleB=r.angle);var u=o,f=a;if(s&&(u=x.add(s.position,o)),r&&(f=x.add(r.position,a)),!(!u||!f)){var v=x.sub(u,f),c=x.magnitude(v);c<m._minLength&&(c=m._minLength);var g=(c-l.length)/c,p=l.stiffness>=1||l.length===0,T=p?l.stiffness*i:l.stiffness*i*i,C=l.damping*i,M=x.mult(v,g*T),A=(s?s.inverseMass:0)+(r?r.inverseMass:0),R=(s?s.inverseInertia:0)+(r?r.inverseInertia:0),P=A+R,L,F,w,O,B;if(C>0){var I=x.create();w=x.div(v,c),B=x.sub(r&&x.sub(r.position,r.positionPrev)||I,s&&x.sub(s.position,s.positionPrev)||I),O=x.dot(w,B)}s&&!s.isStatic&&(F=s.inverseMass/A,s.constraintImpulse.x-=M.x*F,s.constraintImpulse.y-=M.y*F,s.position.x-=M.x*F,s.position.y-=M.y*F,C>0&&(s.positionPrev.x-=C*w.x*O*F,s.positionPrev.y-=C*w.y*O*F),L=x.cross(o,M)/P*m._torqueDampen*s.inverseInertia*(1-l.angularStiffness),s.constraintImpulse.angle-=L,s.angle-=L),r&&!r.isStatic&&(F=r.inverseMass/A,r.constraintImpulse.x+=M.x*F,r.constraintImpulse.y+=M.y*F,r.position.x+=M.x*F,r.position.y+=M.y*F,C>0&&(r.positionPrev.x+=C*w.x*O*F,r.positionPrev.y+=C*w.y*O*F),L=x.cross(a,M)/P*m._torqueDampen*r.inverseInertia*(1-l.angularStiffness),r.constraintImpulse.angle+=L,r.angle+=L)}}},m.postSolveAll=function(l){for(var i=0;i<l.length;i++){var s=l[i],r=s.constraintImpulse;if(!(s.isStatic||r.x===0&&r.y===0&&r.angle===0)){h.set(s,!1);for(var o=0;o<s.parts.length;o++){var a=s.parts[o];S.translate(a.vertices,r),o>0&&(a.position.x+=r.x,a.position.y+=r.y),r.angle!==0&&(S.rotate(a.vertices,r.angle,s.position),t.rotate(a.axes,r.angle),o>0&&x.rotateAbout(a.position,r.angle,s.position,a.position)),d.update(a.bounds,a.vertices,s.velocity)}r.angle*=m._warming,r.x*=m._warming,r.y*=m._warming}}},m.pointAWorld=function(l){return{x:(l.bodyA?l.bodyA.position.x:0)+(l.pointA?l.pointA.x:0),y:(l.bodyA?l.bodyA.position.y:0)+(l.pointA?l.pointA.y:0)}},m.pointBWorld=function(l){return{x:(l.bodyB?l.bodyB.position.x:0)+(l.pointB?l.pointB.x:0),y:(l.bodyB?l.bodyB.position.y:0)+(l.pointB?l.pointB.y:0)}},m.currentLength=function(l){var i=(l.bodyA?l.bodyA.position.x:0)+(l.pointA?l.pointA.x:0),s=(l.bodyA?l.bodyA.position.y:0)+(l.pointA?l.pointA.y:0),r=(l.bodyB?l.bodyB.position.x:0)+(l.pointB?l.pointB.x:0),o=(l.bodyB?l.bodyB.position.y:0)+(l.pointB?l.pointB.y:0),a=i-r,u=s-o;return Math.sqrt(a*a+u*u)}})()},53402:(E,y,n)=>{var m={};E.exports=m,function(){m._baseDelta=1e3/60,m._nextId=0,m._seed=0,m._nowStartTime=+new Date,m._warnedOnce={},m._decomp=null,m.extend=function(x,h){var d,t;typeof h=="boolean"?(d=2,t=h):(d=1,t=!0);for(var e=d;e<arguments.length;e++){var l=arguments[e];if(l)for(var i in l)t&&l[i]&&l[i].constructor===Object&&(!x[i]||x[i].constructor===Object)?(x[i]=x[i]||{},m.extend(x[i],t,l[i])):x[i]=l[i]}return x},m.clone=function(x,h){return m.extend({},h,x)},m.keys=function(x){if(Object.keys)return Object.keys(x);var h=[];for(var d in x)h.push(d);return h},m.values=function(x){var h=[];if(Object.keys){for(var d=Object.keys(x),t=0;t<d.length;t++)h.push(x[d[t]]);return h}for(var e in x)h.push(x[e]);return h},m.get=function(x,h,d,t){h=h.split(".").slice(d,t);for(var e=0;e<h.length;e+=1)x=x[h[e]];return x},m.set=function(x,h,d,t,e){var l=h.split(".").slice(t,e);return m.get(x,h,0,-1)[l[l.length-1]]=d,d},m.shuffle=function(x){for(var h=x.length-1;h>0;h--){var d=Math.floor(m.random()*(h+1)),t=x[h];x[h]=x[d],x[d]=t}return x},m.choose=function(x){return x[Math.floor(m.random()*x.length)]},m.isElement=function(x){return typeof HTMLElement<"u"?x instanceof HTMLElement:!!(x&&x.nodeType&&x.nodeName)},m.isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"},m.isFunction=function(x){return typeof x=="function"},m.isPlainObject=function(x){return typeof x=="object"&&x.constructor===Object},m.isString=function(x){return toString.call(x)==="[object String]"},m.clamp=function(x,h,d){return x<h?h:x>d?d:x},m.sign=function(x){return x<0?-1:1},m.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-m._nowStartTime},m.random=function(x,h){return x=typeof x<"u"?x:0,h=typeof h<"u"?h:1,x+S()*(h-x)};var S=function(){return m._seed=(m._seed*9301+49297)%233280,m._seed/233280};m.colorToNumber=function(x){return x=x.replace("#",""),x.length==3&&(x=x.charAt(0)+x.charAt(0)+x.charAt(1)+x.charAt(1)+x.charAt(2)+x.charAt(2)),parseInt(x,16)},m.logLevel=1,m.log=function(){console&&m.logLevel>0&&m.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},m.info=function(){console&&m.logLevel>0&&m.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},m.warn=function(){console&&m.logLevel>0&&m.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},m.warnOnce=function(){var x=Array.prototype.slice.call(arguments).join(" ");m._warnedOnce[x]||(m.warn(x),m._warnedOnce[x]=!0)},m.deprecated=function(x,h,d){x[h]=m.chain(function(){m.warnOnce("🔅 deprecated 🔅",d)},x[h])},m.nextId=function(){return m._nextId++},m.indexOf=function(x,h){if(x.indexOf)return x.indexOf(h);for(var d=0;d<x.length;d++)if(x[d]===h)return d;return-1},m.map=function(x,h){if(x.map)return x.map(h);for(var d=[],t=0;t<x.length;t+=1)d.push(h(x[t]));return d},m.topologicalSort=function(x){var h=[],d=[],t=[];for(var e in x)!d[e]&&!t[e]&&m._topologicalSort(e,d,t,x,h);return h},m._topologicalSort=function(x,h,d,t,e){var l=t[x]||[];d[x]=!0;for(var i=0;i<l.length;i+=1){var s=l[i];d[s]||h[s]||m._topologicalSort(s,h,d,t,e)}d[x]=!1,h[x]=!0,e.push(x)},m.chain=function(){for(var x=[],h=0;h<arguments.length;h+=1){var d=arguments[h];d._chained?x.push.apply(x,d._chained):x.push(d)}var t=function(){for(var e,l=new Array(arguments.length),i=0,s=arguments.length;i<s;i++)l[i]=arguments[i];for(i=0;i<x.length;i+=1){var r=x[i].apply(e,l);typeof r<"u"&&(e=r)}return e};return t._chained=x,t},m.chainPathBefore=function(x,h,d){return m.set(x,h,m.chain(d,m.get(x,h)))},m.chainPathAfter=function(x,h,d){return m.set(x,h,m.chain(m.get(x,h),d))},m.setDecomp=function(x){m._decomp=x},m.getDecomp=function(){var x=m._decomp;try{!x&&typeof window<"u"&&(x=window.decomp),!x&&typeof n.g<"u"&&(x=n.g.decomp)}catch{x=null}return x}}()},48413:(E,y,n)=>{var m={};E.exports=m;var S=n(53614),x=n(66272),h=n(81388),d=n(99561),t=n(35810),e=n(69351),l=n(48140),i=n(53402),s=n(22562);(function(){m._deltaMax=1e3/60,m.create=function(r){r=r||{};var o={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}},a=i.extend(o,r);return a.world=r.world||e.create({label:"World"}),a.pairs=r.pairs||d.create(),a.detector=r.detector||h.create(),a.detector.pairs=a.pairs,a.grid={buckets:[]},a.world.gravity=a.gravity,a.broadphase=a.grid,a.metrics={},a},m.update=function(r,o){var a=i.now(),u=r.world,f=r.detector,v=r.pairs,c=r.timing,g=c.timestamp,p;o>m._deltaMax&&i.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",m._deltaMax.toFixed(3),"ms."),o=typeof o<"u"?o:i._baseDelta,o*=c.timeScale,c.timestamp+=o,c.lastDelta=o;var T={timestamp:c.timestamp,delta:o};t.trigger(r,"beforeUpdate",T);var C=e.allBodies(u),M=e.allConstraints(u),A=e.allComposites(u);for(u.isModified&&(h.setBodies(f,C),e.setModified(u,!1,!1,!0)),r.enableSleeping&&S.update(C,o),m._bodiesApplyGravity(C,r.gravity),m.wrap(C,A),m.attractors(C),o>0&&m._bodiesUpdate(C,o),t.trigger(r,"beforeSolve",T),l.preSolveAll(C),p=0;p<r.constraintIterations;p++)l.solveAll(M,o);l.postSolveAll(C);var R=h.collisions(f);d.update(v,R,g),r.enableSleeping&&S.afterCollisions(v.list),v.collisionStart.length>0&&t.trigger(r,"collisionStart",{pairs:v.collisionStart,timestamp:c.timestamp,delta:o});var P=i.clamp(20/r.positionIterations,0,1);for(x.preSolvePosition(v.list),p=0;p<r.positionIterations;p++)x.solvePosition(v.list,o,P);for(x.postSolvePosition(C),l.preSolveAll(C),p=0;p<r.constraintIterations;p++)l.solveAll(M,o);for(l.postSolveAll(C),x.preSolveVelocity(v.list),p=0;p<r.velocityIterations;p++)x.solveVelocity(v.list,o);return m._bodiesUpdateVelocities(C),v.collisionActive.length>0&&t.trigger(r,"collisionActive",{pairs:v.collisionActive,timestamp:c.timestamp,delta:o}),v.collisionEnd.length>0&&t.trigger(r,"collisionEnd",{pairs:v.collisionEnd,timestamp:c.timestamp,delta:o}),m._bodiesClearForces(C),t.trigger(r,"afterUpdate",T),r.timing.lastElapsed=i.now()-a,r},m.merge=function(r,o){if(i.extend(r,o),o.world){r.world=o.world,m.clear(r);for(var a=e.allBodies(r.world),u=0;u<a.length;u++){var f=a[u];S.set(f,!1),f.id=i.nextId()}}},m.clear=function(r){d.clear(r.pairs),h.clear(r.detector)},m._bodiesClearForces=function(r){for(var o=r.length,a=0;a<o;a++){var u=r[a];u.force.x=0,u.force.y=0,u.torque=0}},m._bodiesApplyGravity=function(r,o){var a=typeof o.scale<"u"?o.scale:.001,u=r.length;if(!(o.x===0&&o.y===0||a===0))for(var f=0;f<u;f++){var v=r[f];v.ignoreGravity||v.isStatic||v.isSleeping||(v.force.y+=v.mass*o.y*a,v.force.x+=v.mass*o.x*a)}},m._bodiesUpdate=function(r,o){for(var a=r.length,u=0;u<a;u++){var f=r[u];f.isStatic||f.isSleeping||s.update(f,o)}},m._bodiesUpdateVelocities=function(r){for(var o=r.length,a=0;a<o;a++)s.updateVelocities(r[a])},m.wrap=function(r,o){for(var a=0;a<r.length;a+=1){var u=r[a];u.wrapBounds!==null&&s.wrap(u,u.wrapBounds)}for(a=0;a<o.length;a+=1){var f=o[a];f.wrapBounds!==null&&e.wrap(f,f.wrapBounds)}},m.attractors=function(r){for(var o=0;o<r.length;o++){var a=r[o],u=a.attractors;if(u&&u.length>0)for(var f=0;f<r.length;f++){var v=r[f];if(o!==f)for(var c=0;c<u.length;c++){var g=u[c],p=g;i.isFunction(g)&&(p=g(a,v)),p&&s.applyForce(v,v.position,p)}}}}})()},35810:(E,y,n)=>{var m={};E.exports=m;var S=n(53402);(function(){m.on=function(x,h,d){for(var t=h.split(" "),e,l=0;l<t.length;l++)e=t[l],x.events=x.events||{},x.events[e]=x.events[e]||[],x.events[e].push(d);return d},m.off=function(x,h,d){if(!h){x.events={};return}typeof h=="function"&&(d=h,h=S.keys(x.events).join(" "));for(var t=h.split(" "),e=0;e<t.length;e++){var l=x.events[t[e]],i=[];if(d&&l)for(var s=0;s<l.length;s++)l[s]!==d&&i.push(l[s]);x.events[t[e]]=i}},m.trigger=function(x,h,d){var t,e,l,i,s=x.events;if(s&&S.keys(s).length>0){d||(d={}),t=h.split(" ");for(var r=0;r<t.length;r++)if(e=t[r],l=s[e],l){i=S.clone(d,!1),i.name=e,i.source=x;for(var o=0;o<l.length;o++)l[o].apply(x,[i])}}}})()},6790:(E,y,n)=>{var m={};E.exports=m;var S=n(73832),x=n(53402);(function(){m.name="matter-js",m.version="0.20.0",m.uses=[],m.used=[],m.use=function(){S.use(m,Array.prototype.slice.call(arguments))},m.before=function(h,d){return h=h.replace(/^Matter./,""),x.chainPathBefore(m,h,d)},m.after=function(h,d){return h=h.replace(/^Matter./,""),x.chainPathAfter(m,h,d)}})()},73832:(E,y,n)=>{var m={};E.exports=m;var S=n(53402);(function(){m._registry={},m.register=function(x){if(m.isPlugin(x)||S.warn("Plugin.register:",m.toString(x),"does not implement all required fields."),x.name in m._registry){var h=m._registry[x.name],d=m.versionParse(x.version).number,t=m.versionParse(h.version).number;d>t?(S.warn("Plugin.register:",m.toString(h),"was upgraded to",m.toString(x)),m._registry[x.name]=x):d<t?S.warn("Plugin.register:",m.toString(h),"can not be downgraded to",m.toString(x)):x!==h&&S.warn("Plugin.register:",m.toString(x),"is already registered to different plugin object")}else m._registry[x.name]=x;return x},m.resolve=function(x){return m._registry[m.dependencyParse(x).name]},m.toString=function(x){return typeof x=="string"?x:(x.name||"anonymous")+"@"+(x.version||x.range||"0.0.0")},m.isPlugin=function(x){return x&&x.name&&x.version&&x.install},m.isUsed=function(x,h){return x.used.indexOf(h)>-1},m.isFor=function(x,h){var d=x.for&&m.dependencyParse(x.for);return!x.for||h.name===d.name&&m.versionSatisfies(h.version,d.range)},m.use=function(x,h){if(x.uses=(x.uses||[]).concat(h||[]),x.uses.length===0){S.warn("Plugin.use:",m.toString(x),"does not specify any dependencies to install.");return}for(var d=m.dependencies(x),t=S.topologicalSort(d),e=[],l=0;l<t.length;l+=1)if(t[l]!==x.name){var i=m.resolve(t[l]);if(!i){e.push("❌ "+t[l]);continue}m.isUsed(x,i.name)||(m.isFor(i,x)||(S.warn("Plugin.use:",m.toString(i),"is for",i.for,"but installed on",m.toString(x)+"."),i._warned=!0),i.install?i.install(x):(S.warn("Plugin.use:",m.toString(i),"does not specify an install function."),i._warned=!0),i._warned?(e.push("🔶 "+m.toString(i)),delete i._warned):e.push("✅ "+m.toString(i)),x.used.push(i.name))}e.length>0&&!i.silent&&S.info(e.join(" "))},m.dependencies=function(x,h){var d=m.dependencyParse(x),t=d.name;if(h=h||{},!(t in h)){x=m.resolve(x)||x,h[t]=S.map(x.uses||[],function(l){m.isPlugin(l)&&m.register(l);var i=m.dependencyParse(l),s=m.resolve(l);return s&&!m.versionSatisfies(s.version,i.range)?(S.warn("Plugin.dependencies:",m.toString(s),"does not satisfy",m.toString(i),"used by",m.toString(d)+"."),s._warned=!0,x._warned=!0):s||(S.warn("Plugin.dependencies:",m.toString(l),"used by",m.toString(d),"could not be resolved."),x._warned=!0),i.name});for(var e=0;e<h[t].length;e+=1)m.dependencies(h[t][e],h);return h}},m.dependencyParse=function(x){if(S.isString(x)){var h=/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/;return h.test(x)||S.warn("Plugin.dependencyParse:",x,"is not a valid dependency string."),{name:x.split("@")[0],range:x.split("@")[1]||"*"}}return{name:x.name,range:x.range||x.version}},m.versionParse=function(x){var h=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;h.test(x)||S.warn("Plugin.versionParse:",x,"is not a valid version or range.");var d=h.exec(x),t=Number(d[4]),e=Number(d[5]),l=Number(d[6]);return{isRange:!!(d[1]||d[2]),version:d[3],range:x,operator:d[1]||d[2]||"",major:t,minor:e,patch:l,parts:[t,e,l],prerelease:d[7],number:t*1e8+e*1e4+l}},m.versionSatisfies=function(x,h){h=h||"*";var d=m.versionParse(h),t=m.versionParse(x);if(d.isRange){if(d.operator==="*"||x==="*")return!0;if(d.operator===">")return t.number>d.number;if(d.operator===">=")return t.number>=d.number;if(d.operator==="~")return t.major===d.major&&t.minor===d.minor&&t.patch>=d.patch;if(d.operator==="^")return d.major>0?t.major===d.major&&t.number>=d.number:d.minor>0?t.minor===d.minor&&t.patch>=d.patch:t.patch===d.patch}return x===h||x==="*"}})()},13037:(E,y,n)=>{var m={};E.exports=m;var S=n(35810),x=n(48413),h=n(53402);(function(){m._maxFrameDelta=1e3/15,m._frameDeltaFallback=1e3/60,m._timeBufferMargin=1.5,m._elapsedNextEstimate=1,m._smoothingLowerBound=.1,m._smoothingUpperBound=.9,m.create=function(t){var e={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},l=h.extend(e,t);return l.fps=0,l},m.run=function(t,e){return t.timeBuffer=m._frameDeltaFallback,function l(i){t.frameRequestId=m._onNextFrame(t,l),i&&t.enabled&&m.tick(t,e,i)}(),t},m.tick=function(t,e,l){var i=h.now(),s=t.delta,r=0,o=l-t.timeLastTick;if((!o||!t.timeLastTick||o>Math.max(m._maxFrameDelta,t.maxFrameTime))&&(o=t.frameDelta||m._frameDeltaFallback),t.frameDeltaSmoothing){t.frameDeltaHistory.push(o),t.frameDeltaHistory=t.frameDeltaHistory.slice(-t.frameDeltaHistorySize);var a=t.frameDeltaHistory.slice(0).sort(),u=t.frameDeltaHistory.slice(a.length*m._smoothingLowerBound,a.length*m._smoothingUpperBound),f=d(u);o=f||o}t.frameDeltaSnapping&&(o=1e3/Math.round(1e3/o)),t.frameDelta=o,t.timeLastTick=l,t.timeBuffer+=t.frameDelta,t.timeBuffer=h.clamp(t.timeBuffer,0,t.frameDelta+s*m._timeBufferMargin),t.lastUpdatesDeferred=0;var v=t.maxUpdates||Math.ceil(t.maxFrameTime/s),c={timestamp:e.timing.timestamp};S.trigger(t,"beforeTick",c),S.trigger(t,"tick",c);for(var g=h.now();s>0&&t.timeBuffer>=s*m._timeBufferMargin;){S.trigger(t,"beforeUpdate",c),x.update(e,s),S.trigger(t,"afterUpdate",c),t.timeBuffer-=s,r+=1;var p=h.now()-i,T=h.now()-g,C=p+m._elapsedNextEstimate*T/r;if(r>=v||C>t.maxFrameTime){t.lastUpdatesDeferred=Math.round(Math.max(0,t.timeBuffer/s-m._timeBufferMargin));break}}e.timing.lastUpdatesPerFrame=r,S.trigger(t,"afterTick",c),t.frameDeltaHistory.length>=100&&(t.lastUpdatesDeferred&&Math.round(t.frameDelta/s)>v?h.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):t.lastUpdatesDeferred&&h.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof t.isFixed<"u"&&h.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(t.deltaMin||t.deltaMax)&&h.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),t.fps!==0&&h.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},m.stop=function(t){m._cancelNextFrame(t)},m._onNextFrame=function(t,e){if(typeof window<"u"&&window.requestAnimationFrame)t.frameRequestId=window.requestAnimationFrame(e);else throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return t.frameRequestId},m._cancelNextFrame=function(t){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(t.frameRequestId);else throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var d=function(t){for(var e=0,l=t.length,i=0;i<l;i+=1)e+=t[i];return e/l||0};m._mean=d})()},53614:(E,y,n)=>{var m={};E.exports=m;var S=n(22562),x=n(35810),h=n(53402);(function(){m._motionWakeThreshold=.18,m._motionSleepThreshold=.08,m._minBias=.9,m.update=function(d,t){for(var e=t/h._baseDelta,l=m._motionSleepThreshold,i=0;i<d.length;i++){var s=d[i],r=S.getSpeed(s),o=S.getAngularSpeed(s),a=r*r+o*o;if(s.force.x!==0||s.force.y!==0){m.set(s,!1);continue}var u=Math.min(s.motion,a),f=Math.max(s.motion,a);s.motion=m._minBias*u+(1-m._minBias)*f,s.sleepThreshold>0&&s.motion<l?(s.sleepCounter+=1,s.sleepCounter>=s.sleepThreshold/e&&m.set(s,!0)):s.sleepCounter>0&&(s.sleepCounter-=1)}},m.afterCollisions=function(d){for(var t=m._motionSleepThreshold,e=0;e<d.length;e++){var l=d[e];if(l.isActive){var i=l.collision,s=i.bodyA.parent,r=i.bodyB.parent;if(!(s.isSleeping&&r.isSleeping||s.isStatic||r.isStatic)&&(s.isSleeping||r.isSleeping)){var o=s.isSleeping&&!s.isStatic?s:r,a=o===s?r:s;!o.isStatic&&a.motion>t&&m.set(o,!1)}}}},m.set=function(d,t){var e=d.isSleeping;t?(d.isSleeping=!0,d.sleepCounter=d.sleepThreshold,d.positionImpulse.x=0,d.positionImpulse.y=0,d.positionPrev.x=d.position.x,d.positionPrev.y=d.position.y,d.anglePrev=d.angle,d.speed=0,d.angularSpeed=0,d.motion=0,e||x.trigger(d,"sleepStart")):(d.isSleeping=!1,d.sleepCounter=0,e&&x.trigger(d,"sleepEnd"))}})()},66280:(E,y,n)=>{var m={};E.exports=m;var S=n(41598),x=n(53402),h=n(22562),d=n(15647),t=n(31725);(function(){m.rectangle=function(e,l,i,s,r){r=r||{};var o={label:"Rectangle Body",position:{x:e,y:l},vertices:S.fromPath("L 0 0 L "+i+" 0 L "+i+" "+s+" L 0 "+s)};if(r.chamfer){var a=r.chamfer;o.vertices=S.chamfer(o.vertices,a.radius,a.quality,a.qualityMin,a.qualityMax),delete r.chamfer}return h.create(x.extend({},o,r))},m.trapezoid=function(e,l,i,s,r,o){o=o||{},r>=1&&x.warn("Bodies.trapezoid: slope parameter must be < 1."),r*=.5;var a=(1-r*2)*i,u=i*r,f=u+a,v=f+u,c;r<.5?c="L 0 0 L "+u+" "+-s+" L "+f+" "+-s+" L "+v+" 0":c="L 0 0 L "+f+" "+-s+" L "+v+" 0";var g={label:"Trapezoid Body",position:{x:e,y:l},vertices:S.fromPath(c)};if(o.chamfer){var p=o.chamfer;g.vertices=S.chamfer(g.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete o.chamfer}return h.create(x.extend({},g,o))},m.circle=function(e,l,i,s,r){s=s||{};var o={label:"Circle Body",circleRadius:i};r=r||25;var a=Math.ceil(Math.max(10,Math.min(r,i)));return a%2===1&&(a+=1),m.polygon(e,l,a,i,x.extend({},o,s))},m.polygon=function(e,l,i,s,r){if(r=r||{},i<3)return m.circle(e,l,s,r);for(var o=2*Math.PI/i,a="",u=o*.5,f=0;f<i;f+=1){var v=u+f*o,c=Math.cos(v)*s,g=Math.sin(v)*s;a+="L "+c.toFixed(3)+" "+g.toFixed(3)+" "}var p={label:"Polygon Body",position:{x:e,y:l},vertices:S.fromPath(a)};if(r.chamfer){var T=r.chamfer;p.vertices=S.chamfer(p.vertices,T.radius,T.quality,T.qualityMin,T.qualityMax),delete r.chamfer}return h.create(x.extend({},p,r))},m.fromVertices=function(e,l,i,s,r,o,a,u){var f=x.getDecomp(),v,c,g,p,T,C,M,A,R,P,L;for(v=!!(f&&f.quickDecomp),s=s||{},g=[],r=typeof r<"u"?r:!1,o=typeof o<"u"?o:.01,a=typeof a<"u"?a:10,u=typeof u<"u"?u:.01,x.isArray(i[0])||(i=[i]),P=0;P<i.length;P+=1)if(C=i[P],p=S.isConvex(C),T=!p,T&&!v&&x.warnOnce("Bodies.fromVertices: Install the 'poly-decomp' library and use Common.setDecomp or provide 'decomp' as a global to decompose concave vertices."),p||!v)p?C=S.clockwiseSort(C):C=S.hull(C),g.push({position:{x:e,y:l},vertices:C});else{var F=C.map(function(b){return[b.x,b.y]});f.makeCCW(F),o!==!1&&f.removeCollinearPoints(F,o),u!==!1&&f.removeDuplicatePoints&&f.removeDuplicatePoints(F,u);var w=f.quickDecomp(F);for(M=0;M<w.length;M++){var O=w[M],B=O.map(function(b){return{x:b[0],y:b[1]}});a>0&&S.area(B)<a||g.push({position:S.centre(B),vertices:B})}}for(M=0;M<g.length;M++)g[M]=h.create(x.extend(g[M],s));if(r){var I=5;for(M=0;M<g.length;M++){var D=g[M];for(A=M+1;A<g.length;A++){var N=g[A];if(d.overlaps(D.bounds,N.bounds)){var z=D.vertices,V=N.vertices;for(R=0;R<D.vertices.length;R++)for(L=0;L<N.vertices.length;L++){var U=t.magnitudeSquared(t.sub(z[(R+1)%z.length],V[L])),G=t.magnitudeSquared(t.sub(z[R],V[(L+1)%V.length]));U<I&&G<I&&(z[R].isInternal=!0,V[L].isInternal=!0)}}}}}return g.length>1?(c=h.create(x.extend({parts:g.slice(0)},s)),h.setPosition(c,{x:e,y:l}),c):g[0]},m.flagCoincidentParts=function(e,l){l===void 0&&(l=5);for(var i=0;i<e.length;i++)for(var s=e[i],r=i+1;r<e.length;r++){var o=e[r];if(d.overlaps(s.bounds,o.bounds))for(var a=s.vertices,u=o.vertices,f=0;f<s.vertices.length;f++)for(var v=0;v<o.vertices.length;v++){var c=t.magnitudeSquared(t.sub(a[(f+1)%a.length],u[v])),g=t.magnitudeSquared(t.sub(a[f],u[(v+1)%u.length]));c<l&&g<l&&(a[f].isInternal=!0,u[v].isInternal=!0)}}return e}})()},74116:(E,y,n)=>{var m={};E.exports=m;var S=n(69351),x=n(48140),h=n(53402),d=n(22562),t=n(66280);(function(){m.stack=function(e,l,i,s,r,o,a){for(var u=S.create({label:"Stack"}),f=e,v=l,c,g=0,p=0;p<s;p++){for(var T=0,C=0;C<i;C++){var M=a(f,v,C,p,c,g);if(M){var A=M.bounds.max.y-M.bounds.min.y,R=M.bounds.max.x-M.bounds.min.x;A>T&&(T=A),d.translate(M,{x:R*.5,y:A*.5}),f=M.bounds.max.x+r,S.addBody(u,M),c=M,g+=1}else f+=r}v+=T+o,f=e}return u},m.chain=function(e,l,i,s,r,o){for(var a=e.bodies,u=1;u<a.length;u++){var f=a[u-1],v=a[u],c=f.bounds.max.y-f.bounds.min.y,g=f.bounds.max.x-f.bounds.min.x,p=v.bounds.max.y-v.bounds.min.y,T=v.bounds.max.x-v.bounds.min.x,C={bodyA:f,pointA:{x:g*l,y:c*i},bodyB:v,pointB:{x:T*s,y:p*r}},M=h.extend(C,o);S.addConstraint(e,x.create(M))}return e.label+=" Chain",e},m.mesh=function(e,l,i,s,r){var o=e.bodies,a,u,f,v,c;for(a=0;a<i;a++){for(u=1;u<l;u++)f=o[u-1+a*l],v=o[u+a*l],S.addConstraint(e,x.create(h.extend({bodyA:f,bodyB:v},r)));if(a>0)for(u=0;u<l;u++)f=o[u+(a-1)*l],v=o[u+a*l],S.addConstraint(e,x.create(h.extend({bodyA:f,bodyB:v},r))),s&&u>0&&(c=o[u-1+(a-1)*l],S.addConstraint(e,x.create(h.extend({bodyA:c,bodyB:v},r)))),s&&u<l-1&&(c=o[u+1+(a-1)*l],S.addConstraint(e,x.create(h.extend({bodyA:c,bodyB:v},r))))}return e.label+=" Mesh",e},m.pyramid=function(e,l,i,s,r,o,a){return m.stack(e,l,i,s,r,o,function(u,f,v,c,g,p){var T=Math.min(s,Math.ceil(i/2)),C=g?g.bounds.max.x-g.bounds.min.x:0;if(!(c>T)){c=T-c;var M=c,A=i-1-c;if(!(v<M||v>A)){p===1&&d.translate(g,{x:(v+(i%2===1?1:-1))*C,y:0});var R=g?v*C:0;return a(e+R+v*r,f,v,c,g,p)}}})},m.newtonsCradle=function(e,l,i,s,r){for(var o=S.create({label:"Newtons Cradle"}),a=0;a<i;a++){var u=1.9,f=t.circle(e+a*(s*u),l+r,s,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),v=x.create({pointA:{x:e+a*(s*u),y:l},bodyB:f});S.addBody(o,f),S.addConstraint(o,v)}return o},m.car=function(e,l,i,s,r){var o=d.nextGroup(!0),a=20,u=-i*.5+a,f=i*.5-a,v=0,c=S.create({label:"Car"}),g=t.rectangle(e,l,i,s,{collisionFilter:{group:o},chamfer:{radius:s*.5},density:2e-4}),p=t.circle(e+u,l+v,r,{collisionFilter:{group:o},friction:.8}),T=t.circle(e+f,l+v,r,{collisionFilter:{group:o},friction:.8}),C=x.create({bodyB:g,pointB:{x:u,y:v},bodyA:p,stiffness:1,length:0}),M=x.create({bodyB:g,pointB:{x:f,y:v},bodyA:T,stiffness:1,length:0});return S.addBody(c,g),S.addBody(c,p),S.addBody(c,T),S.addConstraint(c,C),S.addConstraint(c,M),c},m.softBody=function(e,l,i,s,r,o,a,u,f,v){f=h.extend({inertia:1/0},f),v=h.extend({stiffness:.2,render:{type:"line",anchors:!1}},v);var c=m.stack(e,l,i,s,r,o,function(g,p){return t.circle(g,p,u,f)});return m.mesh(c,i,s,a,v),c.label="Soft Body",c}})()},66615:(E,y,n)=>{var m={};E.exports=m;var S=n(31725),x=n(53402);(function(){m.fromVertices=function(h){for(var d={},t=0;t<h.length;t++){var e=(t+1)%h.length,l=S.normalise({x:h[e].y-h[t].y,y:h[t].x-h[e].x}),i=l.y===0?1/0:l.x/l.y;i=i.toFixed(3).toString(),d[i]=l}return x.values(d)},m.rotate=function(h,d){if(d!==0)for(var t=Math.cos(d),e=Math.sin(d),l=0;l<h.length;l++){var i=h[l],s;s=i.x*t-i.y*e,i.y=i.x*e+i.y*t,i.x=s}}})()},15647:E=>{var y={};E.exports=y,function(){y.create=function(n){var m={min:{x:0,y:0},max:{x:0,y:0}};return n&&y.update(m,n),m},y.update=function(n,m,S){n.min.x=1/0,n.max.x=-1/0,n.min.y=1/0,n.max.y=-1/0;for(var x=0;x<m.length;x++){var h=m[x];h.x>n.max.x&&(n.max.x=h.x),h.x<n.min.x&&(n.min.x=h.x),h.y>n.max.y&&(n.max.y=h.y),h.y<n.min.y&&(n.min.y=h.y)}S&&(S.x>0?n.max.x+=S.x:n.min.x+=S.x,S.y>0?n.max.y+=S.y:n.min.y+=S.y)},y.contains=function(n,m){return m.x>=n.min.x&&m.x<=n.max.x&&m.y>=n.min.y&&m.y<=n.max.y},y.overlaps=function(n,m){return n.min.x<=m.max.x&&n.max.x>=m.min.x&&n.max.y>=m.min.y&&n.min.y<=m.max.y},y.translate=function(n,m){n.min.x+=m.x,n.max.x+=m.x,n.min.y+=m.y,n.max.y+=m.y},y.shift=function(n,m){var S=n.max.x-n.min.x,x=n.max.y-n.min.y;n.min.x=m.x,n.max.x=m.x+S,n.min.y=m.y,n.max.y=m.y+x},y.wrap=function(n,m,S){var x=null,h=null;if(typeof m.min.x<"u"&&typeof m.max.x<"u"&&(n.min.x>m.max.x?x=m.min.x-n.max.x:n.max.x<m.min.x&&(x=m.max.x-n.min.x)),typeof m.min.y<"u"&&typeof m.max.y<"u"&&(n.min.y>m.max.y?h=m.min.y-n.max.y:n.max.y<m.min.y&&(h=m.max.y-n.min.y)),x!==null||h!==null)return{x:x||0,y:h||0}}}()},74058:(E,y,n)=>{var m={};E.exports=m,n(15647);var S=n(53402);(function(){m.pathToVertices=function(x,h){typeof window<"u"&&!("SVGPathSeg"in window)&&S.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var d,t,e,l,i,s,r,o,a,u,f=[],v,c,g=0,p=0,T=0;h=h||15;var C=function(A,R,P){var L=P%2===1&&P>1;if(!a||A!=a.x||R!=a.y){a&&L?(v=a.x,c=a.y):(v=0,c=0);var F={x:v+A,y:c+R};(L||!a)&&(a=F),f.push(F),p=v+A,T=c+R}},M=function(A){var R=A.pathSegTypeAsLetter.toUpperCase();if(R!=="Z"){switch(R){case"M":case"L":case"T":case"C":case"S":case"Q":p=A.x,T=A.y;break;case"H":p=A.x;break;case"V":T=A.y;break}C(p,T,A.pathSegType)}};for(m._svgPathToAbsolute(x),e=x.getTotalLength(),s=[],d=0;d<x.pathSegList.numberOfItems;d+=1)s.push(x.pathSegList.getItem(d));for(r=s.concat();g<e;){if(u=x.getPathSegAtLength(g),i=s[u],i!=o){for(;r.length&&r[0]!=i;)M(r.shift());o=i}switch(i.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":l=x.getPointAtLength(g),C(l.x,l.y,0);break}g+=h}for(d=0,t=r.length;d<t;++d)M(r[d]);return f},m._svgPathToAbsolute=function(x){for(var h,d,t,e,l,i,s=x.pathSegList,r=0,o=0,a=s.numberOfItems,u=0;u<a;++u){var f=s.getItem(u),v=f.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(v))"x"in f&&(r=f.x),"y"in f&&(o=f.y);else switch("x1"in f&&(t=r+f.x1),"x2"in f&&(l=r+f.x2),"y1"in f&&(e=o+f.y1),"y2"in f&&(i=o+f.y2),"x"in f&&(r+=f.x),"y"in f&&(o+=f.y),v){case"m":s.replaceItem(x.createSVGPathSegMovetoAbs(r,o),u);break;case"l":s.replaceItem(x.createSVGPathSegLinetoAbs(r,o),u);break;case"h":s.replaceItem(x.createSVGPathSegLinetoHorizontalAbs(r),u);break;case"v":s.replaceItem(x.createSVGPathSegLinetoVerticalAbs(o),u);break;case"c":s.replaceItem(x.createSVGPathSegCurvetoCubicAbs(r,o,t,e,l,i),u);break;case"s":s.replaceItem(x.createSVGPathSegCurvetoCubicSmoothAbs(r,o,l,i),u);break;case"q":s.replaceItem(x.createSVGPathSegCurvetoQuadraticAbs(r,o,t,e),u);break;case"t":s.replaceItem(x.createSVGPathSegCurvetoQuadraticSmoothAbs(r,o),u);break;case"a":s.replaceItem(x.createSVGPathSegArcAbs(r,o,f.r1,f.r2,f.angle,f.largeArcFlag,f.sweepFlag),u);break;case"z":case"Z":r=h,o=d;break}(v=="M"||v=="m")&&(h=r,d=o)}}})()},31725:E=>{var y={};E.exports=y,function(){y.create=function(n,m){return{x:n||0,y:m||0}},y.clone=function(n){return{x:n.x,y:n.y}},y.magnitude=function(n){return Math.sqrt(n.x*n.x+n.y*n.y)},y.magnitudeSquared=function(n){return n.x*n.x+n.y*n.y},y.rotate=function(n,m,S){var x=Math.cos(m),h=Math.sin(m);S||(S={});var d=n.x*x-n.y*h;return S.y=n.x*h+n.y*x,S.x=d,S},y.rotateAbout=function(n,m,S,x){var h=Math.cos(m),d=Math.sin(m);x||(x={});var t=S.x+((n.x-S.x)*h-(n.y-S.y)*d);return x.y=S.y+((n.x-S.x)*d+(n.y-S.y)*h),x.x=t,x},y.normalise=function(n){var m=y.magnitude(n);return m===0?{x:0,y:0}:{x:n.x/m,y:n.y/m}},y.dot=function(n,m){return n.x*m.x+n.y*m.y},y.cross=function(n,m){return n.x*m.y-n.y*m.x},y.cross3=function(n,m,S){return(m.x-n.x)*(S.y-n.y)-(m.y-n.y)*(S.x-n.x)},y.add=function(n,m,S){return S||(S={}),S.x=n.x+m.x,S.y=n.y+m.y,S},y.sub=function(n,m,S){return S||(S={}),S.x=n.x-m.x,S.y=n.y-m.y,S},y.mult=function(n,m){return{x:n.x*m,y:n.y*m}},y.div=function(n,m){return{x:n.x/m,y:n.y/m}},y.perp=function(n,m){return m=m===!0?-1:1,{x:m*-n.y,y:m*n.x}},y.neg=function(n){return{x:-n.x,y:-n.y}},y.angle=function(n,m){return Math.atan2(m.y-n.y,m.x-n.x)},y._temp=[y.create(),y.create(),y.create(),y.create(),y.create(),y.create()]}()},41598:(E,y,n)=>{var m={};E.exports=m;var S=n(31725),x=n(53402);(function(){m.create=function(h,d){for(var t=[],e=0;e<h.length;e++){var l=h[e],i={x:l.x,y:l.y,index:e,body:d,isInternal:!1};t.push(i)}return t},m.fromPath=function(h,d){var t=/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,e=[];return h.replace(t,function(l,i,s){e.push({x:parseFloat(i),y:parseFloat(s)})}),m.create(e,d)},m.centre=function(h){for(var d=m.area(h,!0),t={x:0,y:0},e,l,i,s=0;s<h.length;s++)i=(s+1)%h.length,e=S.cross(h[s],h[i]),l=S.mult(S.add(h[s],h[i]),e),t=S.add(t,l);return S.div(t,6*d)},m.mean=function(h){for(var d={x:0,y:0},t=0;t<h.length;t++)d.x+=h[t].x,d.y+=h[t].y;return S.div(d,h.length)},m.area=function(h,d){for(var t=0,e=h.length-1,l=0;l<h.length;l++)t+=(h[e].x-h[l].x)*(h[e].y+h[l].y),e=l;return d?t/2:Math.abs(t)/2},m.inertia=function(h,d){for(var t=0,e=0,l=h,i,s,r=0;r<l.length;r++)s=(r+1)%l.length,i=Math.abs(S.cross(l[s],l[r])),t+=i*(S.dot(l[s],l[s])+S.dot(l[s],l[r])+S.dot(l[r],l[r])),e+=i;return d/6*(t/e)},m.translate=function(h,d,t){t=typeof t<"u"?t:1;var e=h.length,l=d.x*t,i=d.y*t,s;for(s=0;s<e;s++)h[s].x+=l,h[s].y+=i;return h},m.rotate=function(h,d,t){if(d!==0){var e=Math.cos(d),l=Math.sin(d),i=t.x,s=t.y,r=h.length,o,a,u,f;for(f=0;f<r;f++)o=h[f],a=o.x-i,u=o.y-s,o.x=i+(a*e-u*l),o.y=s+(a*l+u*e);return h}},m.contains=function(h,d){for(var t=d.x,e=d.y,l=h.length,i=h[l-1],s,r=0;r<l;r++){if(s=h[r],(t-i.x)*(s.y-i.y)+(e-i.y)*(i.x-s.x)>0)return!1;i=s}return!0},m.scale=function(h,d,t,e){if(d===1&&t===1)return h;e=e||m.centre(h);for(var l,i,s=0;s<h.length;s++)l=h[s],i=S.sub(l,e),h[s].x=e.x+i.x*d,h[s].y=e.y+i.y*t;return h},m.chamfer=function(h,d,t,e,l){typeof d=="number"?d=[d]:d=d||[8],t=typeof t<"u"?t:-1,e=e||2,l=l||14;for(var i=[],s=0;s<h.length;s++){var r=h[s-1>=0?s-1:h.length-1],o=h[s],a=h[(s+1)%h.length],u=d[s<d.length?s:d.length-1];if(u===0){i.push(o);continue}var f=S.normalise({x:o.y-r.y,y:r.x-o.x}),v=S.normalise({x:a.y-o.y,y:o.x-a.x}),c=Math.sqrt(2*Math.pow(u,2)),g=S.mult(x.clone(f),u),p=S.normalise(S.mult(S.add(f,v),.5)),T=S.sub(o,S.mult(p,c)),C=t;t===-1&&(C=Math.pow(u,.32)*1.75),C=x.clamp(C,e,l),C%2===1&&(C+=1);for(var M=Math.acos(S.dot(f,v)),A=M/C,R=0;R<C;R++)i.push(S.add(S.rotate(g,A*R),T))}return i},m.clockwiseSort=function(h){var d=m.mean(h);return h.sort(function(t,e){return S.angle(d,t)-S.angle(d,e)}),h},m.isConvex=function(h){var d=0,t=h.length,e,l,i,s;if(t<3)return null;for(e=0;e<t;e++)if(l=(e+1)%t,i=(e+2)%t,s=(h[l].x-h[e].x)*(h[i].y-h[l].y),s-=(h[l].y-h[e].y)*(h[i].x-h[l].x),s<0?d|=1:s>0&&(d|=2),d===3)return!1;return d!==0?!0:null},m.hull=function(h){var d=[],t=[],e,l;for(h=h.slice(0),h.sort(function(i,s){var r=i.x-s.x;return r!==0?r:i.y-s.y}),l=0;l<h.length;l+=1){for(e=h[l];t.length>=2&&S.cross3(t[t.length-2],t[t.length-1],e)<=0;)t.pop();t.push(e)}for(l=h.length-1;l>=0;l-=1){for(e=h[l];d.length>=2&&S.cross3(d[d.length-2],d[d.length-1],e)<=0;)d.pop();d.push(e)}return d.pop(),t.pop(),d.concat(t)}})()},55973:E=>{/**
|
||
* @author Stefan Hedman <schteppe@gmail.com> (http://steffe.se)
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={decomp:M,quickDecomp:L,isSimple:R,removeCollinearPoints:F,removeDuplicatePoints:w,makeCCW:a};function y(I,D,N){N=N||0;var z=[0,0],V,U,G,b,Y,W,H;return V=I[1][1]-I[0][1],U=I[0][0]-I[1][0],G=V*I[0][0]+U*I[0][1],b=D[1][1]-D[0][1],Y=D[0][0]-D[1][0],W=b*D[0][0]+Y*D[0][1],H=V*Y-b*U,O(H,0,N)||(z[0]=(Y*G-U*W)/H,z[1]=(V*W-b*G)/H),z}function n(I,D,N,z){var V=D[0]-I[0],U=D[1]-I[1],G=z[0]-N[0],b=z[1]-N[1];if(G*U-b*V===0)return!1;var Y=(V*(N[1]-I[1])+U*(I[0]-N[0]))/(G*U-b*V),W=(G*(I[1]-N[1])+b*(N[0]-I[0]))/(b*V-G*U);return Y>=0&&Y<=1&&W>=0&&W<=1}function m(I,D,N){return(D[0]-I[0])*(N[1]-I[1])-(N[0]-I[0])*(D[1]-I[1])}function S(I,D,N){return m(I,D,N)>0}function x(I,D,N){return m(I,D,N)>=0}function h(I,D,N){return m(I,D,N)<0}function d(I,D,N){return m(I,D,N)<=0}var t=[],e=[];function l(I,D,N,z){if(z){var V=t,U=e;V[0]=D[0]-I[0],V[1]=D[1]-I[1],U[0]=N[0]-D[0],U[1]=N[1]-D[1];var G=V[0]*U[0]+V[1]*U[1],b=Math.sqrt(V[0]*V[0]+V[1]*V[1]),Y=Math.sqrt(U[0]*U[0]+U[1]*U[1]),W=Math.acos(G/(b*Y));return W<z}else return m(I,D,N)===0}function i(I,D){var N=D[0]-I[0],z=D[1]-I[1];return N*N+z*z}function s(I,D){var N=I.length;return I[D<0?D%N+N:D%N]}function r(I){I.length=0}function o(I,D,N,z){for(var V=N;V<z;V++)I.push(D[V])}function a(I){for(var D=0,N=I,z=1;z<I.length;++z)(N[z][1]<N[D][1]||N[z][1]===N[D][1]&&N[z][0]>N[D][0])&&(D=z);return S(s(I,D-1),s(I,D),s(I,D+1))?!1:(u(I),!0)}function u(I){for(var D=[],N=I.length,z=0;z!==N;z++)D.push(I.pop());for(var z=0;z!==N;z++)I[z]=D[z]}function f(I,D){return h(s(I,D-1),s(I,D),s(I,D+1))}var v=[],c=[];function g(I,D,N){var z,V,U=v,G=c;if(x(s(I,D+1),s(I,D),s(I,N))&&d(s(I,D-1),s(I,D),s(I,N)))return!1;V=i(s(I,D),s(I,N));for(var b=0;b!==I.length;++b)if(!((b+1)%I.length===D||b===D)&&x(s(I,D),s(I,N),s(I,b+1))&&d(s(I,D),s(I,N),s(I,b))&&(U[0]=s(I,D),U[1]=s(I,N),G[0]=s(I,b),G[1]=s(I,b+1),z=y(U,G),i(s(I,D),z)<V))return!1;return!0}function p(I,D,N){for(var z=0;z!==I.length;++z)if(!(z===D||z===N||(z+1)%I.length===D||(z+1)%I.length===N)&&n(s(I,D),s(I,N),s(I,z),s(I,z+1)))return!1;return!0}function T(I,D,N,z){var V=z||[];if(r(V),D<N)for(var U=D;U<=N;U++)V.push(I[U]);else{for(var U=0;U<=N;U++)V.push(I[U]);for(var U=D;U<I.length;U++)V.push(I[U])}return V}function C(I){for(var D=[],N=[],z=[],V=[],U=Number.MAX_VALUE,G=0;G<I.length;++G)if(f(I,G)){for(var b=0;b<I.length;++b)if(g(I,G,b)){N=C(T(I,G,b,V)),z=C(T(I,b,G,V));for(var Y=0;Y<z.length;Y++)N.push(z[Y]);N.length<U&&(D=N,U=N.length,D.push([s(I,G),s(I,b)]))}}return D}function M(I){var D=C(I);return D.length>0?A(I,D):[I]}function A(I,D){if(D.length===0)return[I];if(D instanceof Array&&D.length&&D[0]instanceof Array&&D[0].length===2&&D[0][0]instanceof Array){for(var N=[I],z=0;z<D.length;z++)for(var V=D[z],U=0;U<N.length;U++){var G=N[U],b=A(G,V);if(b){N.splice(U,1),N.push(b[0],b[1]);break}}return N}else{var V=D,z=I.indexOf(V[0]),U=I.indexOf(V[1]);return z!==-1&&U!==-1?[T(I,z,U),T(I,U,z)]:!1}}function R(I){var D=I,N;for(N=0;N<D.length-1;N++)for(var z=0;z<N-1;z++)if(n(D[N],D[N+1],D[z],D[z+1]))return!1;for(N=1;N<D.length-2;N++)if(n(D[0],D[D.length-1],D[N],D[N+1]))return!1;return!0}function P(I,D,N,z,V){V=V||0;var U=D[1]-I[1],G=I[0]-D[0],b=U*I[0]+G*I[1],Y=z[1]-N[1],W=N[0]-z[0],H=Y*N[0]+W*N[1],X=U*W-Y*G;return O(X,0,V)?[0,0]:[(W*b-G*H)/X,(U*H-Y*b)/X]}function L(I,D,N,z,V,U,G){U=U||100,G=G||0,V=V||25,D=typeof D<"u"?D:[],N=N||[],z=z||[];var b=[0,0],Y=[0,0],W=[0,0],H=0,X=0,K=0,Z=0,Q=0,j=0,J=0,tt=[],k=[],q=I,_=I;if(_.length<3)return D;if(G++,G>U)return console.warn("quickDecomp: max level ("+U+") reached."),D;for(var rt=0;rt<I.length;++rt)if(f(q,rt)){N.push(q[rt]),H=X=Number.MAX_VALUE;for(var at=0;at<I.length;++at)S(s(q,rt-1),s(q,rt),s(q,at))&&d(s(q,rt-1),s(q,rt),s(q,at-1))&&(W=P(s(q,rt-1),s(q,rt),s(q,at),s(q,at-1)),h(s(q,rt+1),s(q,rt),W)&&(K=i(q[rt],W),K<X&&(X=K,Y=W,j=at))),S(s(q,rt+1),s(q,rt),s(q,at+1))&&d(s(q,rt+1),s(q,rt),s(q,at))&&(W=P(s(q,rt+1),s(q,rt),s(q,at),s(q,at+1)),S(s(q,rt-1),s(q,rt),W)&&(K=i(q[rt],W),K<H&&(H=K,b=W,Q=at)));if(j===(Q+1)%I.length)W[0]=(Y[0]+b[0])/2,W[1]=(Y[1]+b[1])/2,z.push(W),rt<Q?(o(tt,q,rt,Q+1),tt.push(W),k.push(W),j!==0&&o(k,q,j,q.length),o(k,q,0,rt+1)):(rt!==0&&o(tt,q,rt,q.length),o(tt,q,0,Q+1),tt.push(W),k.push(W),o(k,q,j,rt+1));else{if(j>Q&&(Q+=I.length),Z=Number.MAX_VALUE,Q<j)return D;for(var at=j;at<=Q;++at)x(s(q,rt-1),s(q,rt),s(q,at))&&d(s(q,rt+1),s(q,rt),s(q,at))&&(K=i(s(q,rt),s(q,at)),K<Z&&p(q,rt,at)&&(Z=K,J=at%I.length));rt<J?(o(tt,q,rt,J+1),J!==0&&o(k,q,J,_.length),o(k,q,0,rt+1)):(rt!==0&&o(tt,q,rt,_.length),o(tt,q,0,J+1),o(k,q,J,rt+1))}return tt.length<k.length?(L(tt,D,N,z,V,U,G),L(k,D,N,z,V,U,G)):(L(k,D,N,z,V,U,G),L(tt,D,N,z,V,U,G)),D}return D.push(I),D}function F(I,D){for(var N=0,z=I.length-1;I.length>3&&z>=0;--z)l(s(I,z-1),s(I,z),s(I,z+1),D)&&(I.splice(z%I.length,1),N++);return N}function w(I,D){for(var N=I.length-1;N>=1;--N)for(var z=I[N],V=N-1;V>=0;--V)if(B(z,I[V],D)){I.splice(N,1);continue}}function O(I,D,N){return N=N||0,Math.abs(I-D)<=N}function B(I,D,N){return O(I[0],D[0],N)&&O(I[1],D[1],N)}},52018:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h){this.pluginManager=h,this.game=h.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});E.exports=S},42363:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};y.DefaultScene.push("CameraManager3D"),y.Global.push("facebook"),E.exports=y},37277:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={},n={},m={};m.register=function(S,x,h,d){d===void 0&&(d=!1),y[S]={plugin:x,mapping:h,custom:d}},m.registerCustom=function(S,x,h,d){n[S]={plugin:x,mapping:h,data:d}},m.hasCore=function(S){return y.hasOwnProperty(S)},m.hasCustom=function(S){return n.hasOwnProperty(S)},m.getCore=function(S){return y[S]},m.getCustom=function(S){return n[S]},m.getCustomClass=function(S){return n.hasOwnProperty(S)?n[S].plugin:null},m.remove=function(S){y.hasOwnProperty(S)&&delete y[S]},m.removeCustom=function(S){n.hasOwnProperty(S)&&delete n[S]},m.destroyCorePlugins=function(){for(var S in y)y.hasOwnProperty(S)&&delete y[S]},m.destroyCustomPlugins=function(){for(var S in n)n.hasOwnProperty(S)&&delete n[S]},E.exports=m},77332:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(8443),x=n(50792),h=n(74099),d=n(44603),t=n(39429),e=n(95540),l=n(37277),i=n(72905),s=n(8054),r=new m({Extends:x,initialize:function(a){x.call(this),this.game=a,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],a.isBooted||a.config.renderType===s.HEADLESS?this.boot():a.events.once(S.BOOT,this.boot,this)},boot:function(){var o,a,u,f,v,c,g,p=this.game.config,T=p.installGlobalPlugins;for(T=T.concat(this._pendingGlobal),o=0;o<T.length;o++)a=T[o],u=e(a,"key",null),f=e(a,"plugin",null),v=e(a,"start",!1),c=e(a,"mapping",null),g=e(a,"data",null),u&&(f?this.install(u,f,v,c,g):console.warn("Missing `plugin` for key: "+u));for(T=p.installScenePlugins,T=T.concat(this._pendingScene),o=0;o<T.length;o++)a=T[o],u=e(a,"key",null),f=e(a,"plugin",null),c=e(a,"mapping",null),u&&(f?this.installScenePlugin(u,f,c):console.warn("Missing `plugin` for key: "+u));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(S.DESTROY,this.destroy,this)},addToScene:function(o,a,u){var f,v,c,g=this.game,p=o.scene,T=o.settings.map,C=o.settings.isBooted;for(f=0;f<a.length;f++)v=a[f],g[v]?(o[v]=g[v],T.hasOwnProperty(v)&&(p[T[v]]=o[v])):v==="game"&&T.hasOwnProperty(v)&&(p[T[v]]=g);for(var M=0;M<u.length;M++)for(c=u[M],f=0;f<c.length;f++)if(v=c[f],!!l.hasCore(v)){var A=l.getCore(v),R=A.mapping,P=new A.plugin(p,this,R);o[R]=P,A.custom?p[R]=P:T.hasOwnProperty(R)&&(p[T[R]]=P),C&&P.boot()}for(c=this.plugins,f=0;f<c.length;f++){var L=c[f];L.mapping&&(p[L.mapping]=L.plugin)}},getDefaultScenePlugins:function(){var o=this.game.config.defaultPlugins;return o=o.concat(this.scenePlugins),o},installScenePlugin:function(o,a,u,f,v){if(v===void 0&&(v=!1),typeof a!="function"){console.warn("Invalid Scene Plugin: "+o);return}if(l.hasCore(o)||l.register(o,a,u,!0),this.scenePlugins.indexOf(o)===-1)this.scenePlugins.push(o);else if(!v&&l.hasCore(o)){console.warn("Scene Plugin key in use: "+o);return}if(f){var c=new a(f,this,o);f.sys[o]=c,u&&u!==""&&(f[u]=c),c.boot()}},install:function(o,a,u,f,v){if(u===void 0&&(u=!1),f===void 0&&(f=null),v===void 0&&(v=null),typeof a!="function")return console.warn("Invalid Plugin: "+o),null;if(l.hasCustom(o))return console.warn("Plugin key in use: "+o),null;if(f!==null&&(u=!0),!this.game.isBooted)this._pendingGlobal.push({key:o,plugin:a,start:u,mapping:f,data:v});else if(l.registerCustom(o,a,f,v),u)return this.start(o);return null},getIndex:function(o){for(var a=this.plugins,u=0;u<a.length;u++){var f=a[u];if(f.key===o)return u}return-1},getEntry:function(o){var a=this.getIndex(o);if(a!==-1)return this.plugins[a]},isActive:function(o){var a=this.getEntry(o);return a&&a.active},start:function(o,a){a===void 0&&(a=o);var u=this.getEntry(a);return u&&!u.active?(u.active=!0,u.plugin.start()):u||(u=this.createEntry(o,a)),u?u.plugin:null},createEntry:function(o,a){var u=l.getCustom(o);if(u){var f=new u.plugin(this);u={key:a,plugin:f,active:!0,mapping:u.mapping,data:u.data},this.plugins.push(u),f.init(u.data),f.start()}return u},stop:function(o){var a=this.getEntry(o);return a&&a.active&&(a.active=!1,a.plugin.stop()),this},get:function(o,a){a===void 0&&(a=!0);var u=this.getEntry(o);if(u)return u.plugin;var f=this.getClass(o);return f&&a?(u=this.createEntry(o,o),u?u.plugin:null):f||null},getClass:function(o){return l.getCustomClass(o)},removeGlobalPlugin:function(o){var a=this.getEntry(o);a&&i(this.plugins,a),l.removeCustom(o)},removeScenePlugin:function(o){i(this.scenePlugins,o),l.remove(o)},registerGameObject:function(o,a,u){return a&&t.register(o,a),u&&d.register(o,u),this},removeGameObject:function(o,a,u){return a===void 0&&(a=!0),u===void 0&&(u=!0),a&&t.remove(o),u&&d.remove(o),this},registerFileType:function(o,a,u){h.register(o,a),u&&u.sys.load&&(u.sys.load[o]=a)},destroy:function(){for(var o=0;o<this.plugins.length;o++)this.plugins[o].plugin.destroy();l.destroyCustomPlugins(),this.game.noReturn&&l.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});E.exports=r},45145:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
|
||
*/var m=n(52018),S=n(83419),x=n(44594),h=new S({Extends:m,initialize:function(t,e,l){m.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=l,t.sys.events.once(x.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});E.exports=h},18922:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={BasePlugin:n(52018),DefaultPlugins:n(42363),PluginCache:n(37277),PluginManager:n(77332),ScenePlugin:n(45145)}},63595:()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(E){const y=performance.now(),n=this.getVideoPlaybackQuality(),m=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames,S=(x,h)=>{const d=this.getVideoPlaybackQuality(),t=this.mozPresentedFrames||this.mozPaintedFrames||d.totalVideoFrames-d.droppedVideoFrames;if(t>m){const e=this.mozFrameDelay||d.totalFrameDelay-n.totalFrameDelay||0,l=h-x;E(h,{presentationTime:h+e*1e3,expectedDisplayTime:h+l,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+l/1e3,presentedFrames:t,processingDuration:e}),delete this._rvfcpolyfillmap[y]}else this._rvfcpolyfillmap[y]=requestAnimationFrame(e=>S(h,e))};return this._rvfcpolyfillmap[y]=requestAnimationFrame(x=>S(y,x)),y},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(E){cancelAnimationFrame(this._rvfcpolyfillmap[E]),delete this._rvfcpolyfillmap[E]})},10312:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.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:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={DEFAULT:0,LINEAR:0,NEAREST:1};E.exports=y},68627:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19715),S=n(32880),x=n(83419),h=n(8054),d=n(50792),t=n(92503),e=n(56373),l=n(97480),i=n(69442),s=n(8443),r=n(61340),o=new x({Extends:d,initialize:function(u){d.call(this);var f=u.config;this.config={clearBeforeRender:f.clearBeforeRender,backgroundColor:f.backgroundColor,antialias:f.antialias,roundPixels:f.roundPixels,transparent:f.transparent},this.game=u,this.type=h.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=u.canvas;var v={alpha:f.transparent,desynchronized:f.desynchronized,willReadFrequently:!1};this.gameContext=f.context?f.context:this.gameCanvas.getContext("2d",v),this.currentContext=this.gameContext,this.antialias=f.antialias,this.blendModes=e(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new r,this._tempMatrix2=new r,this._tempMatrix3=new r,this.isBooted=!1,this.init()},init:function(){var a=this.game;a.events.once(s.BOOT,function(){var u=this.config;if(!u.transparent){var f=this.gameContext,v=this.gameCanvas;f.fillStyle=u.backgroundColor.rgba,f.fillRect(0,0,v.width,v.height)}},this),a.textures.once(i.READY,this.boot,this)},boot:function(){var a=this.game,u=a.scale.baseSize;this.width=u.width,this.height=u.height,this.isBooted=!0,a.scale.on(l.RESIZE,this.onResize,this),this.resize(u.width,u.height)},onResize:function(a,u){(u.width!==this.width||u.height!==this.height)&&this.resize(u.width,u.height)},resize:function(a,u){this.width=a,this.height=u,this.emit(t.RESIZE,a,u)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(a){return this.currentContext.globalCompositeOperation=a,this},setContext:function(a){return this.currentContext=a||this.gameContext,this},setAlpha:function(a){return this.currentContext.globalAlpha=a,this},preRender:function(){var a=this.gameContext,u=this.config,f=this.width,v=this.height;a.globalAlpha=1,a.globalCompositeOperation="source-over",a.setTransform(1,0,0,1,0,0),this.emit(t.PRE_RENDER_CLEAR),u.clearBeforeRender&&(a.clearRect(0,0,f,v),u.transparent||(a.fillStyle=u.backgroundColor.rgba,a.fillRect(0,0,f,v))),a.save(),this.drawCount=0,this.emit(t.PRE_RENDER)},render:function(a,u,f){var v=u.length;this.emit(t.RENDER,a,f);var c=f.x,g=f.y,p=f.width,T=f.height,C=f.renderToTexture?f.context:a.sys.context;C.save(),this.game.scene.customViewports&&(C.beginPath(),C.rect(c,g,p,T),C.clip()),f.emit(m.PRE_RENDER,f),this.currentContext=C;var M=f.mask;M&&M.preRenderCanvas(this,null,f._maskCamera),f.transparent||(C.fillStyle=f.backgroundColor.rgba,C.fillRect(c,g,p,T)),C.globalAlpha=f.alpha,C.globalCompositeOperation="source-over",this.drawCount+=v,f.renderToTexture&&f.emit(m.PRE_RENDER,f),f.matrix.copyToContext(C);for(var A=0;A<v;A++){var R=u[A];R.mask&&R.mask.preRenderCanvas(this,R,f),R.renderCanvas(this,R,f),R.mask&&R.mask.postRenderCanvas(this,R,f)}C.setTransform(1,0,0,1,0,0),C.globalCompositeOperation="source-over",C.globalAlpha=1,f.flashEffect.postRenderCanvas(C),f.fadeEffect.postRenderCanvas(C),f.dirty=!1,M&&M.postRenderCanvas(this),C.restore(),f.renderToTexture&&(f.emit(m.POST_RENDER,f),f.renderToGame&&a.sys.context.drawImage(f.canvas,c,g)),f.emit(m.POST_RENDER,f)},postRender:function(){var a=this.gameContext;a.restore(),this.emit(t.POST_RENDER);var u=this.snapshotState;u.callback&&(S(this.gameCanvas,u),u.callback=null)},snapshotCanvas:function(a,u,f,v,c,g,p,T,C){f===void 0&&(f=!1),this.snapshotArea(v,c,g,p,u,T,C);var M=this.snapshotState;return M.getPixel=f,S(a,M),M.callback=null,this},snapshot:function(a,u,f){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,a,u,f)},snapshotArea:function(a,u,f,v,c,g,p){var T=this.snapshotState;return T.callback=c,T.type=g,T.encoder=p,T.getPixel=!1,T.x=a,T.y=u,T.width=Math.min(f,this.gameCanvas.width),T.height=Math.min(v,this.gameCanvas.height),this},snapshotPixel:function(a,u,f){return this.snapshotArea(a,u,1,1,f),this.snapshotState.getPixel=!0,this},batchSprite:function(a,u,f,v){var c=f.alpha*a.alpha;if(c!==0){var g=this.currentContext,p=this._tempMatrix1,T=this._tempMatrix2,C=u.canvasData,M=C.x,A=C.y,R=u.cutWidth,P=u.cutHeight,L=u.customPivot,F=u.source.resolution,w=a.displayOriginX,O=a.displayOriginY,B=-w+u.x,I=-O+u.y;if(a.isCropped){var D=a._crop;(D.flipX!==a.flipX||D.flipY!==a.flipY)&&u.updateCropUVs(D,a.flipX,a.flipY),R=D.cw,P=D.ch,M=D.cx,A=D.cy,B=-w+D.x,I=-O+D.y,a.flipX&&(B>=0?B=-(B+R):B<0&&(B=Math.abs(B)-R)),a.flipY&&(I>=0?I=-(I+P):I<0&&(I=Math.abs(I)-P))}var N=1,z=1;a.flipX&&(L||(B+=-u.realWidth+w*2),N=-1),a.flipY&&(L||(I+=-u.realHeight+O*2),z=-1);var V=a.x,U=a.y;if(f.roundPixels&&(V=Math.floor(V),U=Math.floor(U)),T.applyITRS(V,U,a.rotation,a.scaleX*N,a.scaleY*z),p.copyWithScrollFactorFrom(f.matrixCombined,f.scrollX,f.scrollY,a.scrollFactorX,a.scrollFactorY),v&&p.multiply(v),p.multiply(T),f.renderRoundPixels&&(p.e=Math.floor(p.e+.5),p.f=Math.floor(p.f+.5)),g.save(),p.setToContext(g),g.globalCompositeOperation=this.blendModes[a.blendMode],g.globalAlpha=c,g.imageSmoothingEnabled=!u.source.scaleMode,a.mask&&a.mask.preRenderCanvas(this,a,f),R>0&&P>0){var G=R/F,b=P/F;f.roundPixels&&(B=Math.floor(B+.5),I=Math.floor(I+.5),G+=.5,b+=.5),g.drawImage(u.source.image,M,A,R,P,B,I,G,b)}a.mask&&a.mask.postRenderCanvas(this,a,f),g.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});E.exports=o},55830:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CanvasRenderer:n(68627),GetBlendModes:n(56373),SetTransform:n(20926)}},56373:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10312),S=n(89289),x=function(){var h=[],d=S.supportNewBlendModes,t="source-over";return h[m.NORMAL]=t,h[m.ADD]="lighter",h[m.MULTIPLY]=d?"multiply":t,h[m.SCREEN]=d?"screen":t,h[m.OVERLAY]=d?"overlay":t,h[m.DARKEN]=d?"darken":t,h[m.LIGHTEN]=d?"lighten":t,h[m.COLOR_DODGE]=d?"color-dodge":t,h[m.COLOR_BURN]=d?"color-burn":t,h[m.HARD_LIGHT]=d?"hard-light":t,h[m.SOFT_LIGHT]=d?"soft-light":t,h[m.DIFFERENCE]=d?"difference":t,h[m.EXCLUSION]=d?"exclusion":t,h[m.HUE]=d?"hue":t,h[m.SATURATION]=d?"saturation":t,h[m.COLOR]=d?"color":t,h[m.LUMINOSITY]=d?"luminosity":t,h[m.ERASE]="destination-out",h[m.SOURCE_IN]="source-in",h[m.SOURCE_OUT]="source-out",h[m.SOURCE_ATOP]="source-atop",h[m.DESTINATION_OVER]="destination-over",h[m.DESTINATION_IN]="destination-in",h[m.DESTINATION_OUT]="destination-out",h[m.DESTINATION_ATOP]="destination-atop",h[m.LIGHTER]="lighter",h[m.COPY]="copy",h[m.XOR]="xor",h};E.exports=x},20926:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91296),S=function(x,h,d,t,e){var l=t.alpha*d.alpha;if(l<=0)return!1;var i=m(d,t,e).calc;return h.globalCompositeOperation=x.blendModes[d.blendMode],h.globalAlpha=l,h.save(),i.setToContext(h),h.imageSmoothingEnabled=d.frame?!d.frame.source.scaleMode:x.antialias,!0};E.exports=S},63899:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="losewebgl"},6119:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="postrender"},31124:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="prerenderclear"},48070:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="prerender"},15640:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="render"},8912:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resize"},87124:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="restorewebgl"},53998:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="setparalleltextureunits"},92503:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={LOSE_WEBGL:n(63899),POST_RENDER:n(6119),PRE_RENDER:n(48070),PRE_RENDER_CLEAR:n(31124),RENDER:n(15640),RESIZE:n(8912),RESTORE_WEBGL:n(87124),SET_PARALLEL_TEXTURE_UNITS:n(53998)}},36909:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Events:n(92503),Snapshot:n(89966)},E.exports.Canvas=n(55830),E.exports.WebGL=n(4159)},32880:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(27919),S=n(40987),x=n(95540),h=function(d,t){var e=x(t,"callback"),l=x(t,"type","image/png"),i=x(t,"encoder",.92),s=Math.abs(Math.round(x(t,"x",0))),r=Math.abs(Math.round(x(t,"y",0))),o=Math.floor(x(t,"width",d.width)),a=Math.floor(x(t,"height",d.height)),u=x(t,"getPixel",!1);if(u){var f=d.getContext("2d",{willReadFrequently:!1}),v=f.getImageData(s,r,1,1),c=v.data;e.call(null,new S(c[0],c[1],c[2],c[3]))}else if(s!==0||r!==0||o!==d.width||a!==d.height){var g=m.createWebGL(this,o,a),p=g.getContext("2d",{willReadFrequently:!0});o>0&&a>0&&p.drawImage(d,s,r,o,a,0,0,o,a);var T=new Image;T.onerror=function(){e.call(null),m.remove(g)},T.onload=function(){e.call(null,T),m.remove(g)},T.src=g.toDataURL(l,i)}else{var C=new Image;C.onerror=function(){e.call(null)},C.onload=function(){e.call(null,C)},C.src=d.toDataURL(l,i)}};E.exports=h},88815:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(27919),S=n(40987),x=n(95540),h=function(d,t){var e=d,l=x(t,"callback"),i=x(t,"type","image/png"),s=x(t,"encoder",.92),r=Math.abs(Math.round(x(t,"x",0))),o=Math.abs(Math.round(x(t,"y",0))),a=x(t,"getPixel",!1),u=x(t,"isFramebuffer",!1),f=u?x(t,"bufferWidth",1):e.drawingBufferWidth,v=u?x(t,"bufferHeight",1):e.drawingBufferHeight;if(a){var c=new Uint8Array(4),g=v-o-1;e.readPixels(r,g,1,1,e.RGBA,e.UNSIGNED_BYTE,c),l.call(null,new S(c[0],c[1],c[2],c[3]))}else{var p=Math.floor(x(t,"width",f)),T=Math.floor(x(t,"height",v)),C=p*T*4,M=new Uint8Array(C);e.readPixels(r,v-o-T,p,T,e.RGBA,e.UNSIGNED_BYTE,M);for(var A=m.createWebGL(this,p,T),R=A.getContext("2d",{willReadFrequently:!0}),P=R.getImageData(0,0,p,T),L=P.data,F=0;F<T;F++)for(var w=0;w<p;w++){var O=((T-F-1)*p+w)*4,B=(F*p+w)*4,I=M[O+0],D=M[O+1],N=M[O+2],z=M[O+3];if(t.unpremultiplyAlpha&&z!==0){var V=255/z;I=Math.floor(I*V),D=Math.floor(D*V),N=Math.floor(N*V)}L[B+0]=I,L[B+1]=D,L[B+2]=N,L[B+3]=z}R.putImageData(P,0,0);var U=new Image;U.onerror=function(){l.call(null),m.remove(A)},U.onload=function(){l.call(null,U),m.remove(A)},U.src=A.toDataURL(i,s)}};E.exports=h},89966:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Canvas:n(32880),WebGL:n(88815)}},87774:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d){d===void 0&&(d={}),this.renderer=h,this.camera=null,this.setCamera(d.camera||null),this.state={bindings:{framebuffer:null},blend:{},colorClearValue:d.clearColor||[0,0,0,0],scissor:{box:[0,0,0,0],enable:!0},viewport:[0,0,0,0]},this.blendMode=-1,this.setBlendMode(d.blendMode||0),this.autoClear=0,d.autoClear===void 0||d.autoClear===!0?this.setAutoClear(!0,!0,!0):Array.isArray(d.autoClear)&&this.setAutoClear.apply(this,d.autoClear),this.useCanvas=!!d.useCanvas,this.framebuffer=null,this.texture=null,this.pool=d.pool||null,this.lastUsed=0,this.width=0,this.height=0,this._locks=[],d.copyFrom?this.copy(d.copyFrom):this.resize(d.width||h.width,d.height||h.height)},resize:function(x,h){if(x=Math.round(x),h=Math.round(h),x<=0&&(x=1),h<=0&&(h=1),this.useCanvas)this.framebuffer||(this.framebuffer=this.renderer.createFramebuffer(null));else if(this.framebuffer)this.framebuffer.resize(x,h);else{var d=this.renderer;this.texture=d.createTextureFromSource(null,x,h,0),this.framebuffer=d.createFramebuffer(this.texture,!0,!1)}this.state.bindings.framebuffer=this.framebuffer,this.width=x,this.height=h,this.state.scissor.box=[0,0,x,h],this.state.viewport=[0,0,x,h]},copy:function(x){var h=x.state,d=h.blend,t=h.scissor;this.autoClear=x.autoClear,this.useCanvas=x.useCanvas,this.framebuffer=x.framebuffer,this.texture=x.texture,this.camera=x.camera,this.blendMode=x.blendMode,this.width=x.width,this.height=x.height,this.state={bindings:{framebuffer:h.bindings.framebuffer},blend:{color:d.color&&d.color.slice(),enable:d.enable,equation:d.equation,func:d.func},colorClearValue:h.colorClearValue.slice(),scissor:{box:t.box.slice(),enable:t.enable},viewport:h.viewport.slice()}},getClone:function(x){var h=new S(this.renderer,{copyFrom:this});return x||h.setAutoClear(!1,!1,!1),h},setAutoClear:function(x,h,d){var t=0,e=this.renderer.gl;x&&(t|=e.COLOR_BUFFER_BIT),h&&(t|=e.DEPTH_BUFFER_BIT),d&&(t|=e.STENCIL_BUFFER_BIT),this.autoClear=t},setBlendMode:function(x,h){if(x!==this.blendMode){var d=this.state.blend,t=this.renderer.blendModes[x];d.enable=t.enable,d.equation=t.equation,d.func=t.func,h?d.color=h:d.color=void 0,this.blendMode=x}},setCamera:function(x){this.camera=x},setClearColor:function(x,h,d,t){var e=this.state.colorClearValue;x===e[0]&&h===e[1]&&d===e[2]&&t===e[3]||(this.state.colorClearValue=[x,h,d,t])},setScissorBox:function(x,h,d,t){h=this.height-h-t,this.state.scissor.box=[x,h,d,t]},setScissorEnable:function(x){this.state.scissor.enable=x},use:function(){this.renderer.renderNodes.finishBatch(),this.autoClear&&this.clear()},release:function(){this.pool&&this._locks.length===0&&(this.lastUsed=Date.now(),this.pool.add(this)),this.renderer.renderNodes.finishBatch()},lock:function(x){this._locks.indexOf(x)===-1&&this._locks.push(x)},unlock:function(x,h){var d=this._locks.indexOf(x);d!==-1&&this._locks.splice(d,1),h&&this.release()},isLocked:function(){return this._locks.length>0},beginDraw:function(){this.framebuffer&&this.renderer.glTextureUnits.unbindTexture(this.texture),this.renderer.glWrapper.update(this.state)},clear:function(x){this.beginDraw(),x===void 0&&(x=this.autoClear),this.renderer.renderNodes.finishBatch(),this.renderer.gl.clear(x)},destroy:function(){this.renderer.deleteTexture(this.texture),this.renderer.deleteFramebuffer(this.state.bindings.framebuffer),this.renderer=null,this.camera=null,this.state=null,this.framebuffer=null,this.texture=null}});E.exports=S},65656:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(87774),x=new m({initialize:function(d,t,e){this.renderer=d,this.maxAge=t,this.maxPoolSize=e,this.agePool=[],this.sizePool={}},add:function(h){if(this.agePool.indexOf(h)===-1){var d=h.width+"x"+h.height;this.sizePool[d]?this.sizePool[d].push(h):this.sizePool[d]=[h],this.agePool.push(h)}},get:function(h,d){var t,e,l=this.renderer;h===void 0&&(h=l.width),d===void 0&&(d=l.height);var i=l.getMaxTextureSize();h>i&&(h=i),d>i&&(d=i);var s=h+"x"+d,r=this.sizePool[s];if(r&&r.length>0)return t=r.pop(),e=this.agePool.indexOf(t),this.agePool.splice(e,1),t;if(this.agePool.length>0){var o=Date.now(),a=this.maxAge;if(t=this.agePool[0],o-t.lastUsed>a){this.agePool.shift();var u=t.width+"x"+t.height;return r=this.sizePool[u],e=r.indexOf(t),r.splice(e,1),t.resize(h,d),t}}return this.agePool.length<this.maxPoolSize?(t=new S(l,{autoClear:!0,pool:this,width:h,height:d}),t):(t=this.agePool.shift(),t?(r=this.sizePool[s],e=r.indexOf(t),r.splice(e,1),t.resize(h,d),t):(t=new S(l,{autoClear:!0,pool:this,width:h,height:d}),t))},setMaxAge:function(h){this.maxAge=h},setMaxPoolSize:function(h){this.maxPoolSize=h},clear:function(){for(var h=0;h<this.agePool.length;h++)this.agePool[h].destroy();this.sizePool={},this.agePool.length=0},prune:function(){var h=this.sizePool,d=this.agePool,t=d.length-this.maxPoolSize;if(t>0)for(var e=d.splice(0,t),l=0;l<t;l++){var i=e[l],s=i.width+"x"+i.height,r=h[s],o=r.indexOf(i);r.splice(o,1),i.destroy()}}});E.exports=x},56436:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(62644),x=new m({initialize:function(d,t,e){this.renderer=d,this.indexBuffer=e,this.attributeBufferLayouts=t,this.currentProgramKey=null,this.currentConfig={base:{vertexShader:"",fragmentShader:""},additions:[],features:[]},this.programs={},this.uniforms={}},getCurrentProgramSuite:function(){var h=this.currentConfig,d=this.renderer,t=d.shaderProgramFactory,e=t.getKey(h.base,h.additions,h.features);if(!this.programs[e]){var l=t.getShaderProgram(h.base,h.additions,h.features);l.compiling&&l.checkParallelCompile(),l.compiling||(this.programs[e]={program:l,vao:d.createVAO(l,this.indexBuffer,this.attributeBufferLayouts),config:S(h)})}return this.programs[e]||null},resetCurrentConfig:function(){this.currentConfig.base.vertexShader="",this.currentConfig.base.fragmentShader="",this.currentConfig.additions.length=0,this.currentConfig.features.length=0},setUniform:function(h,d){this.uniforms[h]=d},removeUniform:function(h){delete this.uniforms[h]},clearUniforms:function(){this.uniforms.length=0},applyUniforms:function(h){var d=this.uniforms;for(var t in d)h.setUniform(t,d[t])},setBaseShader:function(h,d,t){var e=this.currentConfig.base;e.name=h,e.vertexShader=d,e.fragmentShader=t},addAddition:function(h,d){d===void 0?this.currentConfig.additions.push(h):this.currentConfig.additions.splice(d,0,h)},getAddition:function(h){for(var d=this.currentConfig.additions,t=0;t<d.length;t++){var e=d[t];if(e.name===h)return e}return null},getAdditionsByTag:function(h){return this.currentConfig.additions.filter(function(d){return d.tags?d.tags.includes(h):!1})},getAdditionIndex:function(h){return this.currentConfig.additions.findIndex(function(d){return d.name===h})},removeAddition:function(h){this.currentConfig.additions=this.currentConfig.additions.filter(function(d){return d.name!==h})},replaceAddition:function(h,d){var t=this.currentConfig.additions.findIndex(function(e){return e.name===h});t!==-1&&(this.currentConfig.additions[t]=d)},addFeature:function(h){this.currentConfig.features.indexOf(h)===-1&&this.currentConfig.features.push(h)},removeFeature:function(h){this.currentConfig.features=this.currentConfig.features.filter(function(d){return d!==h})},clearFeatures:function(){this.currentConfig.features.length=0}});E.exports=x},18804:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h){this.renderer=h,this.programs={}},has:function(x){return this.programs[x]!==void 0},getShaderProgram:function(x,h,d){var t=this.getKey(x,h,d),e=this.programs[t];return e||(e=this.createShaderProgram(t,x,h,d)),e},getKey:function(x,h,d){var t=x.name;if(h&&h.length>0){t+="_";for(var e=0;e<h.length;e++){var l=h[e];l.disable||(t+="_"+l.name)}}return d&&d.length>0&&(t+="__",t+=d.sort().join("_")),t},createShaderProgram:function(x,h,d,t){var e=h.vertexShader,l=h.fragmentShader;if(e=e.replace(/\r/g,""),l=l.replace(/\r/g,""),d){for(var i,s,r={},o=0;o<d.length;o++){var a=d[o];if(!a.disable)for(i in a.additions)s=a.additions[i],s=s.replace(/\r/g,""),r[i]||(r[i]=""),r[i]+=s+`
|
||
`}for(i in r){var u="#pragma phaserTemplate("+i+`)
|
||
`;s=r[i],e=e.replace(u,s),l=l.replace(u,s)}}if(t){var f="",v=/[^a-zA-Z0-9]/g;for(o=0;o<t.length;o++){var c=t[o].toUpperCase().replace(v,"_");f+="#define FEATURE_"+c+`
|
||
`}e=e.replace("#pragma phaserTemplate(features)",f),l=l.replace("#pragma phaserTemplate(features)",f)}e=e.replace("#pragma phaserTemplate(shaderName)","#define SHADER_NAME "+x+"__VERTEX"),l=l.replace("#pragma phaserTemplate(shaderName)","#define SHADER_NAME "+x+"__FRAGMENT");var g=/\s*#pragma phaserTemplate\(.*/g;e=e.replace(g,""),l=l.replace(g,"");var p=this.renderer.createProgram(e,l);return this.programs[x]=p,p}});E.exports=S},70554:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @author Matthew Groves <@doormat>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340);E.exports={getTintFromFloats:function(S,x,h,d){var t=(S*255|0)&255,e=(x*255|0)&255,l=(h*255|0)&255,i=(d*255|0)&255;return(i<<24|t<<16|e<<8|l)>>>0},getTintAppendFloatAlpha:function(S,x){var h=(x*255|0)&255;return(h<<24|S)>>>0},getTintAppendFloatAlphaAndSwap:function(S,x){var h=(S>>16|0)&255,d=(S>>8|0)&255,t=(S|0)&255,e=(x*255|0)&255;return(e<<24|t<<16|d<<8|h)>>>0},getFloatsFromUintRGB:function(S){var x=(S>>16|0)&255,h=(S>>8|0)&255,d=(S|0)&255;return[x/255,h/255,d/255]},checkShaderMax:function(S,x){var h=Math.min(16,S.getParameter(S.MAX_TEXTURE_IMAGE_UNITS));return!x||x===-1?h:Math.min(h,x)},updateLightingUniforms:function(S,x,h,d,t,e,l,i){var s=x.camera,r=s.scene,o=r.sys.lights;if(!(!o||!o.active)){var a=o.getLights(s),u=a.length,f=o.ambientColor,v=x.height;if(S){h.setUniform("uNormSampler",d),h.setUniform("uCamera",[s.x,s.y,s.rotation,s.zoom]),h.setUniform("uAmbientLightColor",[f.r,f.g,f.b]),h.setUniform("uLightCount",u);for(var c=new m,g=0;g<u;g++){var p=a[g].light,T=p.color,C="uLights["+g+"].";c.copyWithScrollFactorFrom(s.matrixCombined,s.scrollX,s.scrollY,p.scrollFactorX,p.scrollFactorY),c.transformPoint(p.x,p.y,t),h.setUniform(C+"position",[t.x,v-t.y,p.z*s.zoom]),h.setUniform(C+"color",[T.r,T.g,T.b]),h.setUniform(C+"intensity",p.intensity),h.setUniform(C+"radius",p.radius)}e&&(h.setUniform("uDiffuseFlatThreshold",i*3),h.setUniform("uPenumbra",l))}else for(h.removeUniform("uNormSampler"),h.removeUniform("uCamera"),h.removeUniform("uAmbientLightColor"),h.removeUniform("uLightCount"),h.removeUniform("uPenumbra"),h.removeUniform("uDiffuseFlatThreshold"),g=0;g<u;g++)C="uLights["+g+"].",h.removeUniform(C+"position"),h.removeUniform(C+"color"),h.removeUniform(C+"intensity"),h.removeUniform(C+"radius")}}}},74797:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95428),S=n(72905),x=n(83419),h=n(8054),d=n(50792),t=n(92503),e=n(50030),l=n(37867),i=n(29747),s=n(87774),r=n(97480),o=n(69442),a=n(70554),u=n(88815),f=n(26128),v=n(37959),c=n(1482),g=n(86272),p=n(82751),T=n(13760),C=n(84387),M=n(85788),A=n(47774),R=n(53314),P=n(30130),L=n(65656),F=n(18804),w=new x({Extends:d,initialize:function(B){d.call(this);var I=B.config,D={alpha:I.transparent,desynchronized:I.desynchronized,depth:!0,antialias:I.antialiasGL,premultipliedAlpha:I.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:I.failIfMajorPerformanceCaveat,powerPreference:I.powerPreference,preserveDrawingBuffer:I.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:I.clearBeforeRender,antialias:I.antialias,backgroundColor:I.backgroundColor,contextCreation:D,roundPixels:I.roundPixels,pathDetailThreshold:I.pathDetailThreshold,maxTextures:I.maxTextures,maxTextureSize:I.maxTextureSize,batchSize:I.batchSize,maxLights:I.maxLights,mipmapFilter:I.mipmapFilter},this.game=B,this.type=h.WEBGL,this.renderNodes=null,this.cameraRenderNode=null,this.shaderProgramFactory=new F(this),this.width=0,this.height=0,this.canvas=B.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,unpremultiplyAlpha:!0},this.maxTextures=0,this.textureUnitIndices=[],this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glVAOWrappers=[],this.genericQuadIndexBuffer=null,this.baseDrawingContext=null,this.currentViewCamera=null,this.drawingContextPool=new L(this,1e3,1024),this.contextLostHandler=i,this.contextRestoredHandler=i,this.previousContextLostHandler=i,this.previousContextRestoredHandler=i,this.gl=null,this.glWrapper=null,this.glTextureUnits=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.parallelShaderCompileExtension=null,this.standardDerivativesExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.shaderSetters=null,this.mipmapFilter=null,this.isBooted=!1,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.projectionFlipY=!1,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(O){var B,I=this.game,D=this.canvas,N=O.backgroundColor;if(I.config.context?B=I.config.context:B=D.getContext("webgl",O.contextCreation)||D.getContext("experimental-webgl",O.contextCreation),!B||B.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=B,this.setExtensions(),this.setContextHandlers(),I.context=B;for(var z=0;z<=27;z++)this.blendModes.push(A.createCombined(this));this.blendModes[1].func=[B.ONE,B.DST_ALPHA,B.ONE,B.DST_ALPHA],this.blendModes[2].func=[B.DST_COLOR,B.ONE_MINUS_SRC_ALPHA,B.DST_COLOR,B.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[B.ONE,B.ONE_MINUS_SRC_COLOR,B.ONE,B.ONE_MINUS_SRC_COLOR],this.blendModes[17].equation=[B.FUNC_REVERSE_SUBTRACT,B.FUNC_REVERSE_SUBTRACT],this.blendModes[17].func=[B.ZERO,B.ONE_MINUS_SRC_ALPHA,B.ZERO,B.ONE_MINUS_SRC_ALPHA],this.glFormats=[B.BYTE,B.SHORT,B.UNSIGNED_BYTE,B.UNSIGNED_SHORT,B.FLOAT],this.shaderSetters=new g(this),(!O.maxTextures||O.maxTextures===-1)&&(O.maxTextures=B.getParameter(B.MAX_TEXTURE_IMAGE_UNITS)),O.maxTextureSize||(O.maxTextureSize=B.getParameter(B.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.glWrapper=new v(this),this.glWrapper.update(void 0,!0),B.clearColor(N.redGL,N.greenGL,N.blueGL,N.alphaGL);var V=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];for(V.indexOf(O.mipmapFilter)!==-1&&(this.mipmapFilter=B[O.mipmapFilter]),this.maxTextures=a.checkShaderMax(B,O.maxTextures),z=0;z<this.maxTextures;z++)this.textureUnitIndices.push(z);return this.glTextureUnits=new T(this),this.projectionMatrix=new l().identity(),I.textures.once(o.READY,this.boot,this),this},boot:function(){var O=this.game,B=this.gl,I=O.scale.baseSize,D=I.width,N=I.height;this.width=D,this.height=N,this.isBooted=!0,this.glWrapper.updateVAO({vao:null}),this.genericQuadIndexBuffer=this.createIndexBuffer(new Uint16Array([0,1,2,3]),B.STATIC_DRAW),this.renderNodes=new P(this),this.cameraRenderNode=this.renderNodes.getNode("Camera"),this.blankTexture=O.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=O.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=O.textures.getFrame("__WHITE").glTexture,this.baseDrawingContext=new s(this,{autoClear:!0,useCanvas:!0,clearColor:[this.config.backgroundColor.redGL,this.config.backgroundColor.greenGL,this.config.backgroundColor.blueGL,this.config.backgroundColor.alphaGL]}),this.on(t.RESIZE,this.baseDrawingContext.resize,this.baseDrawingContext),O.scale.on(r.RESIZE,this.onResize,this),this.resize(D,N)},setExtensions:function(){var O=this.gl,B=this.game,I=O.getSupportedExtensions();this.supportedExtensions=I;var D="ANGLE_instanced_arrays";if(this.instancedArraysExtension=I.indexOf(D)>-1?O.getExtension(D):null,B.config.skipUnreadyShaders){var N="KHR_parallel_shader_compile";this.parallelShaderCompileExtension=I.indexOf(N)>-1?O.getExtension(N):null,this.parallelShaderCompileExtension||(B.config.skipUnreadyShaders=!1)}var z="OES_vertex_array_object";if(this.vaoExtension=I.indexOf(z)>-1?O.getExtension(z):null,B.config.smoothPixelArt){var V="OES_standard_derivatives";this.standardDerivativesExtension=I.indexOf(V)>-1?O.getExtension(V):null}if(O instanceof WebGLRenderingContext){if(this.instancedArraysExtension)O.vertexAttribDivisor=this.instancedArraysExtension.vertexAttribDivisorANGLE.bind(this.instancedArraysExtension),O.drawArraysInstanced=this.instancedArraysExtension.drawArraysInstancedANGLE.bind(this.instancedArraysExtension),O.drawElementsInstanced=this.instancedArraysExtension.drawElementsInstancedANGLE.bind(this.instancedArraysExtension);else throw new Error("ANGLE_instanced_arrays extension not supported. Required for rendering.");if(this.vaoExtension)O.createVertexArray=this.vaoExtension.createVertexArrayOES.bind(this.vaoExtension),O.bindVertexArray=this.vaoExtension.bindVertexArrayOES.bind(this.vaoExtension),O.deleteVertexArray=this.vaoExtension.deleteVertexArrayOES.bind(this.vaoExtension),O.isVertexArray=this.vaoExtension.isVertexArrayOES.bind(this.vaoExtension);else throw new Error("OES_vertex_array_object extension not supported. Required for rendering.");if(this.standardDerivativesExtension)O.FRAGMENT_SHADER_DERIVATIVE_HINT=this.standardDerivativesExtension.FRAGMENT_SHADER_DERIVATIVE_HINT_OES;else if(B.config.smoothPixelArt)throw new Error("OES_standard_derivatives extension not supported. Cannot use smoothPixelArt.")}},setContextHandlers:function(O,B){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),typeof O=="function"?this.contextLostHandler=O.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),typeof B=="function"?this.contextRestoredHandler=B.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(O){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(t.LOSE_WEBGL,this),O.preventDefault()},dispatchContextRestored:function(O){var B=this.gl;if(B.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.setExtensions(),this.glWrapper.update(R.getDefault(this),!0),this.glTextureUnits.init(),this.compression=this.getCompressedTextures();var I=function(D){D.createResource()};m(this.glTextureWrappers,I),m(this.glBufferWrappers,I),m(this.glFramebufferWrappers,I),m(this.glProgramWrappers,I),m(this.glVAOWrappers,I),this.glTextureUnits.bindUnits(this.glTextureUnits.units,!0),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(t.RESTORE_WEBGL,this),O.preventDefault()},captureFrame:function(O,B){},captureNextFrame:function(){},getFps:function(){},log:function(){},startCapture:function(O,B,I){},stopCapture:function(){},onCapture:function(O){},onResize:function(O,B){(B.width!==this.width||B.height!==this.height)&&this.resize(B.width,B.height)},resize:function(O,B){var I=this.gl;return this.width=O,this.height=B,this.setProjectionMatrix(O,B),this.drawingBufferHeight=I.drawingBufferHeight,this.glWrapper.update({scissor:{box:[0,I.drawingBufferHeight-B,O,B]},viewport:[0,0,O,B]}),this.emit(t.RESIZE,O,B),this},getCompressedTextures:function(){var O="WEBGL_compressed_texture_",B="WEBKIT_"+O,I="EXT_texture_compression_",D=function(z,V){var U=z.getExtension(O+V)||z.getExtension(B+V)||z.getExtension(I+V);if(U){var G={};for(var b in U)G[U[b]]=b;return G}},N=this.gl;return{ETC:D(N,"etc"),ETC1:D(N,"etc1"),ATC:D(N,"atc"),ASTC:D(N,"astc"),BPTC:D(N,"bptc"),RGTC:D(N,"rgtc"),PVRTC:D(N,"pvrtc"),S3TC:D(N,"s3tc"),S3TCSRGB:D(N,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(O,B){var I=this.compression[O.toUpperCase()];if(B in I)return I[B]},supportsCompressedTexture:function(O,B){var I=this.compression[O.toUpperCase()];return I?B?B in I:!0:!1},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(O,B,I){return(O!==this.projectionWidth||B!==this.projectionHeight||I!==this.projectionFlipY)&&(this.projectionWidth=O,this.projectionHeight=B,this.projectionFlipY=!!I,I?this.projectionMatrix.ortho(0,O,0,B,-1e3,1e3):this.projectionMatrix.ortho(0,O,B,0,-1e3,1e3)),this},setProjectionMatrixFromDrawingContext:function(O){return this.setProjectionMatrix(O.width,O.height,!1)},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(O){return this.supportedExtensions?this.supportedExtensions.indexOf(O):!1},getExtension:function(O){return this.hasExtension(O)?(O in this.extensions||(this.extensions[O]=this.gl.getExtension(O)),this.extensions[O]):null},addBlendMode:function(O,B){var I=this.blendModes.push(A.createCombined(this,!0,void 0,B,O[0],O[1]))-1;return I-1},updateBlendMode:function(O,B,I){if(O>17&&this.blendModes[O]){var D=this.blendModes[O];B.length===2?D.func=[B[0],B[1],B[0],B[1]]:D.func=[B[0],B[1],B[2],B[3]],typeof I=="number"?D.equation=[I,I]:D.equation=[I[0],I[1]]}return this},removeBlendMode:function(O){return O>17&&this.blendModes[O]&&this.blendModes.splice(O,1),this},clearFramebuffer:function(O,B,I){var D=this.gl,N=0;O&&(this.glWrapper.updateColorClearValue({colorClearValue:O}),N=N|D.COLOR_BUFFER_BIT),B!==void 0&&(this.glWrapper.updateStencilClear({stencil:{clear:B}}),N=N|D.STENCIL_BUFFER_BIT),I!==void 0&&(N=N|D.DEPTH_BUFFER_BIT),D.clear(N)},createTextureFromSource:function(O,B,I,D,N,z){N===void 0&&(N=!1);var V=this.gl,U=V.NEAREST,G=V.NEAREST,b=V.CLAMP_TO_EDGE,Y=null;B=O?O.width:B,I=O?O.height:I;var W=e(B,I);if(W&&!N&&(b=V.REPEAT),D===h.ScaleModes.LINEAR&&this.config.antialias){var H=O&&O.compressed,X=!H&&W||H&&O.mipmaps.length>1;U=this.mipmapFilter&&X?this.mipmapFilter:V.LINEAR,G=V.LINEAR}return!O&&typeof B=="number"&&typeof I=="number"?Y=this.createTexture2D(0,U,G,b,b,V.RGBA,null,B,I,void 0,void 0,z):Y=this.createTexture2D(0,U,G,b,b,V.RGBA,O,void 0,void 0,void 0,void 0,z),Y},createTexture2D:function(O,B,I,D,N,z,V,U,G,b,Y,W){typeof U!="number"&&(U=V?V.width:1),typeof G!="number"&&(G=V?V.height:1);var H=new p(this,O,B,I,D,N,z,V,U,G,b,Y,W);return this.glTextureWrappers.push(H),H},createFramebuffer:function(O,B,I){!Array.isArray(O)&&O!==null&&(O=[O]);var D=new C(this,O,B,I);return this.glFramebufferWrappers.push(D),D},createProgram:function(O,B){var I=new c(this,O,B);return this.glProgramWrappers.push(I),I},createVertexBuffer:function(O,B){var I=this.gl,D=new f(this,O,I.ARRAY_BUFFER,B);return this.glBufferWrappers.push(D),D},createIndexBuffer:function(O,B){var I=this.gl,D=new f(this,O,I.ELEMENT_ARRAY_BUFFER,B);return this.glBufferWrappers.push(D),D},createVAO:function(O,B,I){var D=new M(this,O,B,I);return this.glVAOWrappers.push(D),D},deleteTexture:function(O){if(O)return S(this.glTextureWrappers,O),O.destroy(),this},deleteFramebuffer:function(O){return O?(S(this.glFramebufferWrappers,O),O.destroy(),this):this},deleteProgram:function(O){return O&&(S(this.glProgramWrappers,O),O.destroy()),this},deleteBuffer:function(O){return O?(S(this.glBufferWrappers,O),O.destroy(),this):this},preRender:function(){if(!this.contextLost){this.emit(t.PRE_RENDER_CLEAR);var O=this.baseDrawingContext;if(this.config.clearBeforeRender){var B=this.config.backgroundColor;O.setClearColor(B.redGL,B.greenGL,B.blueGL,B.alphaGL),O.setAutoClear(!0,!0,!0)}else O.setAutoClear(!1,!1,!1);O.use(),this.emit(t.PRE_RENDER)}},render:function(O,B,I){this.contextLost||(this.emit(t.RENDER,O,I),this.currentViewCamera=I,this.cameraRenderNode.run(this.baseDrawingContext,B,I),this.currentViewCamera=null)},postRender:function(){if(this.baseDrawingContext.release(),!this.contextLost){this.emit(t.POST_RENDER);var O=this.snapshotState;O.callback&&(u(this.gl,O),O.callback=null)}},drawElements:function(O,B,I,D,N,z,V){var U=this.gl;O.beginDraw(),I.bind(),D.bind(),this.glTextureUnits.bindUnits(B),U.drawElements(V||U.TRIANGLE_STRIP,N,U.UNSIGNED_SHORT,z)},drawInstancedArrays:function(O,B,I,D,N,z,V,U){var G=this.gl;O.beginDraw(),I.bind(),D.bind(),this.glTextureUnits.bindUnits(B),G.drawArraysInstanced(U||G.TRIANGLE_STRIP,N,z,V)},snapshot:function(O,B,I){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,O,B,I)},snapshotArea:function(O,B,I,D,N,z,V){var U=this.snapshotState;return U.callback=N,U.type=z,U.encoder=V,U.getPixel=!1,U.x=O,U.y=B,U.width=I,U.height=D,U.unpremultiplyAlpha=this.game.config.premultipliedAlpha,this},snapshotPixel:function(O,B,I){return this.snapshotArea(O,B,1,1,I),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(O,B,I,D,N,z,V,U,G,b,Y){N===void 0&&(N=!1),z===void 0&&(z=0),V===void 0&&(V=0),U===void 0&&(U=B),G===void 0&&(G=I),b==="pixel"&&(N=!0,b="image/png"),this.snapshotArea(z,V,U,G,D,b,Y);var W=this.snapshotState;return W.getPixel=N,W.isFramebuffer=!0,W.bufferWidth=B,W.bufferHeight=I,W.width=Math.min(W.width,B),W.height=Math.min(W.height,I),this.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:O}}),u(this.gl,W),W.callback=null,W.isFramebuffer=!1,this},canvasToTexture:function(O,B,I,D){I===void 0&&(I=!1),D===void 0&&(D=!0);var N=this.gl,z=N.NEAREST,V=N.NEAREST,U=O.width,G=O.height,b=N.CLAMP_TO_EDGE,Y=e(U,G);return!I&&Y&&(b=N.REPEAT),this.config.antialias&&(z=Y&&this.mipmapFilter?this.mipmapFilter:N.LINEAR,V=N.LINEAR),B?(B.update(O,U,G,D,b,b,z,V,B.format),B):this.createTexture2D(0,z,V,b,b,N.RGBA,O,U,G,!0,!1,D)},createCanvasTexture:function(O,B,I){return B===void 0&&(B=!1),I===void 0&&(I=!0),this.canvasToTexture(O,null,B,I)},updateCanvasTexture:function(O,B,I,D){return I===void 0&&(I=!0),D===void 0&&(D=!1),this.canvasToTexture(O,B,D,I)},videoToTexture:function(O,B,I,D){I===void 0&&(I=!1),D===void 0&&(D=!0);var N=this.gl,z=N.NEAREST,V=N.NEAREST,U=O.videoWidth,G=O.videoHeight,b=N.CLAMP_TO_EDGE,Y=e(U,G);return!I&&Y&&(b=N.REPEAT),this.config.antialias&&(z=Y&&this.mipmapFilter?this.mipmapFilter:N.LINEAR,V=N.LINEAR),B?(B.update(O,U,G,D,b,b,z,V,B.format),B):this.createTexture2D(0,z,V,b,b,N.RGBA,O,U,G,!0,!0,D)},createVideoTexture:function(O,B,I){return B===void 0&&(B=!1),I===void 0&&(I=!0),this.videoToTexture(O,null,B,I)},updateVideoTexture:function(O,B,I,D){return I===void 0&&(I=!0),D===void 0&&(D=!1),this.videoToTexture(O,B,D,I)},createUint8ArrayTexture:function(O,B,I,D,N){var z=this.gl,V=z.NEAREST,U=z.NEAREST,G=z.CLAMP_TO_EDGE,b=e(B,I);return b&&(G=z.REPEAT),D===void 0&&(D=!0),N===void 0&&(N=!0),this.createTexture2D(0,V,U,G,G,z.RGBA,O,B,I,D,!1,N)},setTextureFilter:function(O,B){var I=this.gl,D=B===0?I.LINEAR:I.NEAREST,N=this.glTextureUnits,z=N.units[0];return N.bind(O,0),O.update(O.pixels,O.width,O.height,O.flipY,O.wrapS,O.wrapT,D,D,O.format),z&&N.bind(z,0),this},setTextureWrap:function(O,B,I){var D=this.gl;if(!e(O.width,O.height)&&(B!==D.CLAMP_TO_EDGE||I!==D.CLAMP_TO_EDGE))return this;var N=this.glTextureUnits,z=N.units[0];return N.bind(O,0),O.update(O.pixels,O.width,O.height,O.flipY,B,I,O.minFilter,O.magFilter,O.format),z&&N.bind(z,0),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.off(t.RESIZE,this.baseDrawingContext.resize,this.baseDrawingContext),this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);var O=function(B){B.destroy()};m(this.glBufferWrappers,O),m(this.glFramebufferWrappers,O),m(this.glProgramWrappers,O),m(this.glTextureWrappers,O),this.removeAllListeners(),this.extensions={},this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0}});E.exports=w},14500:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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}};E.exports=y},4159:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(14500),S=n(79291),x={Shaders:n(89350),ShaderAdditionMakers:n(83786),DrawingContext:n(87774),DrawingContextPool:n(65656),ProgramManager:n(56436),RenderNodes:n(54521),ShaderProgramFactory:n(18804),Utils:n(70554),WebGLRenderer:n(74797),Wrappers:n(31884)};x=S(!1,x,m),E.exports=x},47774:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={createCombined:function(n,m,S,x,h,d){var t=n.gl;m===void 0&&(m=!0),S===void 0&&(S=[0,0,0,0]),x===void 0&&(x=t.FUNC_ADD),h===void 0&&(h=t.ONE),d===void 0&&(d=t.ONE_MINUS_SRC_ALPHA);var e={enabled:m,color:S,equation:[x,x],func:[h,d,h,d]};return e},createSeparate:function(n,m,S,x,h,d,t,e,l){var i=n.gl;m===void 0&&(m=!0),S===void 0&&(S=[0,0,0,0]),x===void 0&&(x=i.FUNC_ADD),h===void 0&&(h=i.FUNC_ADD),d===void 0&&(d=i.ONE),t===void 0&&(t=i.ONE_MINUS_SRC_ALPHA),e===void 0&&(e=i.ONE),l===void 0&&(l=i.ONE_MINUS_SRC_ALPHA);var s={enabled:m,color:S,equation:[x,h],func:[d,t,e,l]};return s}};E.exports=y},53314:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(8054),S=n(62644),x=n(71623),h={getDefault:function(d){var t={bindings:{activeTexture:0,arrayBuffer:null,elementArrayBuffer:null,framebuffer:null,program:null,renderbuffer:null},blend:S(d.blendModes[m.BlendModes.NORMAL]),colorClearValue:[0,0,0,1],colorWritemask:[!0,!0,!0,!0],cullFace:!1,depthTest:!1,scissor:{enable:!0,box:[0,0,0,0]},stencil:x.create(d),texturing:{flipY:!1,premultiplyAlpha:!1},vao:null,viewport:[0,0,0,0]};return t}};E.exports=h},71623:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={create:function(n,m,S,x,h,d,t,e,l){var i=n.gl;m===void 0&&(m=!1),S===void 0&&(S=i.ALWAYS),x===void 0&&(x=0),h===void 0&&(h=255),d===void 0&&(d=i.KEEP),t===void 0&&(t=i.KEEP),e===void 0&&(e=i.KEEP),l===void 0&&(l=0);var s={enabled:m,func:{func:S,ref:x,mask:h},op:{fail:d,zfail:t,zpass:e},clear:l};return s}};E.exports=y},13961:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(56436),x=n(40952),h=n(6141),d=n(36909),t=new m({Extends:h,initialize:function(l,i,s){var r=l.renderer,o=r.gl;s=this._copyAndCompleteConfig(l,s||{},i);var a=s.name;if(!a)throw new Error("BatchHandler must have a name");h.call(this,a,l),this.instancesPerBatch=-1,this.verticesPerInstance=s.verticesPerInstance;var u=65536,f=Math.floor(u/this.verticesPerInstance),v=s.instancesPerBatch||r.config.batchSize||f;this.instancesPerBatch=Math.min(v,f),this.indicesPerInstance=s.indicesPerInstance,this.bytesPerIndexPerInstance=this.indicesPerInstance*Uint16Array.BYTES_PER_ELEMENT,this.maxTexturesPerBatch=1,this.manager.on(d.Events.SET_PARALLEL_TEXTURE_UNITS,this.updateTextureCount,this),r.glWrapper.updateVAO({vao:null}),this.indexBuffer=r.createIndexBuffer(this._generateElementIndices(this.instancesPerBatch),s.indexBufferDynamic?o.DYNAMIC_DRAW:o.STATIC_DRAW);var c=s.vertexBufferLayout;if(c.count=this.instancesPerBatch*this.verticesPerInstance,this.vertexBufferLayout=new x(r,c,null),this.programManager=new S(r,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(s.shaderName,s.vertexSource,s.fragmentSource),s.shaderAdditions)for(var g=0;g<s.shaderAdditions.length;g++){var p=s.shaderAdditions[g];this.programManager.addAddition(p)}if(s.shaderFeatures)for(g=0;g<s.shaderFeatures.length;g++)this.programManager.addFeature(s.shaderFeatures[g]);this.bytesPerInstance=this.vertexBufferLayout.layout.stride*this.verticesPerInstance,this.floatsPerInstance=this.bytesPerInstance/Float32Array.BYTES_PER_ELEMENT,this.currentBatchEntry={start:0,count:0,unit:0,texture:[]},this.batchEntries=[],this.instanceCount=0,this.updateTextureCount(l.maxParallelTextureUnits),this.resize(r.width,r.height),r.on(d.Events.RESIZE,this.resize,this)},_copyAndCompleteConfig:function(e,l,i){var s={};s.name=l.name||i.name,s.verticesPerInstance=l.verticesPerInstance||i.verticesPerInstance,s.indicesPerInstance=l.indicesPerInstance||i.indicesPerInstance,s.shaderName=l.shaderName||i.shaderName,s.vertexSource=l.vertexSource||i.vertexSource,s.fragmentSource=l.fragmentSource||i.fragmentSource,s.shaderAdditions=l.shaderAdditions||i.shaderAdditions,Array.isArray(s.shaderAdditions)&&(s.shaderAdditions=s.shaderAdditions.map(function(c){return Object.assign({},c)})),s.shaderFeatures=l.shaderFeatures||i.shaderFeatures,s.indexBufferDynamic=l.indexBufferDynamic||i.indexBufferDynamic,s.instancesPerBatch=l.instancesPerBatch,s.maxTexturesPerBatch=l.maxTexturesPerBatch;var r=l.vertexBufferLayout||i.vertexBufferLayout;s.vertexBufferLayout={},s.vertexBufferLayout.usage=r.usage,s.vertexBufferLayout.layout=[];for(var o=l.vertexBufferLayoutRemove||[],a=0;a<r.layout.length;a++){var u=r.layout[a];o.indexOf(u.name)===-1&&(s.vertexBufferLayout.layout[a]={name:u.name,size:u.size||1,type:u.type||"FLOAT",normalized:u.normalized||!1})}if(l.vertexBufferLayoutAdd){var f=l.vertexBufferLayoutAdd||[];for(a=0;a<f.length;a++){var v=f[a];s.vertexBufferLayout.layout.push({name:v.name,size:v.size||1,type:v.type||"FLOAT",normalized:v.normalized||!1})}}return s},_generateElementIndices:function(e){return new ArrayBuffer(e*this.bytesPerInstance)},resize:function(e,l){},updateTextureCount:function(e){},run:function(e){},batch:function(){}});E.exports=t},16971:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(4127),x=n(89924),h=n(13961),d=new m({Extends:h,initialize:function(t,e){h.call(this,t,this.defaultConfig,e),this._emptyTextures=[]},defaultConfig:{name:"BatchHandlerPointLight",verticesPerInstance:4,indicesPerInstance:6,shaderName:"POINTLIGHT",vertexSource:x,fragmentSource:S,vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius",size:1},{name:"inLightAttenuation",size:1},{name:"inLightColor",size:4}]}},_generateElementIndices:function(t){for(var e=new ArrayBuffer(t*6*2),l=new Uint16Array(e),i=0,s=0;s<t;s++){var r=s*4;l[i++]=r,l[i++]=r,l[i++]=r+1,l[i++]=r+2,l[i++]=r+3,l[i++]=r+3}return e},setupUniforms:function(t){var e=this.programManager,l=t.width,i=t.height;e.setUniform("uCameraZoom",t.camera.zoom),e.setUniform("uResolution",[l,i]),t.renderer.setProjectionMatrixFromDrawingContext(t),e.setUniform("uProjectionMatrix",t.renderer.projectionMatrix.val)},run:function(t){var e=this.instanceCount;if(e!==0){this.onRunBegin(t);var l=this.programManager,i=l.getCurrentProgramSuite();if(i){var s=i.program,r=i.vao;this.setupUniforms(t),l.applyUniforms(s),this.vertexBufferLayout.buffer.update(this.instanceCount*this.bytesPerInstance),this.manager.renderer.drawElements(t,this._emptyTextures,s,r,e*this.indicesPerInstance,0)}this.instanceCount=0,this.onRunEnd(t)}},batch:function(t,e,l,i,s,r,o,a,u,f,v,c){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,t);var g=e.color,p=e.intensity,T=e.radius,C=e.attenuation,M=g.r*p,A=g.g*p,R=g.b*p,P=e.alpha,L=this.instanceCount*this.floatsPerInstance,F=this.vertexBufferLayout.buffer,w=F.viewF32;w[L++]=s,w[L++]=r,w[L++]=v,w[L++]=c,w[L++]=T,w[L++]=C,w[L++]=M,w[L++]=A,w[L++]=R,w[L++]=P,w[L++]=l,w[L++]=i,w[L++]=v,w[L++]=c,w[L++]=T,w[L++]=C,w[L++]=M,w[L++]=A,w[L++]=R,w[L++]=P,w[L++]=u,w[L++]=f,w[L++]=v,w[L++]=c,w[L++]=T,w[L++]=C,w[L++]=M,w[L++]=A,w[L++]=R,w[L++]=P,w[L++]=o,w[L++]=a,w[L++]=v,w[L++]=c,w[L++]=T,w[L++]=C,w[L++]=M,w[L++]=A,w[L++]=R,w[L++]=P,this.instanceCount++,this.instanceCount===this.instancesPerBatch&&this.run(t)}});E.exports=d},15214:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=n(83419),x=n(62644),h=n(70554),d=n(98840),t=n(44667),e=n(81084),l=n(44349),i=n(6184),s=n(11653),r=n(40829),o=n(42792),a=n(96049),u=n(33997),f=n(79532),v=n(65217),c=n(74505),g=n(13961),p=new S({Extends:g,initialize:function(C,M){this.renderOptions={multiTexturing:!1,texRes:!1,lighting:!1,selfShadow:!1,selfShadowPenumbra:0,selfShadowThreshold:0,smoothPixelArt:!1},g.call(this,C,this.defaultConfig,M),this.programManager.setUniform("uMainSampler[0]",this.manager.renderer.textureUnitIndices),this.nextRenderOptions=x(this.renderOptions),this._renderOptionsChanged=!1,this._lightVector=new m},defaultConfig:{name:"BatchHandlerQuad",verticesPerInstance:4,indicesPerInstance:6,shaderName:"STANDARD",vertexSource:t,fragmentSource:d,shaderAdditions:[o(),a(!0),c(!0),s(1),u(),l(),i(!0),v(!0),f(!0),r(!0),e(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(T){for(var C=new ArrayBuffer(T*6*2),M=new Uint16Array(C),A=0,R=0;R<T;R++){var P=R*4;M[A++]=P,M[A++]=P,M[A++]=P+1,M[A++]=P+2,M[A++]=P+3,M[A++]=P+3}return C},updateTextureCount:function(T){var C=this.manager.renderer;T===void 0&&(T=C.maxTextures);var M=Math.max(1,Math.min(T,C.maxTextures));if(M!==this.maxTexturesPerBatch){if(M<this.currentBatchEntry.unit&&this.manager.currentBatchNode===this&&this.manager.finishBatch(),this.maxTexturesPerBatch=M,this.renderOptions.multiTexturing){var A=this.programManager,R=A.getAdditionsByTag("TEXTURE")[0];R&&A.replaceAddition(R.name,u(this.maxTexturesPerBatch))}this.resize(C.width,C.height)}},setupUniforms:function(T){var C=this.programManager,M=this.renderOptions;C.setUniform("uResolution",[T.width,T.height]),T.renderer.setProjectionMatrixFromDrawingContext(T),C.setUniform("uProjectionMatrix",T.renderer.projectionMatrix.val),this.renderOptions.lighting&&h.updateLightingUniforms(M.lighting,T,C,1,this._lightVector,M.selfShadow,M.selfShadowThreshold,M.selfShadowPenumbra)},setupTextureUniforms:function(T){var C=this.programManager;if(this.renderOptions.multiTexturing){for(var M=[],A=0;A<T.length;A++)M.push(T[A].width,T[A].height);C.setUniform("uMainResolution[0]",M)}else C.setUniform("uMainResolution[0]",[T[0].width,T[0].height])},finalizeTextureCount:function(T){var C=this.programManager;this.renderOptions.lighting&&(T=1);var M=C.getAdditionsByTag("TEXTURE")[0];M&&C.replaceAddition(M.name,u(T));var A=C.getAdditionsByTag("TexCount")[0];A&&C.replaceAddition(A.name,s(T))},updateRenderOptions:function(T){var C=this.nextRenderOptions,M=this.renderOptions,A=!1,R=!!T.multiTexturing&&!T.lighting;R!==M.multiTexturing&&(C.multiTexturing=R,A=!0);var P=!!T.lighting;P!==M.lighting&&(C.lighting=P,A=!0);var L=P&&T.lighting.selfShadow&&T.lighting.selfShadow.enabled;L!==M.selfShadow&&(C.selfShadow=L,A=!0);var F=L?T.lighting.selfShadow.penumbra:0;F!==M.selfShadowPenumbra&&(C.selfShadowPenumbra=F,A=!0);var w=L?T.lighting.selfShadow.diffuseFlatThreshold:0;w!==M.selfShadowThreshold&&(C.selfShadowThreshold=w,A=!0);var O=!!T.smoothPixelArt;O!==M.smoothPixelArt&&(C.smoothPixelArt=O,C.texRes=O,A=!0),this._renderOptionsChanged=A},updateShaderConfig:function(){var T=this.programManager,C=this.renderOptions,M=this.nextRenderOptions,A;if(C.multiTexturing!==M.multiTexturing){var R=M.multiTexturing;C.multiTexturing=R;var P=T.getAdditionsByTag("TexCount")[0];P&&T.replaceAddition(P.name,s(R?this.maxTexturesPerBatch:1));var L=T.getAdditionsByTag("TEXTURE")[0];L&&T.replaceAddition(L.name,u(R?this.maxTexturesPerBatch:1))}if(C.lighting!==M.lighting){var F=M.lighting;C.lighting=F;var w=T.getAdditionsByTag("LIGHTING");for(A=0;A<w.length;A++){var O=w[A];O.disable=!F}if(F){var B=T.getAddition("DefineLights");B&&(B.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}}if(C.selfShadow!==M.selfShadow){var I=M.selfShadow;C.selfShadow=I,I?T.addFeature("SELFSHADOW"):T.removeFeature("SELFSHADOW")}if(C.selfShadowPenumbra=M.selfShadowPenumbra,C.selfShadowThreshold=M.selfShadowThreshold,C.smoothPixelArt!==M.smoothPixelArt){var D=M.smoothPixelArt;C.smoothPixelArt=D;var N=T.getAddition("SmoothPixelArt");N&&(N.disable=!D)}if(C.texRes!==M.texRes){var z=M.texRes;C.texRes=z;var V=T.getAddition("GetTexRes");V&&(V.disable=!z)}},run:function(T){if(this.instanceCount!==0){this.onRunBegin(T),this.pushCurrentBatchEntry();var C=this.programManager,M=this.bytesPerIndexPerInstance,A=this.indicesPerInstance,R=this.manager.renderer,P=this.vertexBufferLayout.buffer;P.update(this.instanceCount*this.bytesPerInstance);for(var L=this.batchEntries.length,F=0;F<L;F++){var w=this.batchEntries[F];this.finalizeTextureCount(w.unit);var O=C.getCurrentProgramSuite();if(O){var B=O.program,I=O.vao;this.setupUniforms(T),C.applyUniforms(B),this.renderOptions.texRes&&(this.setupTextureUniforms(w.texture),C.applyUniforms(B)),R.drawElements(T,w.texture,B,I,w.count*A,w.start*M)}}this.instanceCount=0,this.currentBatchEntry.start=0,this.batchEntries.length=0,this.onRunEnd(T)}},batch:function(T,C,M,A,R,P,L,F,w,O,B,I,D,N,z,V,U,G,b,Y){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,T),this.updateRenderOptions(Y),this._renderOptionsChanged&&(this.run(T),this.updateShaderConfig());var W=this.batchTextures(C,Y),H=this.instanceCount*this.floatsPerInstance,X=this.vertexBufferLayout.buffer,K=X.viewF32,Z=X.viewU32;K[H++]=R,K[H++]=P,K[H++]=B,K[H++]=I+N,K[H++]=W,K[H++]=z,Z[H++]=U,K[H++]=M,K[H++]=A,K[H++]=B,K[H++]=I,K[H++]=W,K[H++]=z,Z[H++]=V,K[H++]=w,K[H++]=O,K[H++]=B+D,K[H++]=I+N,K[H++]=W,K[H++]=z,Z[H++]=b,K[H++]=L,K[H++]=F,K[H++]=B+D,K[H++]=I,K[H++]=W,K[H++]=z,Z[H++]=G,this.instanceCount++,this.currentBatchEntry.count++,this.instanceCount===this.instancesPerBatch&&this.run(T)},batchTextures:function(T,C){var M=this.renderOptions,A=0,R=this.currentBatchEntry;if(M.multiTexturing)A=T.batchUnit,A===-1&&(R.texture.length===this.maxTexturesPerBatch&&(this.pushCurrentBatchEntry(),R=this.currentBatchEntry),A=R.unit,T.batchUnit=A,R.texture[A]=T,R.unit++);else if(M.lighting){A=C.lighting.normalMapRotation;var P=C.lighting.normalGLTexture;(R.texture[0]!==T||R.texture[1]!==P)&&(this.pushCurrentBatchEntry(),R=this.currentBatchEntry,T.batchUnit=0,P.batchUnit=1,R.texture[0]=T,R.texture[1]=P,R.unit=2)}else R.texture[0]!==T&&(this.pushCurrentBatchEntry(),R=this.currentBatchEntry,T.batchUnit=0,R.texture[0]=T,R.unit=1);return A},pushCurrentBatchEntry:function(){if(!(this.currentBatchEntry.count<1)){this.batchEntries.push(this.currentBatchEntry);for(var T=this.currentBatchEntry.texture,C=0;C<T.length;C++)T[C].batchUnit=-1;this.currentBatchEntry={start:this.instanceCount,count:0,unit:0,texture:[]}}}});E.exports=p},72266:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(15214),x=new m({Extends:S,initialize:function(d,t){t===void 0&&(t={}),t.name||(t.name="BatchHandlerQuadSingle"),t.shaderName||(t.shaderName="STANDARD_SINGLE"),t.instancesPerBatch||(t.instancesPerBatch=1),S.call(this,d,t)}});E.exports=x},62791:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(98840),x=n(44667),h=n(44349),d=n(11653),t=n(42792),e=n(96049),l=n(74505),i=n(33997),s=n(70554),r=n(15214),o=s.getTintAppendFloatAlpha,a=new m({Extends:r,initialize:function(f,v){r.call(this,f,v),this.renderOptions.multiTexturing=!0},defaultConfig:{name:"BatchHandlerStrip",verticesPerInstance:2,indicesPerInstance:2,shaderName:"STRIP",vertexSource:x,fragmentSource:S,shaderAdditions:[t(),e(!0),l(!0),d(1),i(),h()],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(u){for(var f=new ArrayBuffer(u*2*2),v=new Uint16Array(f),c=v.length,g=0;g<c;g++)v[g]=g;return f},batchStrip:function(u,f,v,c,g,p,T,C,M,A,R,P){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,u);var L=g.length/(2*this.verticesPerInstance);if(L>this.instancesPerBatch)throw new Error("BatchHandlerStrip: Vertex count exceeds maximum per batch ("+this.maxVerticesPerBatch+")");this.instanceCount+L>this.instancesPerBatch&&this.run(u),this.updateRenderOptions(R),this._renderOptionsChanged&&(this.run(u),this.updateShaderConfig());var F=this.batchTextures(c),w=this.instanceCount*this.floatsPerInstance,O=this.vertexBufferLayout.buffer,B=O.viewF32,I=O.viewU32,D=!1;if(this.instanceCount>0){var N=1+this.floatsPerInstance/this.verticesPerInstance;B[w++]=B[w-N],B[w++]=B[w-N],B[w++]=B[w-N],B[w++]=B[w-N],B[w++]=B[w-N],B[w++]=B[w-N],I[w++]=I[w-N],D=!0}var z;P&&(z=[]);for(var V=v.a,U=v.b,G=v.c,b=v.d,Y=v.e,W=v.f,H=g.length,X=0;X<H;X+=2){var K=g[X],Z=g[X+1],Q=K*V+Z*G+Y,j=K*U+Z*b+W;B[w++]=Q,B[w++]=j,B[w++]=p[X],B[w++]=p[X+1],B[w++]=F,B[w++]=A,I[w++]=o(T[X/2],C[X/2]*M),D?(X-=2,this.instanceCount++,this.currentBatchEntry.count++,D=!1):z&&z.push(Q,j),X%4===2&&(this.instanceCount++,this.currentBatchEntry.count++)}P&&P.call(f,f,H,z)}});E.exports=a},21832:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(98840),x=n(44667),h=n(81084),d=n(44349),t=n(6184),e=n(11653),l=n(40829),i=n(42792),s=n(96049),r=n(33997),o=n(10455),a=n(79532),u=n(65217),f=n(74505),v=n(44832),c=n(23295),g=n(15214),p=new m({Extends:g,initialize:function(C,M){g.call(this,C,M)},defaultConfig:{name:"BatchHandlerTileSprite",verticesPerInstance:4,indicesPerInstance:6,shaderName:"TILESPRITE",vertexSource:x,fragmentSource:S,shaderAdditions:[o(),i(),s(!0),c(!0),v(!0),f(!0),e(1),r(),d(),t(!0),u(!0),a(!0),l(!0),h(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inFrame",size:4},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},updateRenderOptions:function(T){g.prototype.updateRenderOptions.call(this,T);var C=this.renderOptions,M=this.nextRenderOptions,A=this._renderOptionsChanged;M.clampFrame=!!T.clampFrame,M.clampFrame!==C.clampFrame&&(A=!0),M.wrapFrame=!!T.wrapFrame,M.wrapFrame!==C.wrapFrame&&(A=!0),M.texRes=M.clampFrame||M.texRes,M.texRes!==C.texRes&&(A=!0),A&&(this._renderOptionsChanged=!0)},updateShaderConfig:function(){g.prototype.updateShaderConfig.call(this);var T=this.programManager,C=this.renderOptions,M=this.nextRenderOptions;if(M.clampFrame!==C.clampFrame){var A=M.clampFrame;C.clampFrame=A;var R=T.getAddition("TexCoordFrameClamp");R.disable=!M.clampFrame}if(M.wrapFrame!==C.wrapFrame){var P=M.wrapFrame;C.wrapFrame=P;var L=T.getAddition("TexCoordFrameWrap");L.disable=!P}},batch:function(T,C,M,A,R,P,L,F,w,O,B,I,D,N,z,V,U,G,b,Y,W,H,X,K,Z,Q,j,J){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,T),this.updateRenderOptions(Y),this._renderOptionsChanged&&(this.run(T),this.updateShaderConfig());var tt=this.batchTextures(C,Y),k=this.instanceCount*this.floatsPerInstance,q=this.vertexBufferLayout.buffer,_=q.viewF32,rt=q.viewU32;_[k++]=R,_[k++]=P,_[k++]=X,_[k++]=K,_[k++]=B,_[k++]=I,_[k++]=D,_[k++]=N,_[k++]=tt,_[k++]=z,rt[k++]=U,_[k++]=M,_[k++]=A,_[k++]=W,_[k++]=H,_[k++]=B,_[k++]=I,_[k++]=D,_[k++]=N,_[k++]=tt,_[k++]=z,rt[k++]=V,_[k++]=w,_[k++]=O,_[k++]=j,_[k++]=J,_[k++]=B,_[k++]=I,_[k++]=D,_[k++]=N,_[k++]=tt,_[k++]=z,rt[k++]=b,_[k++]=L,_[k++]=F,_[k++]=Z,_[k++]=Q,_[k++]=B,_[k++]=I,_[k++]=D,_[k++]=N,_[k++]=tt,_[k++]=z,rt[k++]=G,this.instanceCount++,this.currentBatchEntry.count++,this.instanceCount===this.instancesPerBatch&&this.run(T)}});E.exports=p},62087:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=n(83419),x=n(81084),h=n(6184),d=n(13198),t=n(73416),e=n(91627),l=n(70554),i=n(13961),s=new S({Extends:i,initialize:function(o,a){i.call(this,o,this.defaultConfig,a),this._emptyTextures=[],this.vertexCount=0,this._lightVector=new m,this.renderOptions={lighting:!1},this.nextRenderOptions={lighting:!1},this._renderOptionsChanged=!1},defaultConfig:{name:"BatchHandlerTriFlat",verticesPerInstance:3,indicesPerInstance:3,shaderName:"FLAT",vertexSource:e,fragmentSource:t,shaderAdditions:[h(!0),d(!0),x(!0)],indexBufferDynamic:!0,vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(r){return new ArrayBuffer(r*3*2)},setupUniforms:function(r){var o=this.programManager;r.renderer.setProjectionMatrixFromDrawingContext(r),o.setUniform("uProjectionMatrix",r.renderer.projectionMatrix.val),this.renderOptions.lighting&&(l.updateLightingUniforms(this.renderOptions.lighting,r,o,1,this._lightVector),o.setUniform("uResolution",[r.width,r.height]))},updateRenderOptions:function(r){var o=this.nextRenderOptions,a=this.renderOptions,u=!1;r!==a.lighting&&(o.lighting=r,u=!0),this._renderOptionsChanged=u},updateShaderConfig:function(){var r=this.programManager,o=this.renderOptions,a=this.nextRenderOptions;if(o.lighting!==a.lighting){var u=a.lighting;o.lighting=u;for(var f=r.getAdditionsByTag("LIGHTING"),v=0;v<f.length;v++){var c=f[v];c.disable=!u}if(u){var g=r.getAddition("DefineLights");g&&(g.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}}},run:function(r){if(this.instanceCount!==0){this.onRunBegin(r);var o=this.programManager,a=o.getCurrentProgramSuite();if(a){var u=a.program,f=a.vao;this.setupUniforms(r),o.applyUniforms(u);var v=this.indicesPerInstance,c=this.instanceCount,g=this.manager.renderer,p=this.vertexBufferLayout.buffer,T=this.vertexBufferLayout.layout.stride;p.update(this.vertexCount*T),f.bind(),f.indexBuffer.update(c*v*2),g.drawElements(r,this._emptyTextures,u,f,c*v,0,g.gl.TRIANGLES)}this.instanceCount=0,this.vertexCount=0,this.onRunEnd(r)}},batch:function(r,o,a,u,f){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,r),this.updateRenderOptions(f),this._renderOptionsChanged&&(this.run(r),this.updateShaderConfig());for(var v=0,c=0,g=this.instancesPerBatch,p=this.vertexBufferLayout.layout.stride,T=this.verticesPerInstance,C=this.indexBuffer,M=C.viewU16,A=this.instanceCount*this.indicesPerInstance,R=this.vertexBufferLayout.buffer,P=R.viewF32,L=R.viewU32,F=this.vertexCount*p/P.BYTES_PER_ELEMENT,w=[],O=0,B=[],I=0,D=0;D<o.length;D++){var N=o[D],z=N*2;w[D]!==v&&(P[F++]=a[z],P[F++]=a[z+1],L[F++]=u[N],w[O++]=v,B[I++]=this.vertexCount,this.vertexCount++);var V=B[I-1];M[A++]=V,c++,c===T&&(this.instanceCount++,c=0),(this.instanceCount===g||c===0&&A+T>=M.length)&&(v++,this.run(r),A=this.instanceCount*this.indicesPerInstance,F=this.vertexCount*p/P.BYTES_PER_ELEMENT,O=0,I=0)}}});E.exports=s},61842:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19715),S=n(1e3),x=n(61340),h=n(87841),d=n(43855),t=n(83419),e=n(70554),l=n(6141);function i(r){return e.getTintAppendFloatAlpha(16777215,r)}var s=new t({Extends:l,initialize:function(o){l.call(this,"Camera",o),this.batchHandlerQuadSingleNode=o.getNode("BatchHandlerQuadSingle"),this.fillCameraNode=o.getNode("FillCamera"),this.listCompositorNode=o.getNode("ListCompositor"),this._parentTransformMatrix=new x},run:function(r,o,a,u,f,v){this.onRunBegin(r);var c,g=r.renderer.drawingContextPool,p=this.manager,T=a.alpha,C=a.filters.internal.getActive(),M=a.filters.external.getActive(),A=f||a.forceComposite||C.length||M.length||T<1;u?a.matrixExternal.multiply(u,u):u=this._parentTransformMatrix.copyFrom(a.matrixExternal);var R=u.decomposeMatrix(),P=d(R.translateX,0)&&d(R.translateY,0)&&d(R.rotation,0)&&d(R.scaleX,1)&&d(R.scaleY,1),L=a.x,F=a.y,w=a.width,O=a.height,B=r.getClone();B.setCamera(a),A?(c=g.get(w,O),c.setCamera(a),c.setScissorBox(0,0,w,O)):(c=B,c.setScissorBox(L,F,w,O)),c.use();var I=this.fillCameraNode;if(a.backgroundColor.alphaGL>0){var D=a.backgroundColor,N=S(D.red,D.green,D.blue,D.alpha);I.run(c,N,A)}this.listCompositorNode.run(c,o,null,v);var z=a.flashEffect;z.postRenderWebGL()&&(N=S(z.red,z.green,z.blue,z.alpha*255),I.run(c,N,A));var V=a.fadeEffect;if(V.postRenderWebGL()&&(N=S(V.red,V.green,V.blue,V.alpha*255),I.run(c,N,A)),p.finishBatch(),A){var U,G,b,Y,W,H={smoothPixelArt:p.renderer.game.config.smoothPixelArt},X=new h(0,0,c.width,c.height);for(U=0;U<C.length;U++)G=C[U],Y=p.getNode(G.renderNode),c=Y.run(G,c),b=G.getPadding(),X.setTo(X.x+b.x,X.y+b.y,X.width+b.width,X.height+b.height);var K=c,Z=M.length>0,Q=!Z,j=new h(0,0,B.width,B.height);if(Z){for(U=M.length-1;U>=0;U--)G=M[U],G.active&&(b=G.getPadding(),j.setTo(j.x+b.x,j.y+b.y,j.width+b.width,j.height+b.height));Q=j.width!==c.width||j.height!==c.height||!P,Q&&(c=g.get(j.width,j.height),c.setScissorBox(0,0,j.width,j.height),c.setCamera(B.camera),c.use())}else c=B;if(Q){var J=j.x,tt=j.y,k;u.setQuad(X.x,X.y,X.x+X.width,X.y+X.height),k=u.quad,W=Z?4294967295:i(T),this.batchHandlerQuadSingleNode.batch(c,K.texture,k[0]-J,k[1]-tt,k[2]-J,k[3]-tt,k[6]-J,k[7]-tt,k[4]-J,k[5]-tt,0,1,1,-1,!1,W,W,W,W,H)}if(K!==c&&K.release(),Z){var q=!1;for(K=null,b=new h,U=0;U<M.length;U++)G=M[U],G.allowBaseDraw&&c.width===B.width&&c.height===B.height&&U===M.length-1&&T===1&&(q=!0,K=B),Y=p.getNode(G.renderNode),c=Y.run(G,c,K,b),b=G.currentPadding,b.x=-b.x,b.y=-b.y,b.width=-b.width,b.height=-b.height;if(!q){W=i(T);var _=-b.x,rt=-b.y,at=c.width+b.right,ht=c.height+b.bottom;this.batchHandlerQuadSingleNode.batch(B,c.texture,_,ht,_,rt,at,ht,at,rt,0,0,1,1,!1,W,W,W,W,H),c.release()}}}a.dirty=!1,a.emit(m.POST_RENDER,a),this.onRunEnd(r)}});E.exports=s},76409:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(6141),x=new m({Extends:S,initialize:function(d){S.call(this,"DrawLine",d)},run:function(h,d,t,e,l,i,s,r,o){this.onRunBegin(h);var a=l-t,u=i-e,f=Math.sqrt(a*a+u*u),v=s*(i-e)/f,c=s*(t-l)/f,g=r*(i-e)/f,p=r*(t-l)/f,T=l-g,C=i-p,M=t-v,A=e-c,R=l+g,P=i+p,L=t+v,F=e+c,w=o.length;d?(o[w+0]=d.getX(L,F),o[w+1]=d.getY(L,F),o[w+2]=d.getX(M,A),o[w+3]=d.getY(M,A),o[w+4]=d.getX(T,C),o[w+5]=d.getY(T,C),o[w+6]=d.getX(R,P),o[w+7]=d.getY(R,P)):(o[w+0]=L,o[w+1]=F,o[w+2]=M,o[w+3]=A,o[w+4]=T,o[w+5]=C,o[w+6]=R,o[w+7]=P),this.onRunEnd(h)}});E.exports=x},95449:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19715),S=n(42538),x=n(83419),h=n(10312),d=n(6141),t=new x({Extends:d,initialize:function(l){d.call(this,"DynamicTextureHandler",l),this.fillRectNode=this.manager.getNode("FillRect")},run:function(e){var l=e.drawingContext,i=l.camera,s=l.renderer,r=e.manager;this.onRunBegin(l);var o=l.framebuffer.renderTexture;if(o)for(var a=s.glTextureUnits,u=a.units,f=0;f<u.length;f++)u[f]===o&&a.bind(null,f);l.setScissorBox(0,0,i.width,i.height),l.use();for(var v,c,g,p,T,C,M,A,R,P,L,F,w,O,B=e.commandBuffer,I=B.length,D=!1,N=null,z=!1,V=l,U=s.gl,G=0;G<I;G++){var b=B[G];switch(b){case S.CLEAR:{w=B[++G],O=B[++G],F=B[++G],p=B[++G];var Y=V.getClone();Y.setScissorEnable(!0),Y.setScissorBox(w,O,F,p),Y.use(),Y.clear(U.COLOR_BUFFER_BIT|U.DEPTH_BUFFER_BIT|U.STENCIL_BUFFER_BIT),Y.release();break}case S.FILL:{var W=B[++G];w=B[++G],O=B[++G],F=B[++G],p=B[++G],this.fillRectNode.run(V,null,null,w,O,F,p,W,W,W,W,!1);break}case S.STAMP:{T=B[++G],g=B[++G],w=B[++G],O=B[++G],v=B[++G],L=B[++G],A=B[++G],R=B[++G],P=B[++G],C=B[++G],M=B[++G],c=B[++G];var H=r.resetStamp(v,L);H.setPosition(w,O).setRotation(A).setTexture(T,g).setOrigin(C,M).setScale(R,P).setBlendMode(c),V=this._draw(s,H,V,l,N);break}case S.REPEAT:{T=B[++G],g=B[++G],w=B[++G],O=B[++G],v=B[++G],L=B[++G],A=B[++G],R=B[++G],P=B[++G],C=B[++G],M=B[++G],c=B[++G],F=B[++G],p=B[++G];var X=B[++G],K=B[++G],Z=B[++G],Q=B[++G],j=B[++G],J=r.resetTileSprite(v,L);J.setPosition(w,O).setRotation(A).setTexture(T,g).setSize(F,p).setOrigin(C,M).setScale(R,P).setBlendMode(c).setTilePosition(X,K).setTileRotation(Z).setTileScale(Q,j),V=this._draw(s,J,V,l,N);break}case S.DRAW:{var tt=B[++G];if(w=B[++G],O=B[++G],w!==void 0){var k=tt.x;tt.x+=w}if(O!==void 0){var q=tt.y;tt.y+=O}V=this._draw(s,tt,V,l,N),w!==void 0&&(tt.x=k),O!==void 0&&(tt.y=q);break}case S.SET_ERASE:{D=B[++G],D?(N||(N=l.getClone(),N.setBlendMode(h.ERASE)),V!==N&&(V.release(),V=N,N.use())):V===N&&(N.release(),V=l,l.use());break}case S.PRESERVE:{z=B[++G];break}case S.CALLBACK:{var _=B[++G];_();break}case S.CAPTURE:{tt=B[++G];var rt=B[++G],at=e.startCapture(tt,rt),ht=V;rt.camera&&(ht=ht.getClone(),ht.setCamera(rt.camera),ht.use()),this._draw(s,tt,ht,l,N,at.transform),e.finishCapture(tt,at),rt.camera&&ht.release();break}}}z||(B.length=0),V.release(),i.emit(m.POST_RENDER,i),this.onRunEnd(l)},_draw:function(e,l,i,s,r,o){if(i!==r&&l.blendMode!==i.blendMode&&l.blendMode!==h.SKIP_CHECK){i.release();var a=l.blendMode;a===s.blendMode?i=s:(i=s.getClone(),i.setBlendMode(a)),i.use()}return l.renderWebGLStep(e,l,i,o),i}});E.exports=t},61199:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(6141),x=new m({Extends:S,initialize:function(d){S.call(this,"FillCamera",d),this.fillRectNode=this.manager.getNode("FillRect")},run:function(h,d,t){this.onRunBegin(h);var e=h.camera,l=t?0:e.x,i=t?0:e.y,s=e.width,r=e.height;this.fillRectNode.run(h,null,null,l,i,s,r,d,d,d,d),this.onRunEnd(h)}});E.exports=x},14255:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(94811),S=n(83419),x=n(6141),h=new S({Extends:x,initialize:function(t){x.call(this,"FillPath",t)},run:function(d,t,e,l,i,s,r,o,a){this.onRunBegin(d),o===void 0&&(o=0);var u=l.length,f,v,c,g,p,T,C=0,M=0,A=[],R=[],P=0;for(v=0;v<u;v++)c=l[v],p=t.getX(c.x,c.y),T=t.getY(c.x,c.y),!(v>0&&v<u-1&&Math.abs(p-A[C-2])<=o&&Math.abs(T-A[C-1])<=o)&&(A[C++]=p,A[C++]=T);if(g=m(A),i===s&&i===r){var L=A.length;for(f=0;f<L;f+=2)R[P++]=i;e.batch(d,g,A,R,a)}else{var F=g.length,w=Array(F),O=Array(F*2),B=0;for(f=0;f<F;f+=3){var I=g[f]*2;p=A[I+0],T=A[I+1],O[B++]=p,O[B++]=T,I=g[f+1]*2,p=A[I+0],T=A[I+1],O[B++]=p,O[B++]=T,I=g[f+2]*2,p=A[I+0],T=A[I+1],O[B++]=p,O[B++]=T,R[P++]=i,R[P++]=s,R[P++]=r,w[M++]=f+0,w[M++]=f+1,w[M++]=f+2}e.batch(d,w,O,R,a)}this.onRunEnd(d)}});E.exports=h},12682:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=n(83419),x=n(6141),h=new S({Extends:x,initialize:function(t){x.call(this,"FillRect",t),this._batchHandlerDefault=t.getNode("BatchHandlerTriFlat"),this._identityMatrix=new m,this._indexedTriangles=[0,1,2,2,3,0]},run:function(d,t,e,l,i,s,r,o,a,u,f,v){this.onRunBegin(d),t||(t=this._identityMatrix),e||(e=this._batchHandlerDefault);var c=t.setQuad(l,i,l+s,i+r);e.batch(d,this._indexedTriangles,c,[o,u,f,a],v),this.onRunEnd(d)}});E.exports=h},13119:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(6141),x=new m({Extends:S,initialize:function(d){S.call(this,"FillTri",d),this._indexedTriangles=[0,1,2]},run:function(h,d,t,e,l,i,s,r,o,a,u,f,v){this.onRunBegin(h),d?t.batch(h,this._indexedTriangles,[d.getX(e,l),d.getY(e,l),d.getX(i,s),d.getY(i,s),d.getX(r,o),d.getY(r,o)],[a,u,f],v):t.batch(h,this._indexedTriangles,[e,l,i,s,r,o],[a,u,f],v),this.onRunEnd(h)}});E.exports=x},27996:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(8054),x=n(6141),h=new m({Extends:x,initialize:function(t){x.call(this,"ListCompositor",t)},run:function(d,t,e,l){this.onRunBegin(d);for(var i=d,s=d.blendMode,r=s,o=this.manager.renderer,a=0;a<t.length;a++){var u=t[a];u.blendMode!==r&&u.blendMode!==S.BlendModes.SKIP_CHECK&&(i!==d&&i.release(),r=u.blendMode,r===s?i=d:(i=d.getClone(),i.setBlendMode(r),i.use())),u.renderWebGLStep(o,u,i,e,l,t,a)}i!==d&&i.release(),this.onRunEnd(d)}});E.exports=h},56432:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(46975),x=n(6141),h=new m({Extends:x,initialize:function(t){x.call(this,"RebindContext",t),this._state={bindings:{activeTexture:0,arrayBuffer:null,elementArrayBuffer:null,framebuffer:null,program:null,renderbuffer:null},vao:null}},run:function(d){this.onRunBegin(d);var t=this.manager.renderer,e=t.glWrapper;t.clearFramebuffer(void 0,void 0,0),e.update(S(this._state,e.state),!0),t.glTextureUnits.unbindAllUnits(),this.onRunEnd(d)}});E.exports=h},6141:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d){this.name=h,this.manager=d,this._run=null},run:function(){},onRunBegin:function(x){},onRunEnd:function(x){},setDebug:function(x){x?(this._run=this.run,this.run=function(){var h=this.manager;h.pushDebug(this.name);var d=this._run.apply(this,arguments);return h.popDebug(),d}):(this.run=this._run,this._run=null)}});E.exports=S},30130:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(50792),S=n(83419),x=n(92503),h=n(47406),d=n(53663),t=n(16971),e=n(15214),l=n(72266),i=n(62791),s=n(21832),r=n(62087),o=n(61842),a=n(76409),u=n(95449),f=n(61199),v=n(14255),c=n(12682),g=n(13119),p=n(22731),T=n(57032),C=n(52903),M=n(13922),A=n(33466),R=n(75798),P=n(90830),L=n(52302),F=n(34989),w=n(15600),O=n(99786),B=n(26703),I=n(55905),D=n(58167),N=n(13279),z=n(27459),V=n(88856),U=n(27996),G=n(56432),b=n(17486),Y=n(31029),W=n(94494),H=n(87469),X=n(89723),K=n(12913),Z=n(22995),Q=n(86081),j=n(88383),J=n(34454),tt=n(46211),k=n(95433),q=new S({Extends:m,initialize:function(rt){m.call(this),this.renderer=rt;var at=rt.game;this.maxParallelTextureUnits=at.config.autoMobileTextures&&!at.device.os.desktop?1:rt.maxTextures,this._nodes={},this._nodeConstructors={BaseFilter:h,BaseFilterShader:d,BatchHandlerPointLight:t,BatchHandlerQuad:e,BatchHandlerQuadSingle:l,BatchHandlerStrip:i,BatchHandlerTileSprite:s,BatchHandlerTriFlat:r,Camera:o,DrawLine:a,DynamicTextureHandler:u,FillCamera:f,FillPath:v,FillRect:c,FillTri:g,FilterBarrel:p,FilterBlend:T,FilterBlocky:C,FilterBlur:M,FilterBlurHigh:A,FilterBlurLow:R,FilterBlurMed:P,FilterBokeh:L,FilterColorMatrix:F,FilterDisplacement:w,FilterGlow:O,FilterMask:B,FilterParallelFilters:I,FilterPixelate:D,FilterSampler:N,FilterShadow:z,FilterThreshold:V,ListCompositor:U,RebindContext:G,StrokePath:b,SubmitterQuad:Y,SubmitterTile:W,SubmitterTilemapGPULayer:H,SubmitterTileSprite:X,TexturerImage:K,TexturerTileSprite:Z,TransformerImage:Q,TransformerStamp:j,TransformerTile:J,TransformerTileSprite:tt,YieldContext:k},Object.entries(at.config.renderNodes).forEach(function(ht){var ot=ht[0],nt=ht[1];this.addNodeConstructor(ot,nt)},this),this.currentBatchNode=null,this.currentBatchDrawingContext=null,this.debug=!1,this.debugGraph=null,this.currentDebugNode=null},addNode:function(_,rt){if(this._nodes[_])throw new Error("node "+_+" already exists.");this._nodes[_]=rt,this.debug&&rt.setDebug(!0)},addNodeConstructor:function(_,rt){if(this._nodeConstructors[_])throw new Error("node constructor "+_+" already exists.");this._nodeConstructors[_]=rt},getNode:function(_){if(this._nodes[_])return this._nodes[_];if(this._nodeConstructors[_]){var rt=new this._nodeConstructors[_](this);return this.addNode(_,rt),rt}return null},hasNode:function(_,rt){return!!this._nodes[_]||!rt&&!!this._nodeConstructors[_]},setCurrentBatchNode:function(_,rt){this.currentBatchNode!==_&&(this.currentBatchNode!==null&&this.currentBatchNode.run(this.currentBatchDrawingContext),this.currentBatchNode=_,this.currentBatchDrawingContext=_?rt:null)},setMaxParallelTextureUnits:function(_){this.maxParallelTextureUnits=Math.max(1,Math.min(_,this.renderer.maxTextures)),this.emit(x.SET_PARALLEL_TEXTURE_UNITS,this.maxParallelTextureUnits)},finishBatch:function(){this.currentBatchNode!==null&&this.setCurrentBatchNode(null)},startStandAloneRender:function(){this.finishBatch()},setDebug:function(_){this.debug=_;for(var rt in this._nodes)this._nodes[rt].setDebug(_);_&&(this.debugGraph=null,this.currentDebugNode=null,this.pushDebug("[Render Tree Root]"),this.renderer.once(x.POST_RENDER,function(){this.setDebug(!1)},this))},pushDebug:function(_){if(this.debug){var rt={name:_,children:[],parent:this.currentDebugNode};this.debugGraph?this.currentDebugNode.children.push(rt):this.debugGraph=rt,this.currentDebugNode=rt}},popDebug:function(){this.debug&&(this.currentDebugNode.parent?this.currentDebugNode=this.currentDebugNode.parent:this.currentDebugNode=null)},debugToString:function(){var _="",rt=0,at=this.debugGraph;function ht(nt){return" ".repeat(nt)}function ot(nt,it){for(var lt=ht(it)+nt.name+`
|
||
`,dt=0;dt<nt.children.length;dt++)lt+=ot(nt.children[dt],it+1);return lt}return _=ot(at,rt),_}});E.exports=q},55403:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(40952),x=n(56436),h=n(6141),d=n(65884),t=n(72823),e=new m({Extends:h,initialize:function(i,s){h.call(this,"ShaderQuad",i);var r=i.renderer;this.renderer=r,s=this._completeConfig(s),s.updateShaderConfig&&(this.updateShaderConfig=s.updateShaderConfig),this.indexBuffer=r.genericQuadIndexBuffer,this.vertexBufferLayout=new S(r,s.vertexBufferLayout,null),this.programManager=new x(r,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(s.shaderName,s.vertexSource,s.fragmentSource);for(var o=0;o<s.shaderAdditions.length;o++){var a=s.shaderAdditions[o];this.programManager.addAddition(a)}this.setUniform=this.programManager.setUniform.bind(this.programManager),this.transformerNode=i.getNode("TransformerImage"),this._texturerProxy={frameWidth:1,frameHeight:1,frame:{realWidth:1,realHeight:1},uvSource:{x:0,y:0}}},_completeConfig:function(l){var i=this.renderer.gl,s=l.vertexSource;if(!s){var r=l.vertexKey;if(r){var o=this.manager.renderer.game.cache.shader.get(r);o&&o.glsl&&(s=o.glsl)}}s||(s=d);var a=l.fragmentSource;if(!a){var u=l.fragmentKey;u&&(o=this.manager.renderer.game.cache.shader.get(u),o&&o.glsl&&(a=o.glsl))}return a||(a=t),{name:l.name||"ShaderQuad",shaderName:l.shaderName||l.name||"ShaderQuad",vertexSource:s,fragmentSource:a,shaderAdditions:l.shaderAdditions||[],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2,type:i.FLOAT,normalized:!1},{name:"inTexCoord",size:2,type:i.FLOAT,normalized:!1}]}}},run:function(l,i,s){var r=this.manager,o=this.renderer;r.startStandAloneRender(),this.onRunBegin(l);var a=i.width,u=i.height;this._texturerProxy.frame.realWidth=a,this._texturerProxy.frame.realHeight=u,this._texturerProxy.frameWidth=a,this._texturerProxy.frameHeight=u;var f,v,c,g,p,T,C,M;if(i.renderToTexture)f=0,v=0,c=0,g=u,p=a,T=u,C=a,M=0;else{var A=this.transformerNode;A.run(l,i,this._texturerProxy,s);var R=A.quad;f=R[0],v=R[1],c=R[2],g=R[3],p=R[4],T=R[5],C=R[6],M=R[7]}var P=this.vertexBufferLayout.layout.stride,L=this.vertexBufferLayout.buffer,F=L.viewF32,w=0;F[w++]=c,F[w++]=g,F[w++]=i.textureCoordinateBottomLeft.x,F[w++]=i.textureCoordinateBottomLeft.y,F[w++]=f,F[w++]=v,F[w++]=i.textureCoordinateTopLeft.x,F[w++]=i.textureCoordinateTopLeft.y,F[w++]=p,F[w++]=T,F[w++]=i.textureCoordinateBottomRight.x,F[w++]=i.textureCoordinateBottomRight.y,F[w++]=C,F[w++]=M,F[w++]=i.textureCoordinateTopRight.x,F[w++]=i.textureCoordinateTopRight.y,L.update(P*4);var O=this.programManager;this.updateShaderConfig(l,i,this);var B=O.getCurrentProgramSuite();if(B){var I=B.program,D=B.vao,N=this.setUniform;o.setProjectionMatrixFromDrawingContext(l),N("uProjectionMatrix",l.renderer.projectionMatrix.val),i.setupUniforms(N,l),O.applyUniforms(I),o.drawElements(l,this.setupTextures(i),I,D,4,0)}this.onRunEnd(l)},setupTextures:function(l){for(var i=l.textures,s=[],r=0;r<i.length;r++){var o=i[r],a=o.get().source.glTexture;s.push(a)}return s},updateShaderConfig:function(l,i,s){}});E.exports=e},17486:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(6141),x=new m({Extends:S,initialize:function(d){S.call(this,"StrokePath",d),this.drawLineNode=this.manager.getNode("DrawLine")},run:function(h,d,t,e,l,i,s,r,o,a,u,f){this.onRunBegin(h);var v=this.drawLineNode,c=t.length-1,g,p,T=!1,C=!1;e>2&&c>1&&(T=!0,l||(C=!0));for(var M=[],A=0,R=[],P=0,L,F=[],w=0,O,B,I,D,N=u*u,z,V,U,G=0;G<c;G+=U){if(z=G===0,V=G===c-1,U=1,g=t[G],p=t[G+U],N&&!V)for(O=p.x-g.x,B=p.y-g.y,I=i.getX(O,B)-i.tx,D=i.getY(O,B)-i.ty;G+U<c-1&&I*I+D*D<=N;)U++,p=t[G+U],O=p.x-g.x,B=p.y-g.y,I=i.getX(O,B)-i.tx,D=i.getY(O,B)-i.ty;v.run(h,i,g.x,g.y,p.x,p.y,g.width/2,p.width/2,R),P+=8,L=P/2,F[w++]=s,F[w++]=o,F[w++]=a,F[w++]=r,M[A++]=L-4,M[A++]=L-3,M[A++]=L-2,M[A++]=L-2,M[A++]=L-1,M[A++]=L-4,T&&!z&&(M[A++]=L-4,M[A++]=L-3,M[A++]=L-6,M[A++]=L-6,M[A++]=L-5,M[A++]=L-4,C&&V&&(M[A++]=L-2,M[A++]=L-1,M[A++]=0,M[A++]=0,M[A++]=1,M[A++]=L-2))}d.batch(h,M,R,F,f),this.onRunEnd(h)}});E.exports=x},95433:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(6141),x=new m({Extends:S,initialize:function(d){S.call(this,"YieldContext",d),this._state={blend:this.manager.renderer.blendModes[0],vao:null}},run:function(h){this.onRunBegin(h);var d=this.manager,t=d.renderer;d.startStandAloneRender(),t.glWrapper.update(this._state),t.glTextureUnits.unbindAllUnits(),this.onRunEnd(h)}});E.exports=x},70972:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]]);E.exports=S},98682:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]]);E.exports=S},87891:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","BatchHandlerTriFlat"],["FillPath","FillPath"],["FillRect","FillRect"],["FillTri","FillTri"],["StrokePath","StrokePath"]]);E.exports=S},40939:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"],["Transformer","TransformerImage"],["Texturer","TexturerImage"]]);E.exports=S},68668:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]]);E.exports=S},43246:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["BatchHandler","BatchHandlerPointLight"]]);E.exports=S},30529:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["BatchHandler","BatchHandlerQuad"]]);E.exports=S},85760:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["BatchHandler","BatchHandlerStrip"]]);E.exports=S},78705:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"],["Transformer","TransformerStamp"],["Texturer","TexturerImage"]]);E.exports=S},41571:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","SubmitterTileSprite"],["BatchHandler","BatchHandlerTileSprite"],["Transformer","TransformerTileSprite"],["Texturer","TexturerTileSprite"]]);E.exports=S},67743:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","SubmitterTilemapGPULayer"]]);E.exports=S},79317:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=new m([["Submitter","SubmitterTile"],["BatchHandler","BatchHandlerTileSprite"],["Transformer","TransformerTile"]]);E.exports=S},59212:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={DefaultBitmapTextNodes:n(70972),DefaultBlitterNodes:n(98682),DefaultGraphicsNodes:n(87891),DefaultImageNodes:n(40939),DefaultParticleEmitterNodes:n(68668),DefaultPointLightNodes:n(43246),DefaultQuadNodes:n(30529),DefaultRopeNodes:n(85760),DefaultStampNodes:n(78705),DefaultTilemapGPULayerNodes:n(67743),DefaultTilemapLayerNodes:n(79317),DefaultTileSpriteNodes:n(41571)};E.exports=m},47406:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(6141),x=new m({Extends:S,initialize:function(d,t){S.call(this,d,t)},run:function(h,d,t,e){}});E.exports=x},53663:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(2807),x=n(99501),h=n(56436),d=n(40952),t=n(47406),e=new m({Extends:t,initialize:function(s,r,o,a,u){if(!a){var f=r.renderer.game.cache.shader.get(o);if(!(f&&f.glsl))throw new Error("BaseFilterShader: No fragment shader source provided and no shader found with key "+o);a=f.glsl}t.call(this,s,r);var v=r.renderer,c=v.gl,g={shaderName:s,vertexSource:S,fragmentSource:a,shaderAdditions:u||[],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2,type:c.FLOAT,normalized:!1},{name:"inTexCoord",size:2,type:c.FLOAT,normalized:!1}]}};g.shaderAdditions.push(x()),this.indexBuffer=v.genericQuadIndexBuffer,this.vertexBufferLayout=new d(v,g.vertexBufferLayout,null),this.programManager=new h(v,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(g.shaderName,g.vertexSource,g.fragmentSource);for(var p=0;p<g.shaderAdditions.length;p++){var T=g.shaderAdditions[p];this.programManager.addAddition(T)}this.programManager.setUniform("uMainSampler",0)},run:function(i,s,r,o){var a=this.manager,u=a.renderer;a.startStandAloneRender(),o||(o=i.getPadding()),r||(r=u.drawingContextPool.get(s.width+o.width,s.height+o.height)),r.use(),this.onRunBegin(r);var f=[s.texture];this.setupTextures(i,f,r);var v=-1,c=-1,g=-1,p=1,T=1,C=1,M=1,A=-1;if(o.left){var R=2*o.left/r.width;v-=R,g-=R}if(o.right){var P=2*o.right/r.width;M-=P,T-=P}if(o.top){var L=2*o.top/r.height;p+=L,C+=L}if(o.bottom){var F=2*o.bottom/r.height;c+=F,A+=F}var w=this.vertexBufferLayout.layout.stride,O=this.vertexBufferLayout.buffer,B=O.viewF32,I=0;B[I++]=-1,B[I++]=-1,B[I++]=l(0,v,M),B[I++]=l(0,c,A),B[I++]=-1,B[I++]=1,B[I++]=l(0,g,T),B[I++]=l(1,p,C),B[I++]=1,B[I++]=-1,B[I++]=l(1,v,M),B[I++]=l(0,c,A),B[I++]=1,B[I++]=1,B[I++]=l(1,g,T),B[I++]=l(1,p,C),O.update(w*4);var D=this.programManager;this.updateShaderConfig(i,r);var N=D.getCurrentProgramSuite();if(N){var z=N.program,V=N.vao;this.setupUniforms(i,r),D.applyUniforms(z),u.drawElements(r,f,z,V,4,0)}return s.release(),this.onRunEnd(r),r},updateShaderConfig:function(i,s){},setupTextures:function(i,s,r){},setupUniforms:function(i,s){}});function l(i,s,r){return s=(1/s+1)*.5,r=(1/r+1)*.5,s+i*(r-s)}E.exports=e},22731:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(10235),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterBarrel",t,null,x)},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("amount",d.amount)}});E.exports=h},57032:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=n(83419),x=n(10312),h=n(53663),d=n(65980),t=new S({Extends:h,initialize:function(l){this._blendModeMap=new m;var i=this._blendModeMap;Object.entries(x).forEach(function(o){i.set(o[1],o[0])});var s=i.get(x.NORMAL),r=[{name:s,additions:{fragmentHeader:"#define BLEND "+s},tags:["blendmode"]}];h.call(this,"FilterBlend",l,null,d,r)},updateShaderConfig:function(e,l){var i=e.blendMode;i===x.SKIP_CHECK&&(i=x.NORMAL);var s=this._blendModeMap.get(i)||this._blendModeMap.get(x.NORMAL),r=this.programManager.getAdditionsByTag("blendmode")[0];r.name=s,r.additions.fragmentHeader="#define BLEND "+s},setupTextures:function(e,l,i){l[1]=e.glTexture},setupUniforms:function(e,l){var i=this.programManager;i.setUniform("uMainSampler2",1),i.setUniform("amount",e.amount),i.setUniform("color",e.color)}});E.exports=t},52903:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(5899),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterBlocky",t,null,x)},setupUniforms:function(d,t){var e=this.programManager,l=Math.max(1,d.size.x),i=Math.max(1,d.size.y);e.setUniform("resolution",[t.width,t.height]),e.setUniform("uSizeAndOffset",[l,i,d.offset.x,d.offset.y])}});E.exports=h},13922:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=n(83419),x=n(47406),h=new S({Extends:x,initialize:function(t){x.call(this,"FilterBlur",t)},run:function(d,t,e,l){this.onRunBegin(e);var i=d.quality,s=d.steps,r=null;switch(i){case 2:{r=this.manager.getNode("FilterBlurHigh");break}case 1:{r=this.manager.getNode("FilterBlurMed");break}case 0:default:{r=this.manager.getNode("FilterBlurLow");break}}var o={strength:d.strength,color:d.glcolor,x:d.x,y:d.y};l||(l=d.getPadding());for(var a=t,u=0;u<s;u++){o.x=d.x,o.y=0,a=r.run(o,a,null,l),u===0&&(l=new m);var f=u===s-1?e:null;o.x=0,o.y=d.y,a=r.run(o,a,f,l)}return e=a,this.onRunEnd(e),e}});E.exports=h},33466:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(20784),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterBlurHigh",t,null,x)},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("resolution",[t.width,t.height]),e.setUniform("strength",d.strength),e.setUniform("color",d.color),e.setUniform("offset",[d.x,d.y])}});E.exports=h},75798:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(65122),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterBlurLow",t,null,x)},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("resolution",[t.width,t.height]),e.setUniform("strength",d.strength),e.setUniform("color",d.color),e.setUniform("offset",[d.x,d.y])}});E.exports=h},90830:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(60942),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterBlurMed",t,null,x)},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("resolution",[t.width,t.height]),e.setUniform("strength",d.strength),e.setUniform("color",d.color),e.setUniform("offset",[d.x,d.y])}});E.exports=h},52302:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(43722),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterBokeh",t,null,x)},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("radius",d.radius),e.setUniform("amount",d.amount),e.setUniform("contrast",d.contrast),e.setUniform("strength",d.strength),e.setUniform("blur",[d.blurX,d.blurY]),e.setUniform("isTiltShift",d.isTiltShift),e.setUniform("resolution",[t.width,t.height])}});E.exports=h},34989:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(19883),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterColorMatrix",t,null,x)},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("uColorMatrix[0]",d.colorMatrix.getData()),e.setUniform("uAlpha",d.colorMatrix.alpha)}});E.exports=h},15600:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(12886),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterDisplacement",t,null,x)},setupTextures:function(d,t){t[1]=d.glTexture},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("uDisplacementSampler",1),e.setUniform("amount",[d.x,d.y])}});E.exports=h},99786:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(33016),h=new m({Extends:S,initialize:function(t){var e=[{name:"distance_10.0",additions:{fragmentDefine:"#define DISTANCE 10.0"},tags:["distance"]},{name:"quality_0.1",additions:{fragmentDefine:"#define QUALITY 0.1"},tags:["quality"]}];S.call(this,"FilterGlow",t,null,x,e)},updateShaderConfig:function(d,t){var e=this.programManager,l=d.distance.toFixed(0)+".0",i=e.getAdditionsByTag("distance")[0];i.name="distance_"+l,i.additions.fragmentDefine=`#undef DISTANCE
|
||
#define DISTANCE `+l;var s=d.quality.toFixed(0)+".0",r=e.getAdditionsByTag("quality")[0];r.name="quality_"+s,r.additions.fragmentDefine=`#undef QUALITY
|
||
#define QUALITY `+s},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("resolution",[t.width,t.height]),e.setUniform("glowColor",d.glcolor),e.setUniform("outerStrength",d.outerStrength),e.setUniform("innerStrength",d.innerStrength),e.setUniform("scale",d.scale),e.setUniform("knockout",d.knockout)}});E.exports=h},26703:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(39603),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterMask",t,null,x)},setupTextures:function(d,t,e){d.maskGameObject&&(d.needsUpdate||d.autoUpdate)&&d.updateDynamicTexture(e.width,e.height),t[1]=d.glTexture},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("uMaskSampler",1),e.setUniform("invert",d.invert)}});E.exports=h},55905:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=n(83419),x=n(10312),h=n(47406),d=new S({Extends:h,initialize:function(e){h.call(this,"FilterParallelFilters",e)},run:function(t,e,l,i){this.onRunBegin(l),e.lock(this);var s=t.bottom.getActive(),r=t.top.getActive(),o=i||t.getPadding();if(s.length+r.length>0){var a=e,u=e;if(s.length>0){i=o;for(var f=0;f<s.length;f++){var v=s[f],c=this.manager.getNode(v.renderNode);a=c.run(v,a,null,i),f===0&&f<s.length-1&&(i=new m)}}if(r.length>0)for(i=o,f=0;f<r.length;f++)v=r[f],c=this.manager.getNode(v.renderNode),u=c.run(v,u,null,i),f===0&&f<r.length-1&&(i=new m);e.unlock(this),e!==a&&e!==u&&e.release();var g=t.blend;g.glTexture=u.texture,c=this.manager.getNode("FilterBlend"),l=this.manager.getNode("FilterBlend").run(t.blend,a,l,i),u.release()}else{c=this.manager.getNode("FilterBlend");var p={blendMode:x.COPY,glTexture:e.texture,amount:1,color:[1,1,1,1]};e.unlock(this),l=c.run(p,e,l,o)}return this.onRunEnd(l),l}});E.exports=d},58167:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(99191),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterPixelate",t,null,x)},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("amount",d.amount),e.setUniform("resolution",[t.width,t.height])}});E.exports=h},13279:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(47406),x=new m({Extends:S,initialize:function(d){S.call(this,"FilterSampler",d)},run:function(h,d,t,e){this.onRunBegin(d);var l=this.manager.renderer,i=0,s=0,r=1,o=1,a=d.width,u=d.height,f=!1;return h.region?(i=h.region.x,s=h.region.y,h.region.width!==void 0?(r=h.region.width,o=h.region.height):f=!0):(r=a,o=u),l.snapshotFramebuffer(d.framebuffer,a,u,h.callback,f,i,s,r,o),this.onRunEnd(d),d}});E.exports=x},27459:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(69355),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterShadow",t,null,x)},setupUniforms:function(d,t){var e=this.programManager,l=d.samples;e.setUniform("lightPosition",[d.x,1-d.y]),e.setUniform("decay",d.decay),e.setUniform("power",d.power/l),e.setUniform("color",d.glcolor),e.setUniform("samples",l),e.setUniform("intensity",d.intensity)}});E.exports=h},88856:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53663),x=n(92636),h=new m({Extends:S,initialize:function(t){S.call(this,"FilterThreshold",t,null,x)},setupUniforms:function(d,t){var e=this.programManager;e.setUniform("edge1",d.edge1),e.setUniform("edge2",d.edge2),e.setUniform("invert",d.invert)}});E.exports=h},54521:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={BaseFilter:n(47406),BaseFilterShader:n(53663),BatchHandler:n(13961),BatchHandlerPointLight:n(16971),BatchHandlerQuad:n(15214),BatchHandlerQuadSingle:n(72266),BatchHandlerStrip:n(62791),BatchHandlerTileSprite:n(21832),BatchHandlerTriFlat:n(62087),Camera:n(61842),Defaults:n(59212),DrawLine:n(76409),DynamicTextureHandler:n(95449),FillCamera:n(61199),FillPath:n(14255),FillRect:n(12682),FillTri:n(13119),FilterBarrel:n(22731),FilterBlend:n(57032),FilterBlur:n(13922),FilterBlurHigh:n(33466),FilterBlurLow:n(75798),FilterBlurMed:n(90830),FilterBokeh:n(52302),FilterColorMatrix:n(34989),FilterDisplacement:n(15600),FilterGlow:n(99786),FilterMask:n(26703),FilterParallelFilters:n(55905),FilterPixelate:n(58167),FilterSampler:n(13279),FilterShadow:n(27459),FilterThreshold:n(88856),ListCompositor:n(27996),RebindContext:n(56432),RenderNode:n(6141),StrokePath:n(17486),SubmitterQuad:n(31029),SubmitterSpriteGPULayer:n(53384),SubmitterTile:n(94494),SubmitterTilemapGPULayer:n(87469),SubmitterTileSprite:n(89723),TexturerImage:n(12913),TexturerTileSprite:n(22995),TransformerImage:n(86081),TransformerStamp:n(88383),TransformerTile:n(34454),TransformerTileSprite:n(46211),YieldContext:n(95433)};E.exports=m},31029:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(46975),x=n(70554),h=n(6141),d=x.getTintAppendFloatAlpha,t=new m({Extends:h,initialize:function(l,i){i=S(i||{},this.defaultConfig),h.call(this,i.name,l),this.batchHandler=i.batchHandler,this._renderOptions={multiTexturing:!0,lighting:null,smoothPixelArt:null},this._lightingOptions={normalGLTexture:null,normalMapRotation:0,selfShadow:{enabled:!1,penumbra:0,diffuseFlatThreshold:0}}},defaultConfig:{name:"SubmitterQuad",role:"Submitter",batchHandler:"BatchHandler"},run:function(e,l,i,s,r,o,a,u,f){this.onRunBegin(e);var v,c,g,p,T;r.run&&r.run(e,l,s),o.run&&o.run(e,l,r,i,s),a?(a.run&&a.run(e,l,s),v=a.tintFill,c=a.tintTopLeft,g=a.tintBottomLeft,p=a.tintTopRight,T=a.tintBottomRight):(v=l.tintFill,c=d(l.tintTopLeft,l._alphaTL),g=d(l.tintBottomLeft,l._alphaBL),p=d(l.tintTopRight,l._alphaTR),T=d(l.tintBottomRight,l._alphaBR));var C=o.quad,M=r.uvSource,A=M.u0,R=M.v0,P=M.u1,L=M.v1;this.setRenderOptions(l,u,f),(l.customRenderNodes[this.batchHandler]||l.defaultRenderNodes[this.batchHandler]).batch(e,r.frame.source.glTexture,C[0],C[1],C[2],C[3],C[6],C[7],C[4],C[5],A,R,P-A,L-R,v,c,g,p,T,this._renderOptions),this.onRunEnd(e)},setRenderOptions:function(e,l,i){var s=this._renderOptions,r,o;if(e.displayTexture?(r=e.displayTexture,o=e.displayFrame.sourceIndex):e.texture?(r=e.texture,o=e.frame.sourceIndex):e.tileset&&(Array.isArray(e.tileset)?r=e.tileset[0].image:r=e.tileset.image,o=0),e.lighting){if(l||r&&(l=r.dataSource[o]),l?l=l.glTexture:l=this.manager.renderer.normalTexture,isNaN(i)&&(i=e.rotation,e.parentContainer)){var a=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);i=a.rotationNormalized}var u=e.selfShadow,f=u.enabled;f===null&&(f=e.scene.sys.game.config.selfShadow),this._lightingOptions.normalGLTexture=l,this._lightingOptions.normalMapRotation=i,this._lightingOptions.selfShadow.enabled=f,this._lightingOptions.selfShadow.penumbra=u.penumbra,this._lightingOptions.selfShadow.diffuseFlatThreshold=u.diffuseFlatThreshold,s.lighting=this._lightingOptions}else s.lighting=null;var v;r&&r.smoothPixelArt!==null?v=r.smoothPixelArt:v=e.scene.sys.game.config.smoothPixelArt,s.smoothPixelArt=v}});E.exports=t},53384:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=n(26099),x=n(83419),h=n(46975),d=n(56436),t=n(81084),e=n(44349),l=n(6184),i=n(11653),s=n(40829),r=n(42792),o=n(96049),a=n(33997),u=n(79532),f=n(74505),v=n(70554),c=n(40952),g=n(6141),p=n(49119),T=n(3524),C=new x({Extends:g,initialize:function(A,R,P){var L=A.renderer,F=h(R||{},this.defaultConfig),w=F.name;this._completeLayout(F),g.call(this,w,A),this.config=F,this.gameObject=P,this.instanceBufferLayout=new c(L,F.instanceBufferLayout,null),this.vertexBufferLayout=new c(L,F.vertexBufferLayout,null);var O=this.vertexBufferLayout.buffer,B=O.viewU8;if(B[0]=0,B[1]=1,B[2]=2,B[3]=3,O.update(),this.programManager=new d(L,[this.vertexBufferLayout,this.instanceBufferLayout],this.indexBuffer),this.programManager.setBaseShader(F.shaderName,F.vertexSource,F.fragmentSource),F.shaderAdditions)for(var I=0;I<F.shaderAdditions.length;I++){var D=F.shaderAdditions[I];this.programManager.addAddition(D)}if(F.shaderFeatures)for(I=0;I<F.shaderFeatures.length;I++)this.programManager.addFeature(F.shaderFeatures[I]);this._calcMatrix=new m,this._lightVector=new S},defaultConfig:{name:"SubmitterSpriteGPULayer",count:0,shaderName:"SpriteGPULayer",vertexSource:T,fragmentSource:p,shaderAdditions:[r(),o(),f(!0),i(1),a(),e(),l(!0),u(!0),s(!0),t(!0)],instanceBufferLayout:{usage:"STATIC_DRAW",instanceDivisor:1,layout:[{name:"inPositionX",size:4},{name:"inPositionY",size:4},{name:"inRotation",size:4},{name:"inScaleX",size:4},{name:"inScaleY",size:4},{name:"inAlpha",size:4},{name:"inFrame",size:4},{name:"inTintBlend",size:4},{name:"inTintBL",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintTL",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintBR",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintTR",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inOriginAndTintFillAndCreationTime",size:4},{name:"inScrollFactor",size:2}]},vertexBufferLayout:{usage:"STATIC_DRAW",count:4,layout:[{name:"inVertex",type:"UNSIGNED_BYTE"}]}},_completeLayout:function(M){var A=M.vertexBufferLayout;M.vertexBufferLayout={},M.vertexBufferLayout.usage=A.usage,M.vertexBufferLayout.count=A.count,M.vertexBufferLayout.layout=[];for(var R=M.vertexBufferLayoutRemove||[],P=0;P<A.layout.length;P++){var L=A.layout[P];R.indexOf(L.name)===-1&&(M.vertexBufferLayout.layout[P]={name:L.name,size:L.size||1,type:L.type||"FLOAT",normalized:L.normalized||!1})}if(M.vertexBufferLayoutAdd){var F=M.vertexBufferLayoutAdd||[];for(P=0;P<F.length;P++){var w=F[P];M.vertexBufferLayout.layout.push({name:w.name,size:w.size||1,type:w.type||"FLOAT",normalized:w.normalized||!1})}}for(A=M.instanceBufferLayout,M.instanceBufferLayout={},M.instanceBufferLayout.usage=A.usage,M.instanceBufferLayout.instanceDivisor=A.instanceDivisor,M.instanceBufferLayout.layout=[],R=M.instanceBufferLayoutRemove||[],P=0;P<A.layout.length;P++)L=A.layout[P],R.indexOf(L.name)===-1&&(M.instanceBufferLayout.layout[P]={name:L.name,size:L.size||1,type:L.type||"FLOAT",normalized:L.normalized||!1});if(M.instanceBufferLayoutAdd)for(F=M.instanceBufferLayoutAdd||[],P=0;P<F.length;P++)w=F[P],M.instanceBufferLayout.layout.push({name:w.name,size:w.size||1,type:w.type||"FLOAT",normalized:w.normalized||!1})},setupUniforms:function(M){var A=M.camera,R=this.programManager,P=this.gameObject;R.setUniform("uRoundPixels",A.roundPixels),R.setUniform("uResolution",[M.width,M.height]),M.renderer.setProjectionMatrixFromDrawingContext(M),R.setUniform("uProjectionMatrix",M.renderer.projectionMatrix.val);var L=A.matrixCombined;R.setUniform("uViewMatrix",[L.a,L.b,0,L.c,L.d,0,L.tx,L.ty,1]),R.setUniform("uCameraScrollAndAlpha",[A.scrollX,A.scrollY,P.alpha]),R.setUniform("uTime",P.timeElapsed),R.setUniform("uDiffuseResolution",[P.frame.source.width,P.frame.source.height]),R.setUniform("uFrameDataResolution",[P.frameDataTexture.width,P.frameDataTexture.height]),R.setUniform("uGravity",P.gravity),R.setUniform("uMainSampler[0]",0),R.setUniform("uFrameDataTexture",1);var F=P.texture.source[0].glTexture;R.setUniform("uMainResolution[0]",[F.width,F.height]),v.updateLightingUniforms(P.lighting,M,R,2,this._lightVector,P.selfShadow.enabled,P.selfShadow.diffuseFlatThreshold,P.selfShadow.penumbra)},updateRenderOptions:function(){for(var M=this.programManager,A=this.gameObject.lighting,R=M.getAdditionsByTag("LIGHTING"),P=0;P<R.length;P++)R[P].disable=!A;if(A){var L=M.getAddition("DefineLights");L&&(L.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}var F=M.getAddition("SmoothPixelArt");if(F){var w=this.gameObject.texture.smoothPixelArt;w===null&&(w=this.gameObject.scene.game.config.smoothPixelArt),F.disable=!w}M.clearFeatures();var O=this.gameObject.getShaderFeatures();for(P=0;P<O.length;P++)M.addFeature(O[P]);this.gameObject.selfShadow.enabled&&M.addFeature("SELFSHADOW")},run:function(M){var A,R=this.gameObject;if(R.memberCount!==0){this.manager.startStandAloneRender(),this.onRunBegin(M);var P=R.bufferUpdateSegments;if(P>0){var L=this.instanceBufferLayout.buffer,F=R.memberCount,w=Math.floor(F/R.bufferUpdateSegmentSize),O=!0;for(A=0;A<=w;A++)if(!(1<<A&P)){O=!1;break}if(P===R.MAX_BUFFER_UPDATE_SEGMENTS_FULL||F<=R.bufferUpdateSegmentSize||O)L.update();else{var B=R.bufferUpdateSegmentSize,I=B*this.instanceBufferLayout.layout.stride;for(A=0;A<32&&A*B<F;A++)P&1<<A&&L.update(I,A*I)}R.clearAllSegmentsNeedUpdate()}var D=[R.frame.source.glTexture,R.frameDataTexture];if(R.lighting){var N=R.texture.dataSource[R.frame.sourceIndex];N?N=N.glTexture:N=this.manager.renderer.normalTexture,D[2]=N}this.updateRenderOptions();var z=this.programManager,V=z.getCurrentProgramSuite();if(V){var U=V.program,G=V.vao;this.setupUniforms(M),z.applyUniforms(U),this.manager.renderer.drawInstancedArrays(M,D,U,G,0,4,R.memberCount)}this.onRunEnd(M)}}});E.exports=C},94494:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(31029),x=new m({Extends:S,initialize:function(d,t){S.call(this,d,t),this._renderOptions.clampFrame=!0},defaultConfig:{name:"SubmitterTile",role:"Submitter",batchHandler:"BatchHandler"},run:function(h,d,t,e,l,i,s,r,o){this.onRunBegin(h);var a,u,f,v,c;if(l.run&&l.run(h,d,e),i.run&&i.run(h,d,l,t,e),s)s.run&&s.run(h,d,e),a=s.tintFill,u=s.tintTopLeft,f=s.tintBottomLeft,v=s.tintTopRight,c=s.tintBottomRight;else{a=d.tintFill;var g=4294967295;u=g,f=g,v=g,c=g}var p=l.frame,T=i.quad,C=l.uvSource,M=C.u0,A=C.v0,R=C.u1,P=C.v1;this.setRenderOptions(d,r,o),(d.customRenderNodes[this.batchHandler]||d.defaultRenderNodes[this.batchHandler]).batch(h,p.source.glTexture,T[0],T[1],T[2],T[3],T[6],T[7],T[4],T[5],M,A,R-M,P-A,a,u,f,v,c,this._renderOptions,M,P,M,A,R,P,R,A),this.onRunEnd(h)}});E.exports=x},89723:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(70554),x=n(31029),h=S.getTintAppendFloatAlpha,d=new m({Extends:x,initialize:function(e,l){x.call(this,e,l),this._renderOptions.wrapFrame=!0},defaultConfig:{name:"SubmitterTileSprite",role:"Submitter",batchHandler:"BatchHandler"},run:function(t,e,l,i,s,r,o,a,u){this.onRunBegin(t);var f,v,c,g,p;s.run&&s.run(t,e,i),r.run&&r.run(t,e,s,l,i),o?(o.run&&o.run(t,e,i),f=o.tintFill,v=o.tintTopLeft,c=o.tintBottomLeft,g=o.tintTopRight,p=o.tintBottomRight):(f=e.tintFill,v=h(e.tintTopLeft,e._alphaTL),c=h(e.tintBottomLeft,e._alphaBL),g=h(e.tintTopRight,e._alphaTR),p=h(e.tintBottomRight,e._alphaBR));var T=s.frame,C=r.quad,M=T,A=M.u0,R=M.v0,P=M.u1,L=M.v1,F=s.uvMatrix.quad;this.setRenderOptions(e,a,u),this._lightingOptions.normalMapRotation+=e.tileRotation,(e.customRenderNodes[this.batchHandler]||e.defaultRenderNodes[this.batchHandler]).batch(t,T.source.glTexture,C[0],C[1],C[2],C[3],C[6],C[7],C[4],C[5],A,R,P-A,L-R,f,v,c,g,p,this._renderOptions,F[0],F[1],F[2],F[3],F[6],F[7],F[4],F[5]),this.onRunEnd(t)}});E.exports=d},87469:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license None
|
||
*/var m=n(61340),S=n(26099),x=n(83419),h=n(46975),d=n(56436),t=n(84639),e=n(81084),l=n(6184),i=n(747),s=n(74505),r=n(57532),o=n(23879),a=n(40952),u=n(6141),f=n(70554),v=new x({Extends:u,initialize:function(g,p){var T=g.renderer,C=h(p||{},this.defaultConfig),M=C.name;if(this._completeLayout(C),u.call(this,M,g),this.config=C,this.indexBuffer=T.genericQuadIndexBuffer,this.vertexBufferLayout=new a(T,C.vertexBufferLayout,null),this.programManager=new d(T,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(C.shaderName,C.vertexSource,C.fragmentSource),C.shaderAdditions)for(var A=0;A<C.shaderAdditions.length;A++){var R=C.shaderAdditions[A];this.programManager.addAddition(R)}if(C.shaderFeatures)for(A=0;A<C.shaderFeatures.length;A++)this.programManager.addFeature(C.shaderFeatures[A]);this._spriteMatrix=new m,this._calcMatrix=new m,this._lightVector=new S,this._quad=new Float32Array(8)},defaultConfig:{name:"SubmitterTilemapGPULayer",shaderName:"TilemapGPULayer",vertexSource:o,fragmentSource:r,shaderAdditions:[s(!0),i(!0),l(!0),e(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]}},_completeLayout:function(c){var g=c.vertexBufferLayout;c.vertexBufferLayout={},c.vertexBufferLayout.usage=g.usage,c.vertexBufferLayout.count=g.count||4,c.vertexBufferLayout.layout=[];for(var p=c.vertexBufferLayoutRemove||[],T=0;T<g.layout.length;T++){var C=g.layout[T];p.indexOf(C.name)===-1&&(c.vertexBufferLayout.layout[T]={name:C.name,size:C.size||1,type:C.type||"FLOAT",normalized:C.normalized||!1})}if(c.vertexBufferLayoutAdd){var M=c.vertexBufferLayoutAdd||[];for(T=0;T<M.length;T++){var A=M[T];c.vertexBufferLayout.layout.push({name:A.name,size:A.size||1,type:A.type||"FLOAT",normalized:A.normalized||!1})}}},setupUniforms:function(c,g){var p=this.programManager;p.setUniform("uResolution",[c.width,c.height]),c.renderer.setProjectionMatrixFromDrawingContext(c),p.setUniform("uProjectionMatrix",c.renderer.projectionMatrix.val);var T=g.tileset,C=T.glTexture,M=g.layerDataTexture,A=T.getAnimationDataTexture(c.renderer);p.setUniform("uMainSampler",0),p.setUniform("uLayerSampler",1),p.setUniform("uAnimSampler",2),p.setUniform("uMainResolution",[C.width,C.height]),p.setUniform("uLayerResolution",[M.width,M.height]),p.setUniform("uAnimResolution",[A.width,A.height]),p.setUniform("uTileColumns",T.columns),p.setUniform("uTileWidthHeightMarginSpacing",[T.tileWidth,T.tileHeight,T.tileMargin,T.tileSpacing]),p.setUniform("uAlpha",g.alpha),p.setUniform("uTime",g.timeElapsed),f.updateLightingUniforms(g.lighting,c,p,3,this._lightVector,g.selfShadow.enabled,g.selfShadow.diffuseFlatThreshold,g.selfShadow.penumbra)},updateRenderOptions:function(c){var g=this.programManager,p=c.tileset.image,T=g.getAdditionsByTag("MAXANIMS")[0];T&&g.removeAddition(T.name),c.tileset.maxAnimationLength>0&&g.addAddition(t(c.tileset.maxAnimationLength));for(var C=c.lighting,M=g.getAdditionsByTag("LIGHTING"),A=0;A<M.length;A++){var R=M[A];R.disable=!C}if(C){var P=g.getAddition("DefineLights");P&&(P.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}var L=c.selfShadow.enabled;L===null&&(L=c.scene.sys.game.config.selfShadow),L?g.addFeature("SELFSHADOW"):g.removeFeature("SELFSHADOW");var F=p.smoothPixelArt;F===null&&(F=c.scene.sys.game.config.smoothPixelArt);var w=g.getAddition("SmoothPixelArt");w&&(w.disable=!F);var O=p.source[0].glTexture.magFilter===this.manager.renderer.gl.LINEAR;O?g.addFeature("BORDERFILTER"):g.removeFeature("BORDERFILTER")},run:function(c,g,p){var T=this.manager,C=T.renderer;T.startStandAloneRender(),this.onRunBegin(c);var M=c.camera,A=this._spriteMatrix,R=this._calcMatrix,P=this._quad,L=g.x,F=g.y,w=g.width,O=g.height;R.copyWithScrollFactorFrom(M.getViewMatrix(!c.useCanvas),M.scrollX,M.scrollY,g.scrollFactorX,g.scrollFactorY),p&&R.multiply(p),A.applyITRS(L,F,0,g.scaleX,g.scaleY),R.multiply(A),R.setQuad(L,F,L+w,F+O,P);var B=this.vertexBufferLayout.layout.stride,I=this.vertexBufferLayout.buffer,D=I.viewF32,N=0;D[N++]=P[2],D[N++]=P[3],D[N++]=0,D[N++]=0,D[N++]=P[0],D[N++]=P[1],D[N++]=0,D[N++]=1,D[N++]=P[4],D[N++]=P[5],D[N++]=1,D[N++]=0,D[N++]=P[6],D[N++]=P[7],D[N++]=1,D[N++]=1,I.update(B*4);var z=g.tileset,V=z.glTexture,U=z.getAnimationDataIndexMap(C).size>0,G=[V,g.layerDataTexture];if(U&&(G[2]=z.getAnimationDataTexture(C)),g.lighting){var b=z.image,Y=b.dataSource[0];Y?Y=Y.glTexture:Y=this.manager.renderer.normalTexture,G[3]=Y}this.updateRenderOptions(g);var W=this.programManager,H=W.getCurrentProgramSuite();if(H){var X=H.program,K=H.vao;this.setupUniforms(c,g),W.applyUniforms(X),C.drawElements(c,G,X,K,4,0)}this.onRunEnd(c)}});E.exports=v},12913:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(6141),x=new m({Extends:S,initialize:function(d){S.call(this,"TexturerImage",d),this.frame=null,this.frameWidth=0,this.frameHeight=0,this.uvSource=null},run:function(h,d,t){this.onRunBegin(h);var e=d.frame;if(this.frame=e,this.frameWidth=e.cutWidth,this.frameHeight=e.cutHeight,this.uvSource=e,d.isCropped){var l=d._crop;this.uvSource=l,(l.flipX!==d.flipX||l.flipY!==d.flipY)&&d.frame.updateCropUVs(l,d.flipX,d.flipY),this.frameWidth=l.width,this.frameHeight=l.height}var i=e.source.resolution;this.frameWidth/=i,this.frameHeight/=i,this.onRunEnd(h)}});E.exports=x},22995:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=n(83419),x=n(6141),h=new S({Extends:x,initialize:function(t){x.call(this,"TexturerTileSprite",t),this.frame=null,this.uvMatrix=new m},run:function(d,t,e){this.onRunBegin(d);var l=t.frame;if(this.frame=l,t.isCropped){var i=t._crop;(i.flipX!==t.flipX||i.flipY!==t.flipY)&&t.frame.updateCropUVs(i,t.flipX,t.flipY)}this.uvMatrix.loadIdentity(),this.uvMatrix.scale(1/l.width,1/l.height),this.uvMatrix.translate(t.tilePositionX,t.tilePositionY),this.uvMatrix.scale(1/t.tileScaleX,1/t.tileScaleY),this.uvMatrix.rotate(-t.tileRotation),this.uvMatrix.setQuad(0,0,t.width,t.height),this.onRunEnd(d)}});E.exports=h},86081:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=n(83419),x=n(46975),h=n(6141),d=new S({Extends:h,initialize:function(e,l){l=x(l||{},this.defaultConfig),h.call(this,l.name,e),this.quad=new Float32Array(8),this._spriteMatrix=new m,this._calcMatrix=new m},defaultConfig:{name:"TransformerImage",role:"Transformer"},run:function(t,e,l,i,s){this.onRunBegin(t);var r=l.frame,o=l.uvSource,a=o.x,u=o.y,f=e.displayOriginX,v=e.displayOriginY,c=-f+a,g=-v+u,p=r.customPivot,T=1,C=1;e.flipX&&(p||(c+=-r.realWidth+f*2),T=-1),e.flipY&&(p||(g+=-r.realHeight+v*2),C=-1);var M=t.camera,A=this._spriteMatrix,R=this._calcMatrix.copyWithScrollFactorFrom(M.getViewMatrix(!t.useCanvas),M.scrollX,M.scrollY,e.scrollFactorX,e.scrollFactorY);i&&R.multiply(i),A.applyITRS(e.x,e.y,e.rotation,e.scaleX*T,e.scaleY*C),R.multiply(A),R.setQuad(c,g,c+l.frameWidth,g+l.frameHeight,this.quad);var P=R.matrix,L=P[0]===1&&P[1]===0&&P[2]===0&&P[3]===1;if(e.willRoundVertices(M,L)){var F=this.quad;F[0]=Math.round(F[0]),F[1]=Math.round(F[1]),F[2]=Math.round(F[2]),F[3]=Math.round(F[3]),F[4]=Math.round(F[4]),F[5]=Math.round(F[5]),F[6]=Math.round(F[6]),F[7]=Math.round(F[7])}this.onRunEnd(t)}});E.exports=d},88383:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=n(83419),x=n(46975),h=n(6141),d=new S({Extends:h,initialize:function(e,l){l=x(l||{},this.defaultConfig),h.call(this,l.name,e),this._spriteMatrix=new m,this.quad=this._spriteMatrix.quad},defaultConfig:{name:"TransformerStamp",role:"Transformer"},run:function(t,e,l,i,s){this.onRunBegin(t);var r=l.frame,o=l.uvSource,a=o.x,u=o.y,f=e.displayOriginX,v=e.displayOriginY,c=-f+a,g=-v+u,p=r.customPivot,T=1,C=1;e.flipX&&(p||(c+=-r.realWidth+f*2),T=-1),e.flipY&&(p||(g+=-r.realHeight+v*2),C=-1);var M=e.x,A=e.y,R=this._spriteMatrix;R.applyITRS(M,A,e.rotation,e.scaleX*T,e.scaleY*C);var P=R.matrix;this.onlyTranslate=P[0]===1&&P[1]===0&&P[2]===0&&P[3]===1,R.setQuad(c,g,c+l.frameWidth,g+l.frameHeight);var L=R.matrix,F=L[0]===1&&L[1]===0&&L[2]===0&&L[3]===1;if(e.willRoundVertices(t.camera,F)){var w=this.quad;w[0]=Math.round(w[0]),w[1]=Math.round(w[1]),w[2]=Math.round(w[2]),w[3]=Math.round(w[3]),w[4]=Math.round(w[4]),w[5]=Math.round(w[5]),w[6]=Math.round(w[6]),w[7]=Math.round(w[7])}this.onRunEnd(t)}});E.exports=d},34454:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(86081),x=new m({Extends:S,initialize:function(d,t){S.call(this,d,t)},defaultConfig:{name:"TransformerTile",role:"Transformer"},run:function(h,d,t,e,l){this.onRunBegin(h);var i=h.camera,s=this._calcMatrix,r=this._spriteMatrix;s.copyWithScrollFactorFrom(i.getViewMatrix(!h.useCanvas),i.scrollX,i.scrollY,d.scrollFactorX,d.scrollFactorY),e&&s.multiply(e);var o=t.frameWidth,a=t.frameHeight,u=o,f=a,v=o/2,c=a/2,g=d.scaleX,p=d.scaleY,T=d.gidMap[l.index],C=T.tileOffset.x,M=T.tileOffset.y,A=d.x+l.pixelX*g+(v*g-C),R=d.y+l.pixelY*p+(c*p-M),P=-v,L=-c;l.flipX&&(u*=-1,P+=o),l.flipY&&(f*=-1,P+=a),r.applyITRS(A,R,l.rotation,g,p),s.multiply(r),s.setQuad(P,L,P+u,L+f,this.quad);var F=s.matrix,w=F[0]===1&&F[1]===0&&F[2]===0&&F[3]===1;if(d.willRoundVertices(i,w)){var O=this.quad;O[0]=Math.round(O[0]),O[1]=Math.round(O[1]),O[2]=Math.round(O[2]),O[3]=Math.round(O[3]),O[4]=Math.round(O[4]),O[5]=Math.round(O[5]),O[6]=Math.round(O[6]),O[7]=Math.round(O[7])}this.onRunEnd(h)}});E.exports=x},46211:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(86081),x=new m({Extends:S,initialize:function(d,t){S.call(this,d,t)},defaultConfig:{name:"TransformerTileSprite",role:"Transformer"},run:function(h,d,t,e,l){this.onRunBegin(h);var i=d.width,s=d.height,r=d.displayOriginX,o=d.displayOriginY,a=-r,u=-o,f=1,v=1;d.flipX&&(a+=-i+r*2,f=-1),d.flipY&&(u+=-s+o*2,v=-1);var c=d.x,g=d.y,p=h.camera,T=this._calcMatrix,C=this._spriteMatrix;T.copyWithScrollFactorFrom(p.getViewMatrix(!h.useCanvas),p.scrollX,p.scrollY,d.scrollFactorX,d.scrollFactorY),e&&T.multiply(e),C.applyITRS(c,g,d.rotation,d.scaleX*f,d.scaleY*v),T.multiply(C),T.setQuad(a,u,a+i,u+s,this.quad);var M=T.matrix,A=M[0]===1&&M[1]===0&&M[2]===0&&M[3]===1;if(d.willRoundVertices(p,A)){var R=this.quad;R[0]=Math.round(R[0]),R[1]=Math.round(R[1]),R[2]=Math.round(R[2]),R[3]=Math.round(R[3]),R[4]=Math.round(R[4]),R[5]=Math.round(R[5]),R[6]=Math.round(R[6]),R[7]=Math.round(R[7])}this.onRunEnd(h)}});E.exports=x},84547:E=>{E.exports=["vec4 applyLighting (vec4 fragColor, vec3 normal)","{"," vec4 lighting = getLighting(fragColor, normal);"," return fragColor * vec4(lighting.rgb * lighting.a, lighting.a);","}"].join(`
|
||
`)},11104:E=>{E.exports=["vec4 applyTint(vec4 texture)","{"," 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;"," }"," return color;","}"].join(`
|
||
`)},81556:E=>{E.exports=["vec4 boundedSampler(sampler2D sampler, vec2 uv)","{"," if (clamp(uv, 0.0, 1.0) != uv)"," {"," return vec4(0.0, 0.0, 0.0, 0.0);"," }"," return texture2D(sampler, uv);","}"].join(`
|
||
`)},96293:E=>{E.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];"," c.rgb *= c.a;"," result.rgb *= result.a;"," gl_FragColor = mix(c, result, uAlpha);","}"].join(`
|
||
`)},78390:E=>{E.exports=["vec2 v2len (vec2 a, vec2 b)","{"," return sqrt(a*a+b*b);","}","vec2 getBlockyTexCoord (vec2 texCoord, vec2 texRes) {"," texCoord *= texRes;"," vec2 seam = floor(texCoord + 0.5);"," texCoord = (texCoord - seam) / v2len(dFdx(texCoord), dFdy(texCoord)) + seam;"," texCoord = clamp(texCoord, seam-.5, seam+.5);"," return texCoord / texRes;","}"].join(`
|
||
`)},11719:E=>{E.exports=["struct Light","{"," vec3 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = LIGHT_COUNT;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform int uLightCount;","#ifdef FEATURE_SELFSHADOW","uniform float uDiffuseFlatThreshold;","uniform float uPenumbra;","#endif","vec4 getLighting (vec4 fragColor, vec3 normal)","{"," vec3 finalColor = vec3(0.0);"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," #ifdef FEATURE_SELFSHADOW"," vec3 unpremultipliedColor = fragColor.rgb / fragColor.a;"," float occlusionThreshold = 1.0 - ((unpremultipliedColor.r + unpremultipliedColor.g + unpremultipliedColor.b) / uDiffuseFlatThreshold);"," #endif"," 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), light.position.z / res.x);"," 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);"," #ifdef FEATURE_SELFSHADOW"," float occluded = smoothstep(0.0, 1.0, (diffuseFactor - occlusionThreshold) / uPenumbra);"," vec3 diffuse = light.color * diffuseFactor * occluded;"," #else"," vec3 diffuse = light.color * diffuseFactor;"," #endif"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," return colorOutput;","}"].join(`
|
||
`)},14030:E=>{E.exports=["vec2 clampTexCoordWithinFrame (vec2 texCoord)","{"," vec2 texRes = getTexRes();"," vec4 frameTexel = outFrame * texRes.xyxy;"," vec2 frameMin = frameTexel.xy + vec2(0.5, 0.5);"," vec2 frameMax = frameTexel.xy + frameTexel.zw - vec2(0.5, 0.5);"," return clamp(texCoord, frameMin / texRes, frameMax / texRes);","}"].join(`
|
||
`)},10235:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = boundedSampler(uMainSampler, texCoord);","}"].join(`
|
||
`)},65980:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uMainSampler2;","uniform float amount;","uniform vec4 color;","varying vec2 outTexCoord;","vec4 NORMAL (vec4 base, vec4 blend)","{"," return blend + base * (1.0 - blend.a);","}","vec4 ADD (vec4 base, vec4 blend)","{"," return base + blend;","}","vec4 MULTIPLY (vec4 base, vec4 blend)","{"," return base * blend;","}","vec4 SCREEN (vec4 base, vec4 blend)","{"," return 1.0 - (1.0 - base) * (1.0 - blend);","}","float overlayChannel (float base, float blend)","{"," return base < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);","}","vec4 OVERLAY (vec4 base, vec4 blend)","{"," return vec4("," overlayChannel(base.r, blend.r),"," overlayChannel(base.g, blend.g),"," overlayChannel(base.b, blend.b),"," overlayChannel(base.a, blend.a)"," );","}","vec4 DARKEN (vec4 base, vec4 blend)","{"," return min(base, blend);","}","vec4 LIGHTEN (vec4 base, vec4 blend)","{"," return max(base, blend);","}","float dodgeChannel (float base, float blend)","{"," return blend == 1.0 ? blend : min(1.0, base / (1.0 - blend));","}","vec4 COLOR_DODGE (vec4 base, vec4 blend)","{"," return vec4("," dodgeChannel(base.r, blend.r),"," dodgeChannel(base.g, blend.g),"," dodgeChannel(base.b, blend.b),"," dodgeChannel(base.a, blend.a)"," );","}","float burnChannel (float base, float blend)","{"," return blend == 0.0 ? blend : 1.0 - min(1.0, (1.0 - base) / blend);","}","vec4 COLOR_BURN (vec4 base, vec4 blend)","{"," return vec4("," burnChannel(base.r, blend.r),"," burnChannel(base.g, blend.g),"," burnChannel(base.b, blend.b),"," burnChannel(base.a, blend.a)"," );","}","float hardLightChannel (float base, float blend)","{"," return blend < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);","}","vec4 HARD_LIGHT (vec4 base, vec4 blend)","{"," return vec4("," hardLightChannel(base.r, blend.r),"," hardLightChannel(base.g, blend.g),"," hardLightChannel(base.b, blend.b),"," hardLightChannel(base.a, blend.a)"," );","}","float softLightChannel (float base, float blend)","{"," return blend < 0.5 ? (2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend));","}","vec4 SOFT_LIGHT (vec4 base, vec4 blend)","{"," return vec4("," softLightChannel(base.r, blend.r),"," softLightChannel(base.g, blend.g),"," softLightChannel(base.b, blend.b),"," softLightChannel(base.a, blend.a)"," );","}","vec4 DIFFERENCE (vec4 base, vec4 blend)","{"," return abs(base - blend);","}","vec4 EXCLUSION (vec4 base, vec4 blend)","{"," return base + blend - 2.0 * base * blend;","}","vec3 rgbToHsl (vec3 color)","{"," vec3 hsl = vec3(0.0);"," float fmin = min(min(color.r, color.g), color.b);"," float fmax = max(max(color.r, color.g), color.b);"," float delta = fmax - fmin;"," hsl.z = (fmax + fmin) / 2.0;"," if (delta == 0.0)"," {"," hsl.x = 0.0;"," hsl.y = 0.0;"," }"," else"," {"," if (hsl.z < 0.5)"," {"," hsl.y = delta / (fmax + fmin);"," }"," else"," {"," hsl.y = delta / (2.0 - fmax - fmin);"," }"," float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta;"," float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta;"," float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta;"," if (color.r == fmax)"," {"," hsl.x = deltaB - deltaG;"," }"," else if (color.g == fmax)"," {"," hsl.x = (1.0 / 3.0) + deltaR - deltaB;"," }"," else if (color.b == fmax)"," {"," hsl.x = (2.0 / 3.0) + deltaG - deltaR;"," }"," if (hsl.x < 0.0)"," {"," hsl.x += 1.0;"," }"," else if (hsl.x > 1.0)"," {"," hsl.x -= 1.0;"," }"," }"," return hsl;","}","vec3 hslToRgb (vec3 hsl)","{"," float p = hsl.z * (1.0 - hsl.y);"," float q = hsl.z * (1.0 - hsl.y * hsl.x);"," float t = hsl.z * (1.0 - hsl.y * (1.0 - hsl.x));"," if (hsl.x < 1.0 / 6.0)"," {"," return vec3(hsl.z, t, p);"," }"," else if (hsl.x < 0.5)"," {"," return vec3(q, hsl.z, p);"," }"," else if (hsl.x < 2.0 / 3.0)"," {"," return vec3(p, hsl.z, t);"," }"," return vec3(p, q, hsl.z);","}","vec4 HUE (vec4 base, vec4 blend)","{"," vec3 baseHSL = rgbToHsl(base.rgb);"," vec3 blendHSL = rgbToHsl(blend.rgb);"," return vec4(hslToRgb(vec3(blendHSL.x, baseHSL.y, baseHSL.z)), base.a);","}","vec4 SATURATION (vec4 base, vec4 blend)","{"," vec3 baseHSL = rgbToHsl(base.rgb);"," vec3 blendHSL = rgbToHsl(blend.rgb);"," return vec4(hslToRgb(vec3(baseHSL.x, blendHSL.y, baseHSL.z)), base.a);","}","vec4 COLOR (vec4 base, vec4 blend)","{"," vec3 baseHSL = rgbToHsl(base.rgb);"," vec3 blendHSL = rgbToHsl(blend.rgb);"," return vec4(hslToRgb(vec3(blendHSL.x, blendHSL.y, baseHSL.z)), base.a);","}","vec4 LUMINOSITY (vec4 base, vec4 blend)","{"," vec3 baseHSL = rgbToHsl(base.rgb);"," vec3 blendHSL = rgbToHsl(blend.rgb);"," return vec4(hslToRgb(vec3(baseHSL.x, baseHSL.y, blendHSL.z)), base.a);","}","vec4 ERASE (vec4 base, vec4 blend)","{"," return base * (1.0 - blend.a);","}","vec4 SOURCE_IN (vec4 base, vec4 blend)","{"," return blend * base.a;","}","vec4 SOURCE_OUT (vec4 base, vec4 blend)","{"," return blend * (1.0 - base.a);","}","vec4 SOURCE_ATOP (vec4 base, vec4 blend)","{"," return base * (1.0 - blend.a) + blend * base.a;","}","vec4 DESTINATION_OVER (vec4 base, vec4 blend)","{"," return base + blend * (1.0 - base.a);","}","vec4 DESTINATION_IN (vec4 base, vec4 blend)","{"," return base * blend.a;","}","vec4 DESTINATION_OUT (vec4 base, vec4 blend)","{"," return base * (1.0 - blend.a);","}","vec4 DESTINATION_ATOP (vec4 base, vec4 blend)","{"," return base * blend.a + blend * (1.0 - base.a);","}","vec4 LIGHTER (vec4 base, vec4 blend)","{"," return ADD(base, blend);","}","vec4 COPY (vec4 base, vec4 blend)","{"," return blend;","}","vec4 XOR (vec4 base, vec4 blend)","{"," return base * (1.0 - blend.a) + blend * (1.0 - base.a);","}","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec4 base = boundedSampler(uMainSampler, outTexCoord);"," vec4 blend = boundedSampler(uMainSampler2, outTexCoord) * color;"," vec4 blended = BLEND(base, blend);"," gl_FragColor = mix(base, blended, amount);","}"].join(`
|
||
`)},5899:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec4 uSizeAndOffset;","varying vec2 outTexCoord;","void main()","{"," vec2 gridCell = floor((outTexCoord * resolution + uSizeAndOffset.zw) / uSizeAndOffset.xy) * uSizeAndOffset.xy - uSizeAndOffset.zw;"," vec2 texCoord = gridCell / resolution;"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(`
|
||
`)},20784:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","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 += boundedSampler(uMainSampler, uv) * 0.1964825501511404;"," col += boundedSampler(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += boundedSampler(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += boundedSampler(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += boundedSampler(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += boundedSampler(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += boundedSampler(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
||
`)},65122:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += boundedSampler(uMainSampler, uv) * 0.29411764705882354;"," col += boundedSampler(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += boundedSampler(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
||
`)},60942:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","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 += boundedSampler(uMainSampler, uv) * 0.2270270270;"," col += boundedSampler(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += boundedSampler(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += boundedSampler(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += boundedSampler(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
||
`)},43722:E=>{E.exports=["#pragma phaserTemplate(shaderName)","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;","}","#pragma phaserTemplate(fragmentHeader)","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 = boundedSampler(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(`
|
||
`)},19883:E=>{E.exports=["#pragma phaserTemplate(shaderName)","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(`
|
||
`)},12886:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rg) * amount;"," gl_FragColor = boundedSampler(uMainSampler, outTexCoord + disp).rgba;","}"].join(`
|
||
`)},33016:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#define DISTANCE 10.0","#define QUALITY 10.0","#pragma phaserTemplate(fragmentDefine)","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform float scale;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float MAX_ALPHA = DISTANCE * (DISTANCE + 1.0) * QUALITY / 2.0;","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y) * scale;"," float totalAlpha = 0.0;"," float curAngle = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float curDistance = 0.0; curDistance < DISTANCE; curDistance++)"," {"," curAngle += fract(sin(dot(vec2(curDistance, outTexCoord.x + outTexCoord.y), vec2(12.9898, 78.233))) * 43758.5453);"," for (float i = 0.0; i < QUALITY; i++)"," {"," curAngle += PI * 2.0 / (QUALITY);"," direction = vec2(cos(curAngle), sin(curAngle)) * px;"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = boundedSampler(uMainSampler, displaced);"," totalAlpha += (DISTANCE - curDistance) * color.a;"," }"," }"," color = boundedSampler(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);"," if (knockout)"," {"," float resultAlpha = outerGlowStrength + innerGlowStrength;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(`
|
||
`)},39603:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool invert;","varying vec2 outTexCoord;","void main ()","{"," vec4 color = texture2D(uMainSampler, outTexCoord);"," vec4 mask = texture2D(uMaskSampler, outTexCoord);"," float a = mask.a;"," color *= invert ? (1.0 - a) : a;"," gl_FragColor = color;","}"].join(`
|
||
`)},99191:E=>{E.exports=["#pragma phaserTemplate(shaderName)","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(`
|
||
`)},69355:E=>{E.exports=["#pragma phaserTemplate(shaderName)","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;","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec4 texture = boundedSampler(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 += boundedSampler(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, clamp(shadow * mask, 0.0, 1.0));","}"].join(`
|
||
`)},92636:E=>{E.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 edge1;","uniform vec4 edge2;","uniform vec4 invert;","varying vec2 outTexCoord;","void main ()","{"," vec4 color = texture2D(uMainSampler, outTexCoord);"," color = clamp((color - edge1) / (edge2 - edge1), 0.0, 1.0);"," color = mix(color, 1.0 - color, invert);"," gl_FragColor = color;","}"].join(`
|
||
`)},73416:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec4 fragColor = outTint;"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},91627:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec4 inTint;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTint = vec4(inTint.bgr * inTint.a, inTint.a);"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},84220:E=>{E.exports=["vec3 getNormalFromMap (vec2 texCoord)","{"," vec3 normalMap = texture2D(uNormSampler, texCoord).rgb;"," return normalize(outInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));","}"].join(`
|
||
`)},2860:E=>{E.exports=["uniform vec2 uMainResolution[TEXTURE_COUNT];","vec2 getTexRes ()","{"," #if TEXTURE_COUNT == 1"," float texId = 0.0;"," #else"," float texId = outTexDatum;"," #endif"," #pragma phaserTemplate(texIdProcess)"," vec2 texRes = vec2(0.0);"," for (int i = 0; i < TEXTURE_COUNT; i++)"," {"," if (texId == float(i))"," {"," texRes = uMainResolution[i];"," break;"," }"," }"," return texRes;","}"].join(`
|
||
`)},46432:E=>{E.exports=["uniform sampler2D uMainSampler[TEXTURE_COUNT];","vec4 getTexture (vec2 texCoord)","{"," #if TEXTURE_COUNT == 1"," return texture2D(uMainSampler[0], texCoord);"," #else"," if (outTexDatum == 0.0) return texture2D(uMainSampler[0], texCoord);"," #define ELSE_TEX_CASE(INDEX) else if (outTexDatum == float(INDEX)) return texture2D(uMainSampler[INDEX], texCoord);"," #pragma phaserTemplate(texIdProcess)"," else return vec4(0.0, 0.0, 0.0, 0.0);"," #endif","}"].join(`
|
||
`)},98840:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","varying vec2 outTexCoord;","varying float outTexDatum;","varying float outTintEffect;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},44667:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexDatum;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexDatum;","varying float outTintEffect;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexDatum = inTexDatum;"," outTint = inTint;"," outTintEffect = inTintEffect;"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},62807:E=>{E.exports=["float inverseRotation = -rotation - uCamera.z;","float irSine = sin(inverseRotation);","float irCosine = cos(inverseRotation);","outInverseRotationMatrix = mat3("," irCosine, irSine, 0.0,"," -irSine, irCosine, 0.0,"," 0.0, 0.0, 1.0",");"].join(`
|
||
`)},4127:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","precision mediump float;","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","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;"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(`
|
||
`)},89924:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","precision mediump float;","#pragma phaserTemplate(vertexDefine)","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;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","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);"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},72823:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(fragmentDefine)","varying vec2 outTexCoord;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec4 fragColor = vec4(outTexCoord.xyx, 1.0);"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},65884:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outTexCoord;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},2807:E=>{E.exports=["#pragma phaserTemplate(shaderName)","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(`
|
||
`)},49119:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},3524:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#define ROUND_BIAS 0.5001","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","uniform mat3 uViewMatrix;","uniform vec3 uCameraScrollAndAlpha;","uniform int uRoundPixels;","uniform vec2 uResolution;","uniform float uTime;","uniform vec2 uDiffuseResolution;","uniform vec2 uFrameDataResolution;","uniform sampler2D uFrameDataTexture;","uniform float uGravity;","attribute float inVertex;","attribute vec4 inPositionX;","attribute vec4 inPositionY;","attribute vec4 inRotation;","attribute vec4 inScaleX;","attribute vec4 inScaleY;","attribute vec4 inAlpha;","attribute vec4 inFrame;","attribute vec4 inTintBlend;","attribute vec4 inTintTL;","attribute vec4 inTintTR;","attribute vec4 inTintBL;","attribute vec4 inTintBR;","attribute vec4 inOriginAndTintFillAndCreationTime;","attribute vec2 inScrollFactor;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","const float PI = 3.14159265359;","const float HALF_PI = PI / 2.0;","const float BOUNCE_OVERSHOOT = 1.70158;","const float BOUNCE_OVERSHOOT_PLUS = BOUNCE_OVERSHOOT + 1.0;","const float BOUNCE_OVERSHOOT_IN_OUT = BOUNCE_OVERSHOOT * 1.525;","const float BOUNCE_OVERSHOOT_IN_OUT_PLUS = BOUNCE_OVERSHOOT_IN_OUT + 1.0;","float animate (vec4 anim)","{"," float value = anim.x;"," float a = anim.y;"," float b = abs(anim.z);"," float c = abs(anim.w);"," bool yoyo = anim.z < 0.0;"," bool loop = anim.w > 0.0;"," int type = int(floor(c));"," if (type == 0|| b == 0.0)"," {"," return value;"," }"," float duration = b;"," float delay = mod(c, 1.0) * 2.0;"," float rawTime = ((uTime - inOriginAndTintFillAndCreationTime.w) / duration) - delay;"," float time = mod(rawTime, 1.0);"," if (yoyo && (mod(rawTime, 2.0) >= 1.0))"," {"," time = 1.0 - time;"," }"," float repeats = loop ? 0.0 : floor(a);"," float timeContinuous = loop ? time : rawTime;"," #ifdef FEATURE_LINEAR"," if (type == 1)"," {"," return value + a * timeContinuous;"," }"," #endif"," #ifdef FEATURE_GRAVITY"," if (type == 2)"," {"," float v = floor(a);"," float gravityFactor = (a - v) * 2.0 - 1.0;"," if (gravityFactor == 0.0)"," {"," gravityFactor = 1.0;"," }"," float seconds = timeContinuous * duration / 1000.0;"," float accel = uGravity * gravityFactor;"," return value + (v * seconds) + (0.5 * accel * seconds * seconds);"," }"," #endif"," #ifdef FEATURE_QUAD_EASEOUT"," if (type == 10)"," {"," return value + a * time * (2.0 - time)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUAD_EASEIN"," if (type == 11)"," {"," return value + a * time * time"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUAD_EASEINOUT"," if (type == 12)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * time * time * 0.5"," + repeats * a;"," }"," time -= 1.0;"," return value + a * -0.5 * (time * (time - 2.0) - 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CUBIC_EASEOUT"," if (type == 20)"," {"," time -= 1.0;"," return value + a * (time * time * time + 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CUBIC_EASEIN"," if (type == 21)"," {"," return value + a * time * time * time"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CUBIC_EASEINOUT"," if (type == 22)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * time * time * time * 0.5"," + repeats * a;"," }"," time -= 2.0;"," return value + a * 0.5 * (time * time * time + 2.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUART_EASEOUT"," if (type == 30)"," {"," time -= 1.0;"," return value + a * (1.0 - time * time * time * time)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUART_EASEIN"," if (type == 31)"," {"," return value + a * time * time * time * time"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUART_EASEINOUT"," if (type == 32)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * time * time * time * time * 0.5"," + repeats * a;"," }"," time -= 2.0;"," return value + a * -0.5 * (time * time * time * time - 2.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUINT_EASEOUT"," if (type == 40)"," {"," time -= 1.0;"," return value + a * (time * time * time * time * time + 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUINT_EASEIN"," if (type == 41)"," {"," return value + a * time * time * time * time * time"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUINT_EASEINOUT"," if (type == 42)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * time * time * time * time * time * 0.5"," + repeats * a;"," }"," time -= 2.0;"," return value + a * 0.5 * (time * time * time * time * time + 2.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SINE_EASEOUT"," if (type == 50)"," {"," return value + a * sin(time * HALF_PI)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SINE_EASEIN"," if (type == 51)"," {"," return value + a * (1.0 - cos(time * HALF_PI))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SINE_EASEINOUT"," if (type == 52)"," {"," return value + a * 0.5 * (1.0 - cos(PI * time))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_EXPO_EASEOUT"," if (type == 60)"," {"," return value + a * (1.0 - pow(2.0, -10.0 * time))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_EXPO_EASEIN"," if (type == 61)"," {"," return value + a * pow(2.0, 10.0 * (time - 1.0) - 0.001)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_EXPO_EASEINOUT"," if (type == 62)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * 0.5 * pow(2.0, 10.0 * (time - 1.0))"," + repeats * a;"," }"," time -= 1.0;"," return value + a * 0.5 * (2.0 - pow(2.0, -10.0 * (time - 1.0)))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CIRC_EASEOUT"," if (type == 70)"," {"," time -= 1.0;"," return value + a * sqrt(1.0 - time * time)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CIRC_EASEIN"," if (type == 71)"," {"," return value + a * (1.0 - sqrt(1.0 - time * time))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CIRC_EASEINOUT"," if (type == 72)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * -0.5 * (sqrt(1.0 - time * time) - 1.0)"," + repeats * a;"," }"," time -= 2.0;"," return value + a * 0.5 * (sqrt(1.0 - time * time) + 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_BACK_EASEOUT"," if (type == 90)"," {"," time -= 1.0;"," return value + a * (time * time * (BOUNCE_OVERSHOOT_PLUS * time + BOUNCE_OVERSHOOT) + 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_BACK_EASEIN"," if (type == 91)"," {"," return value + a * time * time * (BOUNCE_OVERSHOOT_PLUS * time - BOUNCE_OVERSHOOT)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_BACK_EASEINOUT"," if (type == 92)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * 0.5 * (time * time * (BOUNCE_OVERSHOOT_IN_OUT_PLUS * time - BOUNCE_OVERSHOOT_IN_OUT))"," + repeats * a;"," }"," time -= 2.0;"," return value + a * 0.5 * (time * time * (BOUNCE_OVERSHOOT_IN_OUT_PLUS * time + BOUNCE_OVERSHOOT_IN_OUT) + 2.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_BOUNCE_EASEOUT"," if (type == 100)"," {"," if (time < 1.0 / 2.75)"," {"," return value + a * (7.5625 * time * time)"," + repeats * a;"," }"," else if (time < 2.0 / 2.75)"," {"," time -= 1.5 / 2.75;"," return value + a * (7.5625 * time * time + 0.75)"," + repeats * a;"," }"," else if (time < 2.5 / 2.75)"," {"," time -= 2.25 / 2.75;"," return value + a * (7.5625 * time * time + 0.9375)"," + repeats * a;"," }"," else"," {"," time -= 2.625 / 2.75;"," return value + a * (7.5625 * time * time + 0.984375)"," + repeats * a;"," }"," }"," #endif"," #ifdef FEATURE_BOUNCE_EASEIN"," if (type == 101)"," {"," time = 1.0 - time;"," if (time < 1.0 / 2.75)"," {"," return value + a * (1.0 - 7.5625 * time * time)"," + repeats * a;"," }"," else if (time < 2.0 / 2.75)"," {"," time -= 1.5 / 2.75;"," return value + a * (1.0 - (7.5625 * time * time + 0.75))"," + repeats * a;"," }"," else if (time < 2.5 / 2.75)"," {"," time -= 2.25 / 2.75;"," return value + a * (1.0 - (7.5625 * time * time + 0.9375))"," + repeats * a;"," }"," else"," {"," time -= 2.625 / 2.75;"," return value + a * (1.0 - (7.5625 * time * time + 0.984375))"," + repeats * a;"," }"," }"," #endif"," #ifdef FEATURE_BOUNCE_EASEINOUT"," if (type == 102)"," {"," bool reverse = false;"," if (time < 0.5)"," {"," time = 1.0 - time * 2.0;"," reverse = true;"," }"," if (time < 1.0 / 2.75)"," {"," time = 7.5625 * time * time;"," }"," else if (time < 2.0 / 2.75)"," {"," time -= 1.5 / 2.75;"," time = 7.5625 * time * time + 0.75;"," }"," else if (time < 2.5 / 2.75)"," {"," time -= 2.25 / 2.75;"," time = 7.5625 * time * time + 0.9375;"," }"," else"," {"," time -= 2.625 / 2.75;"," time = 7.5625 * time * time + 0.984375;"," }"," if (reverse)"," {"," return value + a * (1.0 - time) * 0.5"," + repeats * a;"," }"," return value + a * time * 0.5 + 0.5"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_STEPPED"," if (type == 110)"," {"," return value + a * floor(time + 0.5)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SMOOTHSTEP_EASEOUT"," if (type == 120)"," {"," return value + a * (smoothstep(0.0, 1.0, time / 2.0 + 0.5) * 2.0 - 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SMOOTHSTEP_EASEIN"," if (type == 121)"," {"," return value + a * smoothstep(0.0, 1.0, time / 2.0) * 2.0"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SMOOTHSTEP_EASEINOUT"," if (type == 122)"," {"," return value + a * smoothstep(0.0, 1.0, time)"," + repeats * a;"," }"," #endif"," return value;","}","struct Frame {"," vec2 position;"," vec2 size;"," vec2 offset;","};","Frame getFrame (float frame)","{"," float index1 = floor(frame) * 3.0;"," float index2 = index1 + 1.0;"," float index3 = index1 + 2.0;"," float width = uFrameDataResolution.x;"," float x = mod(index1, width);"," float y = floor(index1 / width);"," vec4 texelUV = texture2D("," uFrameDataTexture,"," vec2(x + 0.5, y + 0.5) / uFrameDataResolution"," );"," x = mod(index2, width);"," y = floor(index2 / width);"," vec4 texelWH = texture2D("," uFrameDataTexture,"," vec2(x + 0.5, y + 0.5) / uFrameDataResolution"," );"," x = mod(index3, width);"," y = floor(index3 / width);"," vec4 texelOrigin = texture2D("," uFrameDataTexture,"," vec2(x + 0.5, y + 0.5) / uFrameDataResolution"," );"," return Frame("," vec2("," texelUV.r + texelUV.g * 256.0,"," texelUV.b + texelUV.a * 256.0"," ) * 255.0,"," vec2("," texelWH.r + texelWH.g * 256.0,"," texelWH.b + texelWH.a * 256.0"," ) * 255.0,"," vec2("," texelOrigin.r + texelOrigin.g * 256.0,"," texelOrigin.b + texelOrigin.a * 256.0"," ) * 255.0 - 32768.0"," );","}","void main ()","{"," float positionX = animate(inPositionX);"," float positionY = animate(inPositionY);"," float rotation = animate(inRotation);"," float scaleX = animate(inScaleX);"," float scaleY = animate(inScaleY);"," float frame = animate(inFrame);"," float tintBlend = animate(inTintBlend);"," float alpha = animate(inAlpha);"," vec2 origin = inOriginAndTintFillAndCreationTime.xy;"," float tintFill = inOriginAndTintFillAndCreationTime.z;"," float scrollFactorX = inScrollFactor.x;"," float scrollFactorY = inScrollFactor.y;"," Frame frameData = getFrame(frame);"," vec2 uv = frameData.position / uDiffuseResolution;"," vec2 wh = frameData.size / uDiffuseResolution;"," float u = uv.s;"," float v = uv.t;"," float w = wh.s;"," float h = wh.t;"," float width = frameData.size.s;"," float height = frameData.size.t;"," vec4 tint = inTintTL;"," float x = -origin.x;"," float y = -origin.y;"," if (inVertex == 0.0)"," {"," y = 1.0 - origin.y;"," v += h;"," tint = inTintBL;"," }"," else if (inVertex == 2.0)"," {"," x = 1.0 - origin.x;"," y = 1.0 - origin.y;"," u += w;"," v += h;"," tint = inTintBR;"," }"," else if (inVertex == 3.0)"," {"," x = 1.0 - origin.x;"," u += w;"," tint = inTintTR;"," }"," vec3 position = vec3("," (x * width - frameData.offset.x) * scaleX,"," (y * height - frameData.offset.y) * scaleY,"," 1.0"," );"," mat3 viewMatrix = uViewMatrix * mat3("," 1.0, 0.0, 0.0,"," 0.0, 1.0, 0.0,"," uCameraScrollAndAlpha.x * (1.0 - scrollFactorX), uCameraScrollAndAlpha.y * (1.0 - scrollFactorY), 1.0"," );"," float sine = sin(rotation);"," float cosine = cos(rotation);"," mat3 transformMatrix = mat3("," cosine, sine, 0.0,"," -sine, cosine, 0.0,"," positionX, positionY, 1.0"," );"," position = viewMatrix * transformMatrix * position;"," alpha *= uCameraScrollAndAlpha.z;"," tint.a *= alpha;"," if (uRoundPixels == 1 && rotation == 0.0 && scaleX == 1.0 && scaleY == 1.0)"," {"," position.xy = floor(position.xy + ROUND_BIAS);"," }"," gl_Position = uProjectionMatrix * vec4(position.xy, 1.0, 1.0);"," outTexCoord = vec2(u, 1.0 - v);"," outTint = mix(vec4(1.0, 1.0, 1.0, tint.a), tint, tintBlend);"," outTintEffect = tintFill;"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},57532:E=>{E.exports=["#version 100","#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","/* Redefine MAX_ANIM_FRAMES to support animations with different frame numbers. */","#define MAX_ANIM_FRAMES 0","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uLayerSampler;","uniform vec2 uMainResolution;","uniform vec2 uLayerResolution;","uniform float uTileColumns;","uniform vec4 uTileWidthHeightMarginSpacing;","uniform float uAlpha;","uniform float uTime;","#if MAX_ANIM_FRAMES > 0","uniform sampler2D uAnimSampler;","uniform vec2 uAnimResolution;","#endif","varying vec2 outTexCoord;","varying vec2 outTileStride;","#pragma phaserTemplate(outVariables)","vec2 getTexRes ()","{"," return uMainResolution;","}","float floatTexel (vec4 texel)","{"," return texel.r * 255.0 + (texel.g * 255.0 * 256.0) + (texel.b * 255.0 * 256.0 * 256.0) + (texel.a * 255.0 * 256.0 * 256.0 * 256.0);","}","struct Tile","{"," float index;"," vec2 uv; // In texels."," #if MAX_ANIM_FRAMES > 0"," bool animated;"," #endif"," bool empty;","};","Tile getLayerData (vec2 coord)","{"," vec2 texelCoord = coord * uLayerResolution;"," vec2 tile = floor(texelCoord);"," vec2 uv = fract(texelCoord);"," uv.y = 1.0 - uv.y;"," vec4 texel = texture2D(uLayerSampler, (tile + 0.5) / uLayerResolution) * 255.0;"," float flags = texel.a;"," /* Check for empty tile flag in bit 28. */"," if (flags == 16.0)"," {"," return Tile("," 0.0,"," vec2(0.0),"," #if MAX_ANIM_FRAMES > 0"," false,"," #endif"," true"," );"," }"," /* Bit 31 is flipX. */"," bool flipX = flags > 127.0;"," /* Bit 30 is flipY. */"," bool flipY = mod(flags, 128.0) > 63.0;"," #if MAX_ANIM_FRAMES > 0"," /* Bit 29 is animation. */"," bool animated = mod(flags, 64.0) > 31.0;"," #endif"," if (flipX)"," {"," uv.x = 1.0 - uv.x;"," }"," if (flipY)"," {"," uv.y = 1.0 - uv.y;"," }"," float index = texel.r + (texel.g * 256.0) + (texel.b * 256.0 * 256.0);"," return Tile("," index,"," uv * uTileWidthHeightMarginSpacing.xy,"," #if MAX_ANIM_FRAMES > 0"," animated,"," #endif"," false"," );","}","vec2 getFrameCorner (float index)","{"," float x = mod(index, uTileColumns);"," float y = floor(index / uTileColumns);"," vec2 xy = vec2(x, y);"," return xy * outTileStride + uTileWidthHeightMarginSpacing.zz;","}","#if MAX_ANIM_FRAMES > 0","float animationIndex (float index)","{"," float animTextureWidth = uAnimResolution.x;"," vec2 index2D = vec2(mod(index, animTextureWidth), floor(index / animTextureWidth));"," vec4 animDurationTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);"," index2D = vec2(mod(index + 1.0, animTextureWidth), floor((index + 1.0) / animTextureWidth));"," vec4 animIndexTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);"," float animDuration = floatTexel(animDurationTexel);"," float animIndex = floatTexel(animIndexTexel);"," float animTime = mod(uTime, animDuration);"," float animTimeAccum = 0.0;"," for (int i = 0; i < MAX_ANIM_FRAMES; i++)"," {"," index2D = vec2(mod(animIndex, animTextureWidth), floor(animIndex / animTextureWidth));"," animDurationTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);"," float frameDuration = floatTexel(animDurationTexel);"," animTimeAccum += frameDuration;"," if (animTime <= animTimeAccum)"," {"," break;"," }"," animIndex += 2.0;"," }"," animIndex += 1.0;"," index2D = vec2(mod(animIndex, animTextureWidth), floor(animIndex / animTextureWidth));"," animIndexTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);"," float animFrameIndex = floatTexel(animIndexTexel);"," return animFrameIndex;","}","#endif","vec2 getTileTexelCoord (Tile tile)","{"," if (tile.empty)"," {"," return vec2(0.0);"," }"," float index = tile.index;"," #if MAX_ANIM_FRAMES > 0"," if (tile.animated)"," {"," index = animationIndex(index);"," }"," #endif"," vec2 frameCorner = getFrameCorner(index);"," return frameCorner + tile.uv;","}","#pragma phaserTemplate(fragmentHeader)","struct Samples {"," vec4 color;"," #pragma phaserTemplate(defineSamples)","};","Samples getColorSamples (vec2 texCoord)","{"," Samples samples;"," samples.color = texture2D("," uMainSampler,"," vec2(texCoord.x, 1.0 - texCoord.y)"," );"," #pragma phaserTemplate(getSamples)"," return samples;","}","Samples mixSamples (Samples samples1, Samples samples2, float alpha)","{"," Samples samples;"," samples.color = mix(samples1.color, samples2.color, alpha);"," #pragma phaserTemplate(mixSamples)"," return samples;","}","Samples getFinalSamples (Tile tile, vec2 layerTexCoord)","{"," vec2 texelCoord = getTileTexelCoord(tile);"," vec2 texCoord = texelCoord / uMainResolution;"," #pragma phaserTemplate(texCoord)"," #ifndef FEATURE_BORDERFILTER"," return getColorSamples(texCoord);"," #else"," #pragma phaserTemplate(finalSamples)"," vec2 wh = uTileWidthHeightMarginSpacing.xy;"," vec2 frameCorner = getFrameCorner(tile.index);"," vec2 frameCornerOpposite = frameCorner + wh;"," vec2 texCoordClamped = clamp(texCoord, (frameCorner + 0.5) / uMainResolution, (frameCornerOpposite - 0.5) / uMainResolution);"," vec2 dTexelCoord = (texCoord - texCoordClamped) * uMainResolution;"," dTexelCoord.y = -dTexelCoord.y;"," vec2 offsets = sign(dTexelCoord);"," Samples samples0 = getColorSamples(texCoordClamped);"," if (offsets.x == 0.0)"," {"," if (offsets.y == 0.0)"," {"," return samples0;"," }"," Tile tileY = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordY = getTileTexelCoord(tileY);"," vec2 texCoordY = texelCoordY / uMainResolution;"," Samples samplesY = getColorSamples(texCoordY);"," return mixSamples(samples0, samplesY, abs(dTexelCoord.y));"," }"," else"," {"," if (offsets.y == 0.0)"," {"," Tile tileX = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordX = getTileTexelCoord(tileX);"," vec2 texCoordX = texelCoordX / uMainResolution;"," Samples samplesX = getColorSamples(texCoordX);"," return mixSamples(samples0, samplesX, abs(dTexelCoord.x));"," }"," Tile tileX = getLayerData(layerTexCoord + (offsets * vec2(1.0, 0.0) - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordX = getTileTexelCoord(tileX);"," vec2 texCoordX = texelCoordX / uMainResolution;"," Samples samplesX = getColorSamples(texCoordX);"," Tile tileY = getLayerData(layerTexCoord + (offsets * vec2(0.0, 1.0) - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordY = getTileTexelCoord(tileY);"," vec2 texCoordY = texelCoordY / uMainResolution;"," Samples samplesY = getColorSamples(texCoordY);"," Tile tileXY = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordXY = getTileTexelCoord(tileXY);"," vec2 texCoordXY = texelCoordXY / uMainResolution;"," Samples samplesXY = getColorSamples(texCoordXY);"," Samples samples1 = mixSamples(samples0, samplesX, abs(dTexelCoord.x));"," Samples samples2 = mixSamples(samplesY, samplesXY, abs(dTexelCoord.x));"," return mixSamples(samples1, samples2, abs(dTexelCoord.y));"," }"," #endif","}","void main ()","{"," vec2 layerTexCoord = outTexCoord;"," Tile tile = getLayerData(layerTexCoord);"," Samples samples = getFinalSamples(tile, layerTexCoord);"," vec4 fragColor = samples.color;"," #pragma phaserTemplate(declareSamples)"," #pragma phaserTemplate(fragmentProcess)"," fragColor *= uAlpha;"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},23879:E=>{E.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","uniform vec4 uTileWidthHeightMarginSpacing;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outTexCoord;","varying vec2 outTileStride;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTileStride = uTileWidthHeightMarginSpacing.xy + uTileWidthHeightMarginSpacing.zz;"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},84639:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return{name:n+"Anims",additions:{fragmentDefine:`#undef MAX_ANIM_FRAMES
|
||
#define MAX_ANIM_FRAMES `+n},tags:["MAXANIMS"],disable:!!m}};E.exports=y},67155:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(84547),S=function(x){return{name:"ApplyFlatLighting",additions:{fragmentHeader:m,fragmentProcess:"fragColor = applyLighting(fragColor, vec3(0.0, 0.0, 1.0));"},tags:["LIGHTING"],disable:!!x}};E.exports=S},81084:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(84547),S=function(x){return{name:"ApplyLighting",additions:{fragmentHeader:m,fragmentProcess:"fragColor = applyLighting(fragColor, normal);"},tags:["LIGHTING"],disable:!!x}};E.exports=S},44349:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(11104),S=function(x){return{name:"Tint",additions:{fragmentHeader:m,fragmentProcess:"fragColor = applyTint(fragColor);"},tags:["TINT"],disable:!!x}};E.exports=S},99501:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(81556),S=function(x){return{name:"BoundedSampler",additions:{fragmentHeader:m},disable:!!x}};E.exports=S},6184:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(11719),S=function(x){return{name:"DefineLights",additions:{fragmentDefine:"#define LIGHT_COUNT 1",fragmentHeader:m},tags:["LIGHTING"],disable:!!x}};E.exports=S},11653:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return{name:n+"TexCount",additions:{fragmentDefine:"#define TEXTURE_COUNT "+n},tags:["TexCount"],disable:!!m}};E.exports=y},13198:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return{name:"FlatNormal",additions:{fragmentProcess:"vec3 normal = vec3(0.0, 0.0, 1.0);"},tags:["LIGHTING"],disable:!!n}};E.exports=y},40829:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(84220),S=function(x){return{name:"NormalMap",additions:{fragmentHeader:m,fragmentProcess:"vec3 normal = getNormalFromMap(texCoord);"},tags:["LIGHTING"],disable:!!x}};E.exports=S},42792:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return{name:"TexCoordOut",additions:{fragmentProcess:`vec2 texCoord = outTexCoord;
|
||
#pragma phaserTemplate(texCoord)`},tags:["TEXCOORD"],disable:!!n}};E.exports=y},96049:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(2860),S=function(x){return{name:"GetTexRes",additions:{fragmentHeader:m},tags:["TEXRES"],disable:!!x}};E.exports=S},33997:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(46432),S=function(x,h){x===void 0&&(x=1);for(var d="",t=1;t<x;t++)d+="ELSE_TEX_CASE("+t+`)
|
||
`;var e=m.replace("#pragma phaserTemplate(texIdProcess)",d);return{name:"GetTexture"+x,additions:{fragmentHeader:e,fragmentProcess:"vec4 fragColor = getTexture(texCoord);"},tags:["TEXTURE"],disable:!!h}};E.exports=S},10455:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return{name:"OutFrame",additions:{vertexHeader:"attribute vec4 inFrame;",vertexProcess:"outFrame = inFrame;",outVariables:"varying vec4 outFrame;"},disable:!!n}};E.exports=y},79532:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62807),S=function(x){return{name:"OutInverseRotation",additions:{vertexHeader:"uniform vec4 uCamera;",vertexProcess:m,outVariables:"varying mat3 outInverseRotationMatrix;"},tags:["LIGHTING"],disable:!!x}};E.exports=S},65217:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return{name:"RotDatum",additions:{vertexProcess:"float rotation = inTexDatum;"},tags:["LIGHTING"],disable:!!n}};E.exports=y},747:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return{name:"SampleNormal",additions:{defineSamples:"vec4 normal;",getSamples:"samples.normal = texture2D(uNormSampler, texCoord);",mixSamples:"samples.normal = mix(samples1.normal, samples2.normal, alpha);",declareSamples:"vec3 normal = normalize(samples.normal.rgb * 2.0 - 1.0);"},tags:["LIGHTING"],disable:!!n}};E.exports=y},74505:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(78390),S=function(x){return{name:"SmoothPixelArt",additions:{extensions:"#extension GL_OES_standard_derivatives : enable",fragmentHeader:m,texCoord:"texCoord = getBlockyTexCoord(texCoord, getTexRes());"},disable:!!x}};E.exports=S},44832:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(14030),S=function(x){return{name:"TexCoordFrameClamp",additions:{fragmentHeader:m,texCoord:"texCoord = clampTexCoordWithinFrame(texCoord);"},disable:!!x}};E.exports=S},23295:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return{name:"TexCoordFrameWrap",additions:{texCoord:`// Wrap texture coordinate into the UV space of the texture frame.
|
||
texCoord = mod(texCoord, 1.0) * outFrame.zw + outFrame.xy;`},disable:!!n}};E.exports=y},83786:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={MakeAnimLength:n(84639),MakeApplyFlatLighting:n(67155),MakeApplyLighting:n(81084),MakeApplyTint:n(44349),MakeBoundedSampler:n(99501),MakeDefineLights:n(6184),MakeDefineTexCount:n(11653),MakeFlatNormal:n(13198),MakeGetNormalFromMap:n(40829),MakeGetTexCoordOut:n(42792),MakeGetTexRes:n(96049),MakeGetTexture:n(33997),MakeOutFrame:n(10455),MakeOutInverseRotation:n(79532),MakeRotationDatum:n(65217),MakeSampleNormal:n(747),MakeSmoothPixelArt:n(74505),MakeTexCoordFrameClamp:n(44832),MakeTexCoordFrameWrap:n(23295)}},89350:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@photonstorm.com>
|
||
* @copyright 2013-2023 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ApplyLighting:n(84547),ApplyTint:n(11104),BoundedSampler:n(81556),ColorMatrixFrag:n(96293),DefineBlockyTexCoord:n(78390),DefineLights:n(11719),DefineTexCoordFrameClamp:n(14030),FilterBarrelFrag:n(10235),FilterBlendFrag:n(65980),FilterBlockyFrag:n(5899),FilterBlurHighFrag:n(20784),FilterBlurLowFrag:n(65122),FilterBlurMedFrag:n(60942),FilterBokehFrag:n(43722),FilterColorMatrixFrag:n(19883),FilterDisplacementFrag:n(12886),FilterGlowFrag:n(33016),FilterMaskFrag:n(39603),FilterPixelateFrag:n(99191),FilterShadowFrag:n(69355),FilterThresholdFrag:n(92636),FlatFrag:n(73416),FlatVert:n(91627),GetNormalFromMap:n(84220),GetTexRes:n(2860),GetTexture:n(46432),MultiFrag:n(98840),MultiVert:n(44667),OutInverseRotation:n(62807),PointLightFrag:n(4127),PointLightVert:n(89924),ShaderQuadFrag:n(72823),ShaderQuadVert:n(65884),SimpleTextureVert:n(2807),SpriteGPULayerFrag:n(49119),SpriteGPULayerVert:n(3524),TilemapGPULayerFrag:n(57532),TilemapGPULayerVert:n(23879)}},26128:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t,e){this.renderer=h,this.webGLBuffer=null,this.dataBuffer=d,this.viewF32=null,this.viewU8=new Uint8Array(d),this.viewU16=null,this.viewU32=null,this.bufferType=t,this.bufferUsage=e,this.createViews(),this.createResource()},createResource:function(){var x=this.renderer.gl,h=this.bufferType,d=x.createBuffer();this.webGLBuffer=d,this.bind(),x.bufferData(h,this.dataBuffer,this.bufferUsage),this.bind(!0)},bind:function(x){var h=this.renderer.gl,d=this.bufferType,t=x?null:this;d===h.ARRAY_BUFFER?this.renderer.glWrapper.updateBindingsArrayBuffer({bindings:{arrayBuffer:t}}):d===h.ELEMENT_ARRAY_BUFFER&&this.renderer.glWrapper.updateBindingsElementArrayBuffer({bindings:{elementArrayBuffer:t}})},update:function(x,h){var d=this.renderer.gl;this.bind(),h===void 0&&(h=0),x===void 0?d.bufferSubData(this.bufferType,h,this.dataBuffer):d.bufferSubData(this.bufferType,h,this.viewU8.subarray(h,h+x))},resize:function(x){var h=this.renderer.gl;this.dataBuffer=new ArrayBuffer(x),this.createViews(),this.bind(),h.bufferData(this.bufferType,this.dataBuffer,this.bufferUsage)},createViews:function(){var x=this.dataBuffer;this.viewF32=null,x.byteLength%Float32Array.BYTES_PER_ELEMENT===0&&(this.viewF32=new Float32Array(x)),this.viewU8=new Uint8Array(x),this.viewU16=null,x.byteLength%Uint16Array.BYTES_PER_ELEMENT===0&&(this.viewU16=new Uint16Array(x)),this.viewU32=null,x.byteLength%Uint32Array.BYTES_PER_ELEMENT===0&&(this.viewU32=new Uint32Array(x))},destroy:function(){this.renderer.gl.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.dataBuffer=null,this.viewF32=null,this.viewU8=null,this.viewU16=null,this.viewU32=null,this.renderer=null}});E.exports=S},84387:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},x=new m({initialize:function(d,t,e,l){var i=d.gl;if(this.webGLFramebuffer=null,this.renderer=d,this.useCanvas=!t||t.length===0,this.width=0,this.height=0,this.attachments=[],!this.useCanvas){for(var s=0;s<t.length;s++)if(this.attachments.push({texture:t[s],attachmentPoint:i.COLOR_ATTACHMENT0+s}),s===0)this.width=t[s].width,this.height=t[s].height;else if(t[s].width!==this.width||t[s].height!==this.height)throw new Error("Color attachments must have the same dimensions");l&&e?this.attachments.push({attachmentPoint:i.DEPTH_STENCIL_ATTACHMENT,internalFormat:i.DEPTH_STENCIL}):l?this.attachments.push({attachmentPoint:i.DEPTH_ATTACHMENT,internalFormat:i.DEPTH_COMPONENT16}):e&&this.attachments.push({attachmentPoint:i.STENCIL_ATTACHMENT,internalFormat:i.STENCIL_INDEX8})}this.renderTexture=null,this.attachments[0]&&(this.renderTexture=this.attachments[0].texture),this.createResource()},createResource:function(){if(!this.useCanvas){var h=this.renderer,d=h.glWrapper,t=h.gl;if(this.webGLFramebuffer){t.deleteFramebuffer(this.webGLFramebuffer);for(var e=0;e<this.attachments.length;e++){var l=this.attachments[e];l.texture||t.deleteRenderbuffer(l.renderbuffer)}}var i=t.createFramebuffer();for(this.webGLFramebuffer=i,d.updateBindingsFramebuffer({bindings:{framebuffer:this}},!0),e=0;e<this.attachments.length;e++){l=this.attachments[e];var s=l.attachmentPoint,r=l.texture;if(r)r.isRenderTexture=!0,t.framebufferTexture2D(t.FRAMEBUFFER,s,t.TEXTURE_2D,r.webGLTexture,0);else{var o=t.checkFramebufferStatus(t.FRAMEBUFFER);if(o!==t.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(S[o]||o));var a=t.createRenderbuffer();d.updateBindingsRenderbuffer({bindings:{renderbuffer:a}}),t.renderbufferStorage(t.RENDERBUFFER,l.internalFormat,this.width,this.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,s,t.RENDERBUFFER,a),l.renderbuffer=a}}}},resize:function(h,d){this.useCanvas||(this.width=h,this.height=d,this.renderTexture.resize(h,d),this.createResource())},destroy:function(){if(this.renderer!==null){for(var h=this.renderer,d=h.gl,t=0;t<this.attachments.length;t++){var e=this.attachments[t];e.texture?(h.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:this}}),d.framebufferTexture2D(d.FRAMEBUFFER,e.attachmentPoint,d.TEXTURE_2D,null,0),h.deleteTexture(e.texture)):d.deleteRenderbuffer(e.renderbuffer)}d.deleteFramebuffer(this.webGLFramebuffer),h.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:null,renderbuffer:null}}),this.attachments.length=0,this.renderTexture=null,this.webGLFramebuffer=null,this.renderer=null}}});E.exports=x},37959:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(53314),x=new m({initialize:function(d){this.renderer=d,this.state=S.getDefault(d)},update:function(h,d,t){if(h===void 0){if(!d)return;h=this.state}d===void 0&&(d=!1),t===void 0&&(t=!1),h.vao!==void 0&&!t&&this.updateVAO(h,d),h.bindings!==void 0&&this.updateBindings(h,d),h.blend!==void 0&&this.updateBlend(h,d),h.colorClearValue!==void 0&&this.updateColorClearValue(h,d),h.colorWritemask!==void 0&&this.updateColorWritemask(h,d),h.cullFace!==void 0&&this.updateCullFace(h,d),h.depthTest!==void 0&&this.updateDepthTest(h,d),h.scissor!==void 0&&this.updateScissor(h,d),h.stencil!==void 0&&this.updateStencil(h,d),h.texturing!==void 0&&this.updateTexturing(h,d),h.viewport!==void 0&&this.updateViewport(h,d),h.vao!==void 0&&t&&this.updateVAO(h,d)},updateBindings:function(h,d){var t=h.bindings;t.activeTexture!==void 0&&this.updateBindingsActiveTexture(h,d),t.arrayBuffer!==void 0&&this.updateBindingsArrayBuffer(h,d),t.elementArrayBuffer!==void 0&&this.updateBindingsElementArrayBuffer(h,d),t.framebuffer!==void 0&&this.updateBindingsFramebuffer(h,d),t.program!==void 0&&this.updateBindingsProgram(h,d),t.renderbuffer!==void 0&&this.updateBindingsRenderbuffer(h,d)},updateBindingsActiveTexture:function(h,d){var t=h.bindings.activeTexture,e=t!==this.state.bindings.activeTexture;if(e&&(this.state.bindings.activeTexture=t),e||d){var l=this.renderer.gl;l.activeTexture(l.TEXTURE0+t)}},updateBindingsArrayBuffer:function(h,d){var t=h.bindings.arrayBuffer,e=this.renderer.gl;if(t!==null&&t.bufferType!==e.ARRAY_BUFFER)throw new Error("Invalid buffer type for ARRAY_BUFFER");var l=t!==this.state.bindings.arrayBuffer;if(l&&(this.state.bindings.arrayBuffer=t),l||d){var i=t?t.webGLBuffer:null;e.bindBuffer(e.ARRAY_BUFFER,i)}},updateBindingsElementArrayBuffer:function(h,d){var t=h.bindings.elementArrayBuffer,e=this.renderer.gl;if(t!==null&&t.bufferType!==e.ELEMENT_ARRAY_BUFFER)throw new Error("Invalid buffer type for ELEMENT_ARRAY_BUFFER");var l=t!==this.state.bindings.elementArrayBuffer;if(l&&(this.state.bindings.elementArrayBuffer=t),l||d){var i=t?t.webGLBuffer:null;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,i)}},updateBindingsFramebuffer:function(h,d){var t=h.bindings.framebuffer,e=t!==this.state.bindings.framebuffer;if(e&&(this.state.bindings.framebuffer=t),e||d){var l=this.renderer.gl,i=t?t.webGLFramebuffer:null;l.bindFramebuffer(l.FRAMEBUFFER,i)}},updateBindingsProgram:function(h,d){var t=h.bindings.program,e=t!==this.state.bindings.program;if(e&&(this.state.bindings.program=t),e||d){var l=t?t.webGLProgram:null;this.renderer.gl.useProgram(l)}},updateBindingsRenderbuffer:function(h,d){var t=h.bindings.renderbuffer,e=t!==this.state.bindings.renderbuffer;if(e&&(this.state.bindings.renderbuffer=t),e||d){var l=this.renderer.gl,i=t||null;l.bindRenderbuffer(l.RENDERBUFFER,i)}},updateBlend:function(h,d){var t=h.blend;t.enabled!==void 0&&this.updateBlendEnabled(h,d),t.color!==void 0&&this.updateBlendColor(h,d),t.equation!==void 0&&this.updateBlendEquation(h,d),t.func!==void 0&&this.updateBlendFunc(h,d)},updateBlendColor:function(h,d){var t=h.blend.color,e=t[0],l=t[1],i=t[2],s=t[3],r=e!==this.state.blend.color[0]||l!==this.state.blend.color[1]||i!==this.state.blend.color[2]||s!==this.state.blend.color[3];r&&(this.state.blend.color=[e,l,i,s]),(r||d)&&this.renderer.gl.blendColor(e,l,i,s)},updateBlendEnabled:function(h,d){var t=h.blend.enabled,e=t!==this.state.blend.enabled;if(e&&(this.state.blend.enabled=t),e||d){var l=this.renderer.gl;t?l.enable(l.BLEND):l.disable(l.BLEND)}},updateBlendEquation:function(h,d){var t=h.blend.equation,e=t[0]!==this.state.blend.equation[0]||t[1]!==this.state.blend.equation[1];e&&(this.state.blend.equation=[t[0],t[1]]),(e||d)&&this.renderer.gl.blendEquationSeparate(t[0],t[1])},updateBlendFunc:function(h,d){var t=h.blend.func,e=t[0]!==this.state.blend.func[0]||t[1]!==this.state.blend.func[1]||t[2]!==this.state.blend.func[2]||t[3]!==this.state.blend.func[3];e&&(this.state.blend.func=[t[0],t[1],t[2],t[3]]),(e||d)&&this.renderer.gl.blendFuncSeparate(t[0],t[1],t[2],t[3])},updateColorClearValue:function(h,d){var t=h.colorClearValue,e=t[0],l=t[1],i=t[2],s=t[3],r=e!==this.state.colorClearValue[0]||l!==this.state.colorClearValue[1]||i!==this.state.colorClearValue[2]||s!==this.state.colorClearValue[3];r&&(this.state.colorClearValue=[e,l,i,s]),(r||d)&&this.renderer.gl.clearColor(e,l,i,s)},updateColorWritemask:function(h,d){var t=h.colorWritemask,e=t[0],l=t[1],i=t[2],s=t[3],r=e!==this.state.colorWritemask[0]||l!==this.state.colorWritemask[1]||i!==this.state.colorWritemask[2]||s!==this.state.colorWritemask[3];r&&(this.state.colorWritemask=[e,l,i,s]),(r||d)&&this.renderer.gl.colorMask(e,l,i,s)},updateCullFace:function(h,d){var t=!!h.cullFace,e=t!==this.state.cullFace;if(e&&(this.state.cullFace=t),e||d){var l=this.renderer.gl;t?l.enable(l.CULL_FACE):l.disable(l.CULL_FACE)}},updateDepthTest:function(h,d){var t=!!h.depthTest,e=t!==this.state.depthTest;if(e&&(this.state.depthTest=t),e||d){var l=this.renderer.gl;t?l.enable(l.DEPTH_TEST):l.disable(l.DEPTH_TEST)}},updateScissor:function(h,d){var t=h.scissor;t.enable!==void 0&&this.updateScissorEnabled(h,d),t.box!==void 0&&this.updateScissorBox(h,d)},updateScissorEnabled:function(h,d){var t=h.scissor.enable,e=t!==this.state.scissor.enable;if(e&&(this.state.scissor.enable=t),e||d){var l=this.renderer.gl;t?l.enable(l.SCISSOR_TEST):l.disable(l.SCISSOR_TEST)}},updateScissorBox:function(h,d){var t=h.scissor.box,e=t[0],l=t[1],i=t[2],s=t[3],r=e!==this.state.scissor.box[0]||l!==this.state.scissor.box[1]||i!==this.state.scissor.box[2]||s!==this.state.scissor.box[3];r&&(this.state.scissor.box=[e,l,i,s]),(r||d)&&this.renderer.gl.scissor(e,l,i,s)},updateStencil:function(h,d){var t=h.stencil;t.clear!==void 0&&this.updateStencilClear(h,d),t.enabled!==void 0&&this.updateStencilEnabled(h,d),t.func!==void 0&&this.updateStencilFunc(h,d),t.op!==void 0&&this.updateStencilOp(h,d)},updateStencilClear:function(h,d){var t=h.stencil.clear,e=t!==this.state.stencil.clear;e&&(this.state.stencil.clear=t),(e||d)&&this.renderer.gl.clearStencil(t)},updateStencilEnabled:function(h,d){var t=h.stencil.enabled,e=t!==this.state.stencil.enabled;if(e&&(this.state.stencil.enabled=t),e||d){var l=this.renderer.gl;t?l.enable(l.STENCIL_TEST):l.disable(l.STENCIL_TEST)}},updateStencilFunc:function(h,d){var t=h.stencil.func,e=t.func!==this.state.stencil.func.func||t.ref!==this.state.stencil.func.ref||t.mask!==this.state.stencil.func.mask;if(e&&(this.state.stencil.func={func:t.func,ref:t.ref,mask:t.mask}),e||d){var l=this.renderer.gl;l.stencilFunc(t.func,t.ref,t.mask)}},updateStencilOp:function(h,d){var t=h.stencil.op,e=t.fail!==this.state.stencil.op.fail||t.zfail!==this.state.stencil.op.zfail||t.zpass!==this.state.stencil.op.zpass;if(e&&(this.state.stencil.op={fail:t.fail,zfail:t.zfail,zpass:t.zpass}),e||d){var l=this.renderer.gl;l.stencilOp(t.fail,t.zfail,t.zpass)}},updateTexturing:function(h,d){var t=h.texturing;t.flipY!==void 0&&this.updateTexturingFlipY(h,d),t.premultiplyAlpha!==void 0&&this.updateTexturingPremultiplyAlpha(h,d)},updateTexturingFlipY:function(h,d){var t=h.texturing.flipY,e=t!==this.state.texturing.flipY;if(e&&(this.state.texturing.flipY=t),e||d){var l=this.renderer.gl;l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,t)}},updateTexturingPremultiplyAlpha:function(h,d){var t=h.texturing.premultiplyAlpha,e=t!==this.state.texturing.premultiplyAlpha;if(e&&(this.state.texturing.premultiplyAlpha=t),e||d){var l=this.renderer.gl;l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t)}},updateVAO:function(h,d){var t=h.vao,e=t!==this.state.vao;if(e&&(this.state.vao=t),e||d){var l=this.renderer.gl;t?l.bindVertexArray(t.vertexArrayObject):l.bindVertexArray(null)}},updateViewport:function(h,d){var t=h.viewport,e=t[0],l=t[1],i=t[2],s=t[3],r=e!==this.state.viewport[0]||l!==this.state.viewport[1]||i!==this.state.viewport[2]||s!==this.state.viewport[3];r&&(this.state.viewport=[e,l,i,s]),(r||d)&&this.renderer.gl.viewport(e,l,i,s)}});E.exports=x},1482:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90330),S=n(83419);function x(d,t){return!(d===t||(Number.isNaN(d)||d===void 0)&&(Number.isNaN(t)||t===void 0))}var h=new S({initialize:function(t,e,l){this.renderer=t,this.webGLProgram=null,this.compiling=!1,this._compileStartTime=0,this.compileTimeMs=0,this.glState={bindings:{program:this}},this.vertexSource=e,this.fragmentSource=l,this._vertexShader=null,this._fragmentShader=null,this.glAttributes=[],this.glAttributeNames=new m,this.glAttributeBuffer=null,this.glUniforms=new m,this.uniformRequests=new m,this.createResource()},createResource:function(){var d=this.renderer,t=d.gl;if(this.glAttributeBuffer=null,!t.isContextLost()){this.compiling=!0,this._compileStartTime=performance.now(),d.glWrapper.state.bindings.program===this&&d.glWrapper.updateBindingsProgram({bindings:{program:null}});var e=t.createProgram();this.webGLProgram=e;var l=t.createShader(t.VERTEX_SHADER),i=t.createShader(t.FRAGMENT_SHADER);this._vertexShader=l,this._fragmentShader=i,t.shaderSource(l,this.vertexSource),t.shaderSource(i,this.fragmentSource),t.compileShader(l),t.compileShader(i),t.attachShader(e,l),t.attachShader(e,i),t.linkProgram(e),d.game.config.skipUnreadyShaders||this._completeProgram()}},checkParallelCompile:function(){var d=this.renderer,t=d.gl,e=d.parallelShaderCompileExtension;!e||!t.getProgramParameter(this.webGLProgram,e.COMPLETION_STATUS_KHR)||this._completeProgram()},_completeProgram:function(){var d=this.webGLProgram,t=this.renderer,e=t.gl,l=this._vertexShader,i=this._fragmentShader,s=`Shader failed:
|
||
`;if(!e.getProgramParameter(d,e.LINK_STATUS))throw e.getShaderParameter(l,e.COMPILE_STATUS)?e.getShaderParameter(i,e.COMPILE_STATUS)?(console.log(this.vertexSource,this.fragmentSource),new Error("Link Shader failed:"+e.getProgramInfoLog(d))):(console.log(this.fragmentSource),new Error("Fragment "+s+e.getShaderInfoLog(i))):(console.log(this.vertexSource),new Error("Vertex "+s+e.getShaderInfoLog(l)));this._setupAttributesAndUniforms(),this.compileTimeMs=performance.now()-this._compileStartTime,this.compiling=!1},_setupAttributesAndUniforms:function(){var d=this.webGLProgram,t=this.renderer,e=t.gl,l=this;this.glAttributeNames.clear(),this.glAttributes.length=0;for(var i=e.getProgramParameter(d,e.ACTIVE_ATTRIBUTES),s=0;s<i;s++){var r=e.getActiveAttrib(d,s),o=e.getAttribLocation(d,r.name);this.glAttributeNames.set(r.name,s),this.glAttributes[s]={location:o,name:r.name,size:r.size,type:r.type}}this.glUniforms.each(function(g,p){l.uniformRequests.has(g)||l.uniformRequests.set(g,p.value)}),this.glUniforms.clear();var a=e.getProgramParameter(d,e.ACTIVE_UNIFORMS);for(s=0;s<a;s++){var u=e.getActiveUniform(d,s),f=t.shaderSetters.constants[u.type],v=0,c=u.size*f.size;c>1&&(v=f.baseType===e.FLOAT?new Float32Array(c):new Int32Array(c)),this.glUniforms.set(u.name,{location:e.getUniformLocation(d,u.name),size:u.size,type:u.type,value:v})}},setUniform:function(d,t){this.uniformRequests.set(d,t)},bind:function(){this.renderer.glWrapper.updateBindingsProgram(this.glState),this.uniformRequests.each(this._processUniformRequest.bind(this)),this.uniformRequests.clear()},_processUniformRequest:function(d,t){var e=this.renderer,l=e.gl,i=this.glUniforms.get(d);if(i){var s=i.value;if(s.length){for(var r=!1,o=0;o<s.length;o++)x(s[o],t[o])&&(r=!0,s[o]=t[o]);if(!r)return}else{if(!x(s,t))return;s=t,i.value=t}var a=i.location,u=i.type,f=i.size,v=e.shaderSetters.constants[u];if(v.isMatrix)v.set.call(l,a,!1,s);else if(f>1)v.setV.call(l,a,s);else switch(v.size){case 1:v.set.call(l,a,t);break;case 2:v.set.call(l,a,t[0],t[1]);break;case 3:v.set.call(l,a,t[0],t[1],t[2]);break;case 4:v.set.call(l,a,t[0],t[1],t[2],t[3]);break}}},destroy:function(){if(this.webGLProgram){var d=this.renderer.gl;if(!d.isContextLost()){this._vertexShader&&d.deleteShader(this._vertexShader),this._fragmentShader&&d.deleteShader(this._fragmentShader),d.deleteProgram(this.webGLProgram);for(var t=0;t<this.glAttributes.length;t++)d.disableVertexAttribArray(this.glAttributes[t].location);this.glAttributes.length=0,this.glUniforms.clear()}this.glAttributeBuffer=null,this.glAttributeNames.clear(),this.uniformRequests.clear(),this._vertexShader=null,this._fragmentShader=null,this.webGLProgram=null,this.renderer=null}}});E.exports=h},86272:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h){var d=h.gl;this.constants={5124:{constant:d.INT,baseType:d.INT,size:1,bytes:4,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1},35667:{constant:d.INT_VEC2,baseType:d.INT,size:2,bytes:4,set:d.uniform2i,setV:d.uniform2iv,isMatrix:!1},35668:{constant:d.INT_VEC3,baseType:d.INT,size:3,bytes:4,set:d.uniform3i,setV:d.uniform3iv,isMatrix:!1},35669:{constant:d.INT_VEC4,baseType:d.INT,size:4,bytes:4,set:d.uniform4i,setV:d.uniform4iv,isMatrix:!1},5126:{constant:d.FLOAT,baseType:d.FLOAT,size:1,bytes:4,set:d.uniform1f,setV:d.uniform1fv,isMatrix:!1},35664:{constant:d.FLOAT_VEC2,baseType:d.FLOAT,size:2,bytes:4,set:d.uniform2f,setV:d.uniform2fv,isMatrix:!1},35665:{constant:d.FLOAT_VEC3,baseType:d.FLOAT,size:3,bytes:4,set:d.uniform3f,setV:d.uniform3fv,isMatrix:!1},35666:{constant:d.FLOAT_VEC4,baseType:d.FLOAT,size:4,bytes:4,set:d.uniform4f,setV:d.uniform4fv,isMatrix:!1},5125:{constant:d.UNSIGNED_INT,baseType:d.UNSIGNED_INT,size:1,bytes:4,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1},5120:{constant:d.BYTE,baseType:d.BYTE,size:1,bytes:1,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1},5121:{constant:d.UNSIGNED_BYTE,baseType:d.UNSIGNED_BYTE,size:1,bytes:1,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1},5122:{constant:d.SHORT,baseType:d.SHORT,size:1,bytes:2,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1},5123:{constant:d.UNSIGNED_SHORT,baseType:d.UNSIGNED_SHORT,size:1,bytes:2,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1},35670:{constant:d.BOOL,baseType:d.BOOL,size:1,bytes:4,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1},35671:{constant:d.BOOL_VEC2,baseType:d.BOOL,size:2,bytes:4,set:d.uniform2i,setV:d.uniform2iv,isMatrix:!1},35672:{constant:d.BOOL_VEC3,baseType:d.BOOL,size:3,bytes:4,set:d.uniform3i,setV:d.uniform3iv,isMatrix:!1},35673:{constant:d.BOOL_VEC4,baseType:d.BOOL,size:4,bytes:4,set:d.uniform4i,setV:d.uniform4iv,isMatrix:!1},35674:{constant:d.FLOAT_MAT2,baseType:d.FLOAT,size:4,bytes:4,set:d.uniformMatrix2fv,setV:d.uniformMatrix2fv,isMatrix:!0},35675:{constant:d.FLOAT_MAT3,baseType:d.FLOAT,size:9,bytes:4,set:d.uniformMatrix3fv,setV:d.uniformMatrix3fv,isMatrix:!0},35676:{constant:d.FLOAT_MAT4,baseType:d.FLOAT,size:16,bytes:4,set:d.uniformMatrix4fv,setV:d.uniformMatrix4fv,isMatrix:!0},35678:{constant:d.SAMPLER_2D,baseType:d.INT,size:1,bytes:4,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1},35680:{constant:d.SAMPLER_CUBE,baseType:d.INT,size:1,bytes:4,set:d.uniform1i,setV:d.uniform1iv,isMatrix:!1}}}});E.exports=S},13760:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h){this.renderer=h,this.units=[],this.unitIndices=[],this.init()},init:function(){var x=this.renderer.gl;this.units.length=0,this.unitIndices.length=0;for(var h=x.createTexture(),d=this.renderer.maxTextures-1;d>=0;d--)this.units[d]=void 0,this.renderer.glWrapper.updateBindingsActiveTexture({bindings:{activeTexture:d}}),x.bindTexture(x.TEXTURE_2D,h),this.unitIndices[d]=d;x.texImage2D(x.TEXTURE_2D,0,x.RGBA,1,1,0,x.RGBA,x.UNSIGNED_BYTE,new Uint8Array([0,0,255,255]))},bind:function(x,h,d,t){var e=this.units[h]!==x;if((d||t!==!1||e)&&this.renderer.glWrapper.updateBindingsActiveTexture({bindings:{activeTexture:h}},d),!(!e&&!d)){this.units[h]=x;var l=x?x.webGLTexture:null,i=this.renderer.gl;i.bindTexture(i.TEXTURE_2D,l)}},bindUnits:function(x,h){for(var d=Math.min(x.length,this.renderer.maxTextures),t=d-1;t>=0;t--)x[t]!==void 0&&this.bind(x[t],t,h,!1)},unbindTexture:function(x){for(var h=this.units.length-1;h>=0;h--)this.units[h]===x&&this.bind(null,h,!0,!1)},unbindAllUnits:function(){for(var x=this.units.length-1;x>=0;x--)this.bind(null,x,!0,!1)}});E.exports=S},82751:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50030),x=new m({initialize:function(d,t,e,l,i,s,r,o,a,u,f,v,c){c===void 0&&(c=!0),this.renderer=d,this.webGLTexture=null,this.isRenderTexture=!1,this.mipLevel=t,this.minFilter=e,this.magFilter=l,this.wrapT=i,this.wrapS=s,this.format=r,this.pixels=o,this.width=a,this.height=u,this.pma=f??!0,this.forceSize=!!v,this.flipY=!!c,this.__SPECTOR_Metadata={},this.batchUnit=-1,this.createResource()},createResource:function(){var h=this.renderer.gl;if(!h.isContextLost()){if(this.pixels instanceof x){this.webGLTexture=this.pixels.webGLTexture;return}var d=h.createTexture();d.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=d,this._processTexture()}},resize:function(h,d){this.width===h&&this.height===d||(this.width=h,this.height=d,this._processTexture())},update:function(h,d,t,e,l,i,s,r,o){d===0||t===0||(this.pixels=h,this.width=d,this.height=t,this.flipY=e,this.wrapS=l,this.wrapT=i,this.minFilter=s,this.magFilter=r,this.format=o,this._processTexture())},_processTexture:function(){var h=this.renderer.gl;this.renderer.glTextureUnits.bind(this,0),this.renderer.glWrapper.updateTexturing({texturing:{flipY:this.flipY,premultiplyAlpha:this.pma}}),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,this.minFilter),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,this.magFilter),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,this.wrapS),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,this.wrapT);var d=this.pixels,t=this.mipLevel,e=this.width,l=this.height,i=this.format,s=!1;if(d==null)h.texImage2D(h.TEXTURE_2D,t,i,e,l,0,i,h.UNSIGNED_BYTE,null),s=S(e,l);else if(d.compressed){e=d.width,l=d.height,s=d.generateMipmap;for(var r=0;r<d.mipmaps.length;r++)h.compressedTexImage2D(h.TEXTURE_2D,r,d.internalFormat,d.mipmaps[r].width,d.mipmaps[r].height,0,d.mipmaps[r].data)}else d instanceof Uint8Array?(h.texImage2D(h.TEXTURE_2D,t,i,e,l,0,i,h.UNSIGNED_BYTE,d),s=S(e,l)):(this.forceSize||(e=d.width,l=d.height),h.texImage2D(h.TEXTURE_2D,t,i,i,h.UNSIGNED_BYTE,d),s=S(e,l));s&&h.generateMipmap(h.TEXTURE_2D)},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(h){this.__SPECTOR_Metadata=h,this.webGLTexture.__SPECTOR_Metadata=h}},destroy:function(){this.webGLTexture!==null&&(this.pixels instanceof x||this.renderer.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.renderer=null)}});E.exports=x},85788:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t,e){this.renderer=h,this.program=d,this.vertexArrayObject=null,this.indexBuffer=t,this.attributeBufferLayouts=e,this.glState={vao:this},this.createResource()},createResource:function(){var x=this.renderer.gl;this.vertexArrayObject=x.createVertexArray(),this.bind(),this.indexBuffer&&this.indexBuffer.bind();for(var h=this.program,d=h.glAttributes,t=h.glAttributeNames,e=0;e<this.attributeBufferLayouts.length;e++){var l=this.attributeBufferLayouts[e];l.buffer.bind();for(var i=l.layout.stride,s=l.layout.instanceDivisor,r=0;r<l.layout.layout.length;r++){var o=l.layout.layout[r],a=t.get(o.name);if(a!==void 0){var u=d[a];o.location=u.location;for(var f=o.location,v=o.bytes||4,c=o.columns||1,g=o.normalized,p=o.offset,T=o.size,C=o.type,M=0;M<c;M++)x.enableVertexAttribArray(f+M),x.vertexAttribPointer(f+M,T,C,g,i,p+v*M*T),isNaN(s)||x.vertexAttribDivisor(f+M,s)}}}this.renderer.glWrapper.updateVAO({vao:null}),this.renderer.glWrapper.updateBindings({bindings:{arrayBuffer:null,elementArrayBuffer:null}})},bind:function(){this.renderer.glWrapper.updateVAO(this.glState)},destroy:function(){var x=this.renderer.gl;this.vertexArrayObject&&(x.deleteVertexArray(this.vertexArrayObject),this.vertexArrayObject=null),this.indexBuffer=null,this.attributeBufferLayouts=null,this.glState=null,this.renderer=null}});E.exports=S},40952:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t){this.renderer=h,this.layout=d,this.completeLayout(d);var e=d.stride*d.count;if(t&&t.byteLength<e)throw new Error("Buffer too small for layout");this.buffer=t||h.createVertexBuffer(new ArrayBuffer(e),d.usage)},completeLayout:function(x){var h=this.renderer.gl,d=x.layout,t=this.renderer.shaderSetters.constants;typeof x.usage=="string"&&(x.usage=h[x.usage]);for(var e=0,l=0;l<d.length;l++){var i=d[l],s=i.size,r=i.columns||1;i.offset=e,typeof i.type=="string"&&(i.type=h[i.type]);var o=t[i.type],a=o.size,u=o.bytes;i.bytes=u,e+=s*r*u*a}x.stride=e}});E.exports=S},31884:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={WebGLGlobalWrapper:n(37959),WebGLBufferWrapper:n(26128),WebGLProgramWrapper:n(1482),WebGLShaderSetterWrapper:n(86272),WebGLTextureWrapper:n(82751),WebGLTextureUnitsWrapper:n(13760),WebGLFramebufferWrapper:n(84387),WebGLVAOWrapper:n(85788),WebGLVertexBufferLayoutWrapper:n(40952)};E.exports=m},76531:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(13560),S=n(83419),x=n(45319),h=n(50792),d=n(97480),t=n(8443),e=n(57811),l=n(74403),i=n(45818),s=n(29747),r=n(87841),o=n(86555),a=n(56583),u=n(26099),f=n(38058),v=new S({Extends:h,initialize:function(g){h.call(this),this.game=g,this.canvas,this.canvasBounds=new r,this.parent=null,this.parentIsWindow=!1,this.parentSize=new o,this.gameSize=new o,this.baseSize=new o,this.displaySize=new o,this.scaleMode=m.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new u(1,1),this.autoRound=!1,this.autoCenter=m.CENTER.NO_CENTER,this.orientation=m.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:s,windowResize:s,fullScreenChange:s,fullScreenError:s}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(t.BOOT,this.boot,this)},boot:function(){var c=this.game;this.canvas=c.canvas,this.fullscreen=c.device.fullscreen;var g=this.scaleMode;g!==m.SCALE_MODE.RESIZE&&g!==m.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(g),g===m.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()),c.events.on(t.PRE_STEP,this.step,this),c.events.once(t.READY,this.refresh,this),c.events.once(t.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(c){this.getParent(c),this.getParentBounds();var g=c.width,p=c.height,T=c.scaleMode,C=c.zoom,M=c.autoRound;if(typeof g=="string")if(g.substr(-1)!=="%")g=parseInt(g,10);else{var A=this.parentSize.width;A===0&&(A=window.innerWidth);var R=parseInt(g,10)/100;g=Math.floor(A*R)}if(typeof p=="string")if(p.substr(-1)!=="%")p=parseInt(p,10);else{var P=this.parentSize.height;P===0&&(P=window.innerHeight);var L=parseInt(p,10)/100;p=Math.floor(P*L)}this.scaleMode=T,this.autoRound=M,this.autoCenter=c.autoCenter,this.resizeInterval=c.resizeInterval,M&&(g=Math.floor(g),p=Math.floor(p)),this.gameSize.setSize(g,p),C===m.ZOOM.MAX_ZOOM&&(C=this.getMaxZoom()),this.zoom=C,C!==1&&(this._resetZoom=!0),this.baseSize.setSize(g,p),M&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),c.minWidth>0&&this.displaySize.setMin(c.minWidth*C,c.minHeight*C),c.maxWidth>0&&this.displaySize.setMax(c.maxWidth*C,c.maxHeight*C),this.displaySize.setSize(g,p),(c.snapWidth>0||c.snapHeight>0)&&this.displaySize.setSnap(c.snapWidth,c.snapHeight),this.orientation=i(g,p)},getParent:function(c){var g=c.parent;if(g!==null){if(this.parent=l(g),this.parentIsWindow=this.parent===document.body,c.expandParent&&c.scaleMode!==m.SCALE_MODE.NONE){var p=this.parent.getBoundingClientRect();(this.parentIsWindow||p.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",p=this.parent.getBoundingClientRect(),!this.parentIsWindow&&p.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}c.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(c.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var c=this.parentSize,g=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(g.height=e(!0));var p=g.width,T=g.height;if(c.width!==p||c.height!==T)return c.setSize(p,T),!0;if(this.canvas){var C=this.canvasBounds,M=this.canvas.getBoundingClientRect();if(M.x!==C.x||M.y!==C.y)return!0}return!1},lockOrientation:function(c){var g=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return g?g.call(screen,c):!1},setParentSize:function(c,g){return this.parentSize.setSize(c,g),this.refresh()},setGameSize:function(c,g){var p=this.autoRound;p&&(c=Math.floor(c),g=Math.floor(g));var T=this.width,C=this.height;return this.gameSize.resize(c,g),this.baseSize.resize(c,g),p&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(c/g),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(T,C)},resize:function(c,g){var p=this.zoom,T=this.autoRound;T&&(c=Math.floor(c),g=Math.floor(g));var C=this.width,M=this.height;this.gameSize.resize(c,g),this.baseSize.resize(c,g),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(c*p,g*p),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var A=this.canvas.style,R=c*p,P=g*p;return T&&(R=Math.floor(R),P=Math.floor(P)),(R!==c||P!==g)&&(A.width=R+"px",A.height=P+"px"),this.refresh(C,M)},setZoom:function(c){return this.zoom=c,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(c,g){return c===void 0&&(c=0),g===void 0&&(g=c),this.displaySize.setSnap(c,g),this.refresh()},refresh:function(c,g){c===void 0&&(c=this.width),g===void 0&&(g=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var p=this.game.domContainer;if(p){this.baseSize.setCSS(p);var T=this.canvas.style,C=p.style;C.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",C.marginLeft=T.marginLeft,C.marginTop=T.marginTop}return this.emit(d.RESIZE,this.gameSize,this.baseSize,this.displaySize,c,g),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var c=i(this.width,this.height);c!==this.orientation&&(this.orientation=c,this.emit(d.ORIENTATION_CHANGE,c))}},updateScale:function(){var c=this.canvas.style,g=this.gameSize.width,p=this.gameSize.height,T,C,M=this.zoom,A=this.autoRound;if(this.scaleMode===m.SCALE_MODE.NONE)this.displaySize.setSize(g*M,p*M),T=this.displaySize.width,C=this.displaySize.height,A&&(T=Math.floor(T),C=Math.floor(C)),this._resetZoom&&(c.width=T+"px",c.height=C+"px",this._resetZoom=!1);else if(this.scaleMode===m.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),T=this.displaySize.width,C=this.displaySize.height,A&&(T=Math.floor(T),C=Math.floor(C)),this.canvas.width=T,this.canvas.height=C;else if(this.scaleMode===m.SCALE_MODE.EXPAND){var R=this.game.config.width,P=this.game.config.height,L=this.parentSize.width,F=this.parentSize.height,w=L/R,O=F/P,B,I;w<O?(B=R,I=w!==0?F/w:P):(B=O!==0?L/O:R,I=P);var D=x(B,this.displaySize.minWidth,this.displaySize.maxWidth),N=x(I,this.displaySize.minHeight,this.displaySize.maxHeight);this.baseSize.setSize(D,N),this.gameSize.setSize(D,N),A&&(D=Math.floor(D),N=Math.floor(N)),this.canvas.width=D,this.canvas.height=N;var z=L*(D/B),V=F*(N/I);this.displaySize.setSize(z,V),T=this.displaySize.width,C=this.displaySize.height,A&&(T=Math.floor(T),C=Math.floor(C)),c.width=T+"px",c.height=C+"px"}else this.displaySize.setSize(this.parentSize.width,this.parentSize.height),T=this.displaySize.width,C=this.displaySize.height,A&&(T=Math.floor(T),C=Math.floor(C)),c.width=T+"px",c.height=C+"px";this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var c=a(this.parentSize.width,this.gameSize.width,0,!0),g=a(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(c,g),1)},updateCenter:function(){var c=this.autoCenter;if(c!==m.CENTER.NO_CENTER){var g=this.canvas,p=g.style,T=g.getBoundingClientRect(),C=T.width,M=T.height,A=Math.floor((this.parentSize.width-C)/2),R=Math.floor((this.parentSize.height-M)/2);c===m.CENTER.CENTER_HORIZONTALLY?R=0:c===m.CENTER.CENTER_VERTICALLY&&(A=0),p.marginLeft=A+"px",p.marginTop=R+"px"}},updateBounds:function(){var c=this.canvasBounds,g=this.canvas.getBoundingClientRect();c.x=g.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),c.y=g.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),c.width=g.width,c.height=g.height},transformX:function(c){return(c-this.canvasBounds.left)*this.displayScale.x},transformY:function(c){return(c-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(c){c===void 0&&(c={navigationUI:"hide"});var g=this.fullscreen;if(!g.available){this.emit(d.FULLSCREEN_UNSUPPORTED);return}if(!g.active){var p=this.getFullscreenTarget();g.keyboard?p[g.request](Element.ALLOW_KEYBOARD_INPUT):p[g.request](c)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(d.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(c){this.removeFullscreenTarget(),this.emit(d.FULLSCREEN_FAILED,c)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var c=document.createElement("div");c.style.margin="0",c.style.padding="0",c.style.width="100%",c.style.height="100%",this.fullscreenTarget=c,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var g=this.canvas.parentNode;g.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var c=this.fullscreenTarget;if(c&&c.parentNode){var g=c.parentNode;g.insertBefore(this.canvas,c),g.removeChild(c)}}},stopFullscreen:function(){var c=this.fullscreen;if(!c.available)return this.emit(d.FULLSCREEN_UNSUPPORTED),!1;c.active&&document[c.cancel](),this.removeFullscreenTarget()},leaveFullScreenSuccessHandler:function(){this.getParentBounds(),this.emit(d.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(c){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(c)},startListeners:function(){var c=this,g=this.domlisteners;if(g.orientationChange=function(){c.updateBounds(),c._checkOrientation=!0,c.dirty=!0,c.refresh()},g.windowResize=function(){c.updateBounds(),c.dirty=!0},screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",g.orientationChange,!1):window.addEventListener("orientationchange",g.orientationChange,!1),window.addEventListener("resize",g.windowResize,!1),this.fullscreen.available){g.fullScreenChange=function(T){return c.onFullScreenChange(T)},g.fullScreenError=function(T){return c.onFullScreenError(T)};var p=["webkit","moz",""];p.forEach(function(T){document.addEventListener(T+"fullscreenchange",g.fullScreenChange,!1),document.addEventListener(T+"fullscreenerror",g.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.addEventListener("MSFullscreenError",g.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():(this.stopFullscreen(),this.leaveFullScreenSuccessHandler())},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(c,g){c instanceof f||(g=c,c=void 0),g===void 0&&(g=new r);var p=this.baseSize,T=this.parentSize,C=this.canvasBounds,M=this.displayScale,A=C.x>=0?0:-(C.x*M.x),R=C.y>=0?0:-(C.y*M.y),P;T.width>=C.width?P=p.width:P=p.width-(C.width-T.width)*M.x;var L;return T.height>=C.height?L=p.height:L=p.height-(C.height-T.height)*M.y,g.setTo(A,R,P,L),c&&(g.width/=c.zoomX,g.height/=c.zoomY,g.centerX=c.centerX+c.scrollX,g.centerY=c.centerY+c.scrollY),g},step:function(c,g){this.parent&&(this._lastCheck+=g,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var c=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",c.orientationChange,!1):window.removeEventListener("orientationchange",c.orientationChange,!1),window.removeEventListener("resize",c.windowResize,!1);var g=["webkit","moz",""];g.forEach(function(p){document.removeEventListener(p+"fullscreenchange",c.fullScreenChange,!1),document.removeEventListener(p+"fullscreenerror",c.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",c.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",c.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===m.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===m.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});E.exports=v},64743:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={CENTER:n(64743),ORIENTATION:n(39218),SCALE_MODE:n(81050),ZOOM:n(80805)};E.exports=m},56139:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="enterfullscreen"},2336:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="fullscreenfailed"},47412:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="fullscreenunsupported"},51452:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="leavefullscreen"},20666:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="orientationchange"},47945:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resize"},97480:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ENTER_FULLSCREEN:n(56139),FULLSCREEN_FAILED:n(2336),FULLSCREEN_UNSUPPORTED:n(47412),LEAVE_FULLSCREEN:n(51452),ORIENTATION_CHANGE:n(20666),RESIZE:n(47945)}},93364:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(79291),S=n(13560),x={Center:n(64743),Events:n(97480),Orientation:n(39218),ScaleManager:n(76531),ScaleModes:n(81050),Zoom:n(80805)};x=m(!1,x,S.CENTER),x=m(!1,x,S.ORIENTATION),x=m(!1,x,S.SCALE_MODE),x=m(!1,x,S.ZOOM),E.exports=x},27397:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S=n(35355),x=function(h){var d=h.game.config.defaultPhysicsSystem,t=m(h.settings,"physics",!1);if(!(!d&&!t)){var e=[];if(d&&e.push(S(d+"Physics")),t)for(var l in t)l=S(l.concat("Physics")),e.indexOf(l)===-1&&e.push(l);return e}};E.exports=x},52106:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S=function(x){var h=x.plugins.getDefaultScenePlugins(),d=m(x.settings,"plugins",!1);return Array.isArray(d)?d:h||[]};E.exports=S},87033:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",matterPhysics:"matter"};E.exports=y},97482:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(2368),x=new m({initialize:function(d){this.sys=new S(this,d),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(){}});E.exports=x},60903:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(89993),x=n(44594),h=n(8443),d=n(35154),t=n(54899),e=n(29747),l=n(97482),i=n(2368),s=new m({initialize:function(o,a){if(this.game=o,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,a){Array.isArray(a)||(a=[a]);for(var u=0;u<a.length;u++)this._pending.push({key:"default",scene:a[u],autoStart:u===0,data:{}})}o.events.once(h.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){this.systemScene=this.createSceneFromInstance("__SYSTEM",new l),this.game.events.emit(h.SYSTEM_READY,this.systemScene,this);var r,o,a,u;for(r=0;r<this._pending.length;r++){o=this._pending[r],a=o.key,u=o.scene;var f;u instanceof l?f=this.createSceneFromInstance(a,u):typeof u=="object"?f=this.createSceneFromObject(a,u):typeof u=="function"&&(f=this.createSceneFromFunction(a,u)),a=f.sys.settings.key,this.keys[a]=f,this.scenes.push(f),this._data[a]&&(f.sys.settings.data=this._data[a].data,this._data[a].autoStart&&(o.autoStart=!0)),(o.autoStart||f.sys.settings.active)&&this._start.push(a)}for(this._pending.length=0,this._data={},this.isBooted=!0,r=0;r<this._start.length;r++)o=this._start[r],this.start(o);this._start.length=0}},processQueue:function(){var r=this._pending.length,o=this._queue.length;if(!(r===0&&o===0)){var a,u;if(r){for(a=0;a<r;a++)u=this._pending[a],this.add(u.key,u.scene,u.autoStart,u.data);for(a=0;a<this._start.length;a++)u=this._start[a],this.start(u);this._start.length=0,this._pending.length=0}for(a=0;a<this._queue.length;a++)u=this._queue[a],this[u.op](u.keyA,u.keyB,u.data);this._queue.length=0}},add:function(r,o,a,u){if(a===void 0&&(a=!1),u===void 0&&(u={}),this.isProcessing||!this.isBooted)return this._pending.push({key:r,scene:o,autoStart:a,data:u}),this.isBooted||(this._data[r]={data:u}),null;r=this.getKey(r,o);var f;return o instanceof l?f=this.createSceneFromInstance(r,o):typeof o=="object"?(o.key=r,f=this.createSceneFromObject(r,o)):typeof o=="function"&&(f=this.createSceneFromFunction(r,o)),f.sys.settings.data=u,r=f.sys.settings.key,this.keys[r]=f,this.scenes.push(f),(a||f.sys.settings.active)&&(this._pending.length?this._start.push(r):this.start(r)),f},remove:function(r){if(this.isProcessing)return this.queueOp("remove",r);var o=this.getScene(r);if(!o||o.sys.isTransitioning())return this;var a=this.scenes.indexOf(o),u=o.sys.settings.key;return a>-1&&(delete this.keys[u],this.scenes.splice(a,1),this._start.indexOf(u)>-1&&(a=this._start.indexOf(u),this._start.splice(a,1)),o.sys.destroy()),this},bootScene:function(r){var o=r.sys,a=o.settings;o.sceneUpdate=e,r.init&&(r.init.call(r,a.data),a.status=S.INIT,a.isTransition&&o.events.emit(x.TRANSITION_INIT,a.transitionFrom,a.transitionDuration));var u;o.load&&(u=o.load,u.reset()),u&&r.preload?(r.preload.call(r),a.status=S.LOADING,u.once(t.COMPLETE,this.loadComplete,this),u.start()):this.create(r)},loadComplete:function(r){this.create(r.scene)},payloadComplete:function(r){this.bootScene(r.scene)},update:function(r,o){this.processQueue(),this.isProcessing=!0;for(var a=this.scenes.length-1;a>=0;a--){var u=this.scenes[a].sys;u.settings.status>S.START&&u.settings.status<=S.RUNNING&&u.step(r,o),u.scenePlugin&&u.scenePlugin._target&&u.scenePlugin.step(r,o)}},render:function(r){for(var o=0;o<this.scenes.length;o++){var a=this.scenes[o].sys;a.settings.visible&&a.settings.status>=S.LOADING&&a.settings.status<S.SLEEPING&&a.render(r)}this.isProcessing=!1},create:function(r){var o=r.sys,a=o.settings;r.create&&(a.status=S.CREATING,r.create.call(r,a.data),a.status===S.DESTROYED)||(a.isTransition&&o.events.emit(x.TRANSITION_START,a.transitionFrom,a.transitionDuration),r.update&&(o.sceneUpdate=r.update),a.status=S.RUNNING,o.events.emit(x.CREATE,r))},createSceneFromFunction:function(r,o){var a=new o;if(a instanceof l){var u=a.sys.settings.key;if(u!==""&&(r=u),this.keys.hasOwnProperty(r))throw new Error("Cannot add Scene with duplicate key: "+r);return this.createSceneFromInstance(r,a)}else return a.sys=new i(a),a.sys.settings.key=r,a.sys.init(this.game),a},createSceneFromInstance:function(r,o){var a=o.sys.settings.key;return a===""&&(o.sys.settings.key=r),o.sys.init(this.game),o},createSceneFromObject:function(r,o){var a=new l(o),u=a.sys.settings.key;u!==""?r=u:a.sys.settings.key=r,a.sys.init(this.game);for(var f=["init","preload","create","update","render"],v=0;v<f.length;v++){var c=d(o,f[v],null);c&&(a[f[v]]=c)}if(o.hasOwnProperty("extend")){for(var g in o.extend)if(o.extend.hasOwnProperty(g)){var p=o.extend[g];g==="data"&&a.hasOwnProperty("data")&&typeof p=="object"?a.data.merge(p):g!=="sys"&&(a[g]=p)}}return a},getKey:function(r,o){if(r||(r="default"),typeof o=="function")return r;if(o instanceof l?r=o.sys.settings.key:typeof o=="object"&&o.hasOwnProperty("key")&&(r=o.key),this.keys.hasOwnProperty(r))throw new Error("Cannot add Scene with duplicate key: "+r);return r},getScenes:function(r,o){r===void 0&&(r=!0),o===void 0&&(o=!1);for(var a=[],u=this.scenes,f=0;f<u.length;f++){var v=u[f];v&&(!r||r&&v.sys.isActive())&&a.push(v)}return o?a.reverse():a},getScene:function(r){if(typeof r=="string"){if(this.keys[r])return this.keys[r]}else for(var o=0;o<this.scenes.length;o++)if(r===this.scenes[o])return r;return null},isActive:function(r){var o=this.getScene(r);return o?o.sys.isActive():null},isPaused:function(r){var o=this.getScene(r);return o?o.sys.isPaused():null},isVisible:function(r){var o=this.getScene(r);return o?o.sys.isVisible():null},isSleeping:function(r){var o=this.getScene(r);return o?o.sys.isSleeping():null},pause:function(r,o){var a=this.getScene(r);return a&&a.sys.pause(o),this},resume:function(r,o){var a=this.getScene(r);return a&&a.sys.resume(o),this},sleep:function(r,o){var a=this.getScene(r);return a&&!a.sys.isTransitioning()&&a.sys.sleep(o),this},wake:function(r,o){var a=this.getScene(r);return a&&a.sys.wake(o),this},run:function(r,o){var a=this.getScene(r);if(!a){for(var u=0;u<this._pending.length;u++)if(this._pending[u].key===r){this.queueOp("start",r,o);break}return this}a.sys.isSleeping()?a.sys.wake(o):a.sys.isPaused()?a.sys.resume(o):this.start(r,o)},start:function(r,o){if(!this.isBooted)return this._data[r]={autoStart:!0,data:o},this;var a=this.getScene(r);if(!a)return console.warn("Scene key not found: "+r),this;var u=a.sys,f=u.settings.status;if(f>=S.START&&f<=S.CREATING)return this;if(f>=S.RUNNING&&f<=S.SLEEPING)u.shutdown(),u.sceneUpdate=e,u.start(o);else{u.sceneUpdate=e,u.start(o);var v;if(u.load&&(v=u.load),v&&u.settings.hasOwnProperty("pack")&&(v.reset(),v.addPack({payload:u.settings.pack})))return u.settings.status=S.LOADING,v.once(t.COMPLETE,this.payloadComplete,this),v.start(),this}return this.bootScene(a),this},stop:function(r,o){var a=this.getScene(r);if(a&&!a.sys.isTransitioning()&&a.sys.settings.status!==S.SHUTDOWN){var u=a.sys.load;u&&(u.off(t.COMPLETE,this.loadComplete,this),u.off(t.COMPLETE,this.payloadComplete,this)),a.sys.shutdown(o)}return this},switch:function(r,o,a){var u=this.getScene(r),f=this.getScene(o);return u&&f&&u!==f&&(this.sleep(r),this.isSleeping(o)?this.wake(o,a):this.start(o,a)),this},getAt:function(r){return this.scenes[r]},getIndex:function(r){var o=this.getScene(r);return this.scenes.indexOf(o)},bringToTop:function(r){if(this.isProcessing)return this.queueOp("bringToTop",r);var o=this.getIndex(r),a=this.scenes;if(o!==-1&&o<a.length){var u=this.getScene(r);a.splice(o,1),a.push(u)}return this},sendToBack:function(r){if(this.isProcessing)return this.queueOp("sendToBack",r);var o=this.getIndex(r);if(o!==-1&&o>0){var a=this.getScene(r);this.scenes.splice(o,1),this.scenes.unshift(a)}return this},moveDown:function(r){if(this.isProcessing)return this.queueOp("moveDown",r);var o=this.getIndex(r);if(o>0){var a=o-1,u=this.getScene(r),f=this.getAt(a);this.scenes[o]=f,this.scenes[a]=u}return this},moveUp:function(r){if(this.isProcessing)return this.queueOp("moveUp",r);var o=this.getIndex(r);if(o<this.scenes.length-1){var a=o+1,u=this.getScene(r),f=this.getAt(a);this.scenes[o]=f,this.scenes[a]=u}return this},moveAbove:function(r,o){if(r===o)return this;if(this.isProcessing)return this.queueOp("moveAbove",r,o);var a=this.getIndex(r),u=this.getIndex(o);if(a!==-1&&u!==-1&&u<a){var f=this.getAt(u);this.scenes.splice(u,1),this.scenes.splice(a+(u>a),0,f)}return this},moveBelow:function(r,o){if(r===o)return this;if(this.isProcessing)return this.queueOp("moveBelow",r,o);var a=this.getIndex(r),u=this.getIndex(o);if(a!==-1&&u!==-1&&u>a){var f=this.getAt(u);this.scenes.splice(u,1),a===0?this.scenes.unshift(f):this.scenes.splice(a-(u<a),0,f)}return this},queueOp:function(r,o,a,u){return this._queue.push({op:r,keyA:o,keyB:a,data:u}),this},swapPosition:function(r,o){if(r===o)return this;if(this.isProcessing)return this.queueOp("swapPosition",r,o);var a=this.getIndex(r),u=this.getIndex(o);if(a!==u&&a!==-1&&u!==-1){var f=this.getAt(a);this.scenes[a]=this.scenes[u],this.scenes[u]=f}return this},dump:function(){for(var r=[],o=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],a=0;a<this.scenes.length;a++){var u=this.scenes[a].sys,f=u.settings.visible&&(u.settings.status===S.RUNNING||u.settings.status===S.PAUSED)?"[*] ":"[-] ";f+=u.settings.key+" ("+o[u.settings.status]+")",r.push(f)}console.log(r.join(`
|
||
`))},destroy:function(){for(var r=0;r<this.scenes.length;r++){var o=this.scenes[r].sys;o.destroy()}this.systemScene.sys.destroy(),this.update=e,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});E.exports=s},52209:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(44594),h=n(95540),d=n(37277),t=new S({initialize:function(l){this.scene=l,this.systems=l.sys,this.settings=l.sys.settings,this.key=l.sys.settings.key,this.manager=l.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,l.sys.events.once(x.BOOT,this.boot,this),l.sys.events.on(x.START,this.pluginStart,this)},boot:function(){this.systems.events.once(x.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(x.SHUTDOWN,this.shutdown,this)},start:function(e,l){return e===void 0&&(e=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",e,l),this},restart:function(e){var l=this.key;return this.manager.queueOp("stop",l),this.manager.queueOp("start",l,e),this},transition:function(e){e===void 0&&(e={});var l=h(e,"target",!1),i=this.manager.getScene(l);if(!l||!this.checkValidTransition(i))return!1;var s=h(e,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=h(e,"sleep",!1),this._willRemove=h(e,"remove",!1);var r=h(e,"onUpdate",null);r&&(this._onUpdate=r,this._onUpdateScope=h(e,"onUpdateScope",this.scene));var o=h(e,"allowInput",!1);this.settings.transitionAllowInput=o;var a=i.sys.settings;a.isTransition=!0,a.transitionFrom=this.scene,a.transitionDuration=s,a.transitionAllowInput=o,h(e,"moveAbove",!1)?this.manager.moveAbove(this.key,l):h(e,"moveBelow",!1)&&this.manager.moveBelow(this.key,l),i.sys.isSleeping()?i.sys.wake(h(e,"data")):this.manager.start(l,h(e,"data"));var u=h(e,"onStart",null),f=h(e,"onStartScope",this.scene);return u&&u.call(f,this.scene,i,s),this.systems.events.emit(x.TRANSITION_OUT,i,s),!0},checkValidTransition:function(e){return!(!e||e.sys.isActive()||e.sys.isTransitioning()||e===this.scene||this.systems.isTransitioning())},step:function(e,l){this._elapsed+=l,this.transitionProgress=m(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var e=this._target.sys,l=this._target.sys.settings;e.events.emit(x.TRANSITION_COMPLETE,this.scene),l.isTransition=!1,l.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(e,l,i,s){return this.manager.add(e,l,i,s)},launch:function(e,l){return e&&e!==this.key&&this.manager.queueOp("start",e,l),this},run:function(e,l){return e&&e!==this.key&&this.manager.queueOp("run",e,l),this},pause:function(e,l){return e===void 0&&(e=this.key),this.manager.queueOp("pause",e,l),this},resume:function(e,l){return e===void 0&&(e=this.key),this.manager.queueOp("resume",e,l),this},sleep:function(e,l){return e===void 0&&(e=this.key),this.manager.queueOp("sleep",e,l),this},wake:function(e,l){return e===void 0&&(e=this.key),this.manager.queueOp("wake",e,l),this},switch:function(e,l){return e!==this.key&&this.manager.queueOp("switch",this.key,e,l),this},stop:function(e,l){return e===void 0&&(e=this.key),this.manager.queueOp("stop",e,l),this},setActive:function(e,l,i){l===void 0&&(l=this.key);var s=this.manager.getScene(l);return s&&s.sys.setActive(e,i),this},setVisible:function(e,l){l===void 0&&(l=this.key);var i=this.manager.getScene(l);return i&&i.sys.setVisible(e),this},isSleeping:function(e){return e===void 0&&(e=this.key),this.manager.isSleeping(e)},isActive:function(e){return e===void 0&&(e=this.key),this.manager.isActive(e)},isPaused:function(e){return e===void 0&&(e=this.key),this.manager.isPaused(e)},isVisible:function(e){return e===void 0&&(e=this.key),this.manager.isVisible(e)},swapPosition:function(e,l){return l===void 0&&(l=this.key),e!==l&&this.manager.swapPosition(e,l),this},moveAbove:function(e,l){return l===void 0&&(l=this.key),e!==l&&this.manager.moveAbove(e,l),this},moveBelow:function(e,l){return l===void 0&&(l=this.key),e!==l&&this.manager.moveBelow(e,l),this},remove:function(e){return e===void 0&&(e=this.key),this.manager.remove(e),this},moveUp:function(e){return e===void 0&&(e=this.key),this.manager.moveUp(e),this},moveDown:function(e){return e===void 0&&(e=this.key),this.manager.moveDown(e),this},bringToTop:function(e){return e===void 0&&(e=this.key),this.manager.bringToTop(e),this},sendToBack:function(e){return e===void 0&&(e=this.key),this.manager.sendToBack(e),this},get:function(e){return this.manager.getScene(e)},getStatus:function(e){var l=this.manager.getScene(e);if(l)return l.sys.getStatus()},getIndex:function(e){return e===void 0&&(e=this.key),this.manager.getIndex(e)},shutdown:function(){var e=this.systems.events;e.off(x.SHUTDOWN,this.shutdown,this),e.off(x.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(x.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});d.register("ScenePlugin",t,"scenePlugin"),E.exports=t},55681:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(89993),S=n(35154),x=n(46975),h=n(87033),d={create:function(t){return typeof t=="string"?t={key:t}:t===void 0&&(t={}),{status:m.PENDING,key:S(t,"key",""),active:S(t,"active",!1),visible:S(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:S(t,"pack",!1),cameras:S(t,"cameras",null),map:S(t,"map",x(h,S(t,"mapAdd",{}))),physics:S(t,"physics",{}),loader:S(t,"loader",{}),plugins:S(t,"plugins",!1),input:S(t,"input",{})}}};E.exports=d},2368:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(89993),x=n(42363),h=n(44594),d=n(27397),t=n(52106),e=n(29747),l=n(55681),i=new m({initialize:function(r,o){this.scene=r,this.game,this.renderer,this.config=o,this.settings=l.create(o),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=e},init:function(s){this.settings.status=S.INIT,this.sceneUpdate=e,this.game=s,this.renderer=s.renderer,this.canvas=s.canvas,this.context=s.context;var r=s.plugins;this.plugins=r,r.addToScene(this,x.Global,[x.CoreScene,t(this),d(this)]),this.events.emit(h.BOOT,this),this.settings.isBooted=!0},step:function(s,r){var o=this.events;o.emit(h.PRE_UPDATE,s,r),o.emit(h.UPDATE,s,r),this.sceneUpdate.call(this.scene,s,r),o.emit(h.POST_UPDATE,s,r)},render:function(s){var r=this.displayList;r.depthSort(),this.events.emit(h.PRE_RENDER,s),this.cameras.render(s,r),this.events.emit(h.RENDER,s)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(s){var r=this.settings,o=this.getStatus();return o!==S.CREATING&&o!==S.RUNNING?console.warn("Cannot pause non-running Scene",r.key):this.settings.active&&(r.status=S.PAUSED,r.active=!1,this.events.emit(h.PAUSE,this,s)),this},resume:function(s){var r=this.events,o=this.settings;return this.settings.active||(o.status=S.RUNNING,o.active=!0,r.emit(h.RESUME,this,s)),this},sleep:function(s){var r=this.settings,o=this.getStatus();return o!==S.CREATING&&o!==S.RUNNING?console.warn("Cannot sleep non-running Scene",r.key):(r.status=S.SLEEPING,r.active=!1,r.visible=!1,this.events.emit(h.SLEEP,this,s)),this},wake:function(s){var r=this.events,o=this.settings;return o.status=S.RUNNING,o.active=!0,o.visible=!0,r.emit(h.WAKE,this,s),o.isTransition&&r.emit(h.TRANSITION_WAKE,o.transitionFrom,o.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var s=this.settings.status;return s>S.PENDING&&s<=S.RUNNING},isSleeping:function(){return this.settings.status===S.SLEEPING},isActive:function(){return this.settings.status===S.RUNNING},isPaused:function(){return this.settings.status===S.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(s){return this.settings.visible=s,this},setActive:function(s,r){return s?this.resume(r):this.pause(r)},start:function(s){var r=this.events,o=this.settings;s&&(o.data=s),o.status=S.START,o.active=!0,o.visible=!0,r.emit(h.START,this),r.emit(h.READY,this,s)},shutdown:function(s){var r=this.events,o=this.settings;r.off(h.TRANSITION_INIT),r.off(h.TRANSITION_START),r.off(h.TRANSITION_COMPLETE),r.off(h.TRANSITION_OUT),o.status=S.SHUTDOWN,o.active=!1,o.visible=!1,r.emit(h.SHUTDOWN,this,s)},destroy:function(){var s=this.events,r=this.settings;r.status=S.DESTROYED,r.active=!1,r.visible=!1,s.emit(h.DESTROY,this),s.removeAllListeners();for(var o=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],a=0;a<o.length;a++)this[o[a]]=null}});E.exports=i},89993:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};E.exports=y},69830:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="addedtoscene"},7919:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="boot"},46763:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="create"},11763:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="destroy"},71555:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pause"},36735:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="postupdate"},3809:E=>{/**
|
||
* @author samme
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="prerender"},90716:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="preupdate"},58262:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="ready"},91633:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="removedfromscene"},10319:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="render"},87132:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resume"},81961:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="shutdown"},90194:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="sleep"},6265:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="start"},33178:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="transitioncomplete"},43063:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="transitioninit"},11259:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="transitionout"},61611:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="transitionstart"},45209:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="transitionwake"},22966:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="update"},21747:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="wake"},44594:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ADDED_TO_SCENE:n(69830),BOOT:n(7919),CREATE:n(46763),DESTROY:n(11763),PAUSE:n(71555),POST_UPDATE:n(36735),PRE_RENDER:n(3809),PRE_UPDATE:n(90716),READY:n(58262),REMOVED_FROM_SCENE:n(91633),RENDER:n(10319),RESUME:n(87132),SHUTDOWN:n(81961),SLEEP:n(90194),START:n(6265),TRANSITION_COMPLETE:n(33178),TRANSITION_INIT:n(43063),TRANSITION_OUT:n(11259),TRANSITION_START:n(61611),TRANSITION_WAKE:n(45209),UPDATE:n(22966),WAKE:n(21747)}},62194:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(89993),S=n(79291),x={Events:n(44594),GetPhysicsPlugins:n(27397),GetScenePlugins:n(52106),SceneManager:n(60903),ScenePlugin:n(52209),Settings:n(55681),Systems:n(2368)};x=S(!1,x,m),E.exports=x},30341:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50792),x=n(14463),h=n(79291),d=n(29747),t=new m({Extends:S,initialize:function(l,i,s){S.call(this),this.manager=l,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=h(this.config,s),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(e){return!e||!e.name||typeof e.name!="string"?!1:this.markers[e.name]?(console.error("addMarker "+e.name+" already exists in Sound"),!1):(e=h(!0,{name:"",start:0,duration:this.totalDuration-(e.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},e),this.markers[e.name]=e,!0)},updateMarker:function(e){return!e||!e.name||typeof e.name!="string"?!1:this.markers[e.name]?(this.markers[e.name]=h(!0,this.markers[e.name],e),!0):(console.warn("Audio Marker: "+e.name+" missing in Sound: "+this.key),!1)},removeMarker:function(e){var l=this.markers[e];return l?(this.markers[e]=null,l):null},play:function(e,l){if(e===void 0&&(e=""),typeof e=="object"&&(l=e,e=""),typeof e!="string")return!1;if(!e)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[e])return console.warn("Marker: "+e+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[e],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=h(this.currentConfig,l),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:d,calculateRate:function(){var e=1.0005777895065548,l=this.currentConfig.detune+this.manager.detune,i=Math.pow(e,l);this.totalRate=this.currentConfig.rate*this.manager.rate*i},destroy:function(){this.pendingRemove||(this.stop(),this.emit(x.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});E.exports=t},85034:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(41786),x=n(50792),h=n(14463),d=n(8443),t=n(46710),e=n(58731),l=n(29747),i=n(26099),s=new m({Extends:x,initialize:function(o){x.call(this),this.game=o,this.jsonCache=o.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 a=o.events;a.on(d.BLUR,this.onGameBlur,this),a.on(d.FOCUS,this.onGameFocus,this),a.on(d.PRE_STEP,this.update,this),a.once(d.DESTROY,this.destroy,this)},add:l,addAudioSprite:function(r,o){o===void 0&&(o={});var a=this.add(r,o);a.spritemap=this.jsonCache.get(r).spritemap;for(var u in a.spritemap)if(a.spritemap.hasOwnProperty(u)){var f=S(o),v=a.spritemap[u];f.loop=v.hasOwnProperty("loop")?v.loop:!1,a.addMarker({name:u,start:v.start,duration:v.end-v.start,config:f})}return a},get:function(r){return e(this.sounds,"key",r)},getAll:function(r){return r?t(this.sounds,"key",r):t(this.sounds)},getAllPlaying:function(){return t(this.sounds,"isPlaying",!0)},play:function(r,o){var a=this.add(r);return a.once(h.COMPLETE,a.destroy,a),o?o.name?(a.addMarker(o),a.play(o.name)):a.play(o):a.play()},playAudioSprite:function(r,o,a){var u=this.addAudioSprite(r);return u.once(h.COMPLETE,u.destroy,u),u.play(o,a)},remove:function(r){var o=this.sounds.indexOf(r);return o!==-1?(r.destroy(),this.sounds.splice(o,1),!0):!1},removeAll:function(){this.sounds.forEach(function(r){r.destroy()}),this.sounds.length=0},removeByKey:function(r){for(var o=0,a=this.sounds.length-1;a>=0;a--){var u=this.sounds[a];u.key===r&&(u.destroy(),this.sounds.splice(a,1),o++)}return o},pauseAll:function(){this.forEachActiveSound(function(r){r.pause()}),this.emit(h.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(r){r.resume()}),this.emit(h.RESUME_ALL,this)},setListenerPosition:l,stopAll:function(){this.forEachActiveSound(function(r){r.stop()}),this.emit(h.STOP_ALL,this)},stopByKey:function(r){var o=0;return this.getAll(r).forEach(function(a){a.stop()&&o++}),o},isPlaying:function(r){var o=this.sounds,a=o.length-1,u;if(r===void 0){for(;a>=0;a--)if(u=this.sounds[a],u.isPlaying)return!0}else for(;a>=0;a--)if(u=this.sounds[a],u.key===r&&u.isPlaying)return!0;return!1},unlock:l,onBlur:l,onFocus:l,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(r,o){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(h.UNLOCKED,this));for(var a=this.sounds.length-1;a>=0;a--)this.sounds[a].pendingRemove&&this.sounds.splice(a,1);this.sounds.forEach(function(u){u.update(r,o)})},destroy:function(){this.game.events.off(d.BLUR,this.onGameBlur,this),this.game.events.off(d.FOCUS,this.onGameFocus,this),this.game.events.off(d.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(r,o){var a=this;this.sounds.forEach(function(u,f){u&&!u.pendingRemove&&r.call(o||a,u,f,a.sounds)})},setRate:function(r){return this.rate=r,this},rate:{get:function(){return this._rate},set:function(r){this._rate=r,this.forEachActiveSound(function(o){o.calculateRate()}),this.emit(h.GLOBAL_RATE,this,r)}},setDetune:function(r){return this.detune=r,this},detune:{get:function(){return this._detune},set:function(r){this._detune=r,this.forEachActiveSound(function(o){o.calculateRate()}),this.emit(h.GLOBAL_DETUNE,this,r)}}});E.exports=s},14747:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(33684),S=n(25960),x=n(57490),h={create:function(d){var t=d.config.audio,e=d.device.audio;return t.noAudio||!e.webAudio&&!e.audioData?new S(d):e.webAudio&&!t.disableWebAudio?new x(d):new m(d)}};E.exports=h},19723:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="complete"},98882:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="decodedall"},57506:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="decoded"},73146:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="destroy"},11305:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="detune"},40577:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="detune"},30333:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="mute"},20394:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="rate"},21802:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="volume"},1299:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="looped"},99190:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="loop"},97125:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="mute"},89259:E=>{/**
|
||
* @author pi-kei
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pan"},79986:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pauseall"},17586:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pause"},19618:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="play"},42306:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="rate"},10387:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resumeall"},48959:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resume"},9960:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="seek"},19180:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="stopall"},98328:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="stop"},50401:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="unlocked"},52498:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="volume"},14463:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={COMPLETE:n(19723),DECODED:n(57506),DECODED_ALL:n(98882),DESTROY:n(73146),DETUNE:n(11305),GLOBAL_DETUNE:n(40577),GLOBAL_MUTE:n(30333),GLOBAL_RATE:n(20394),GLOBAL_VOLUME:n(21802),LOOP:n(99190),LOOPED:n(1299),MUTE:n(97125),PAN:n(89259),PAUSE_ALL:n(79986),PAUSE:n(17586),PLAY:n(19618),RATE:n(42306),RESUME_ALL:n(10387),RESUME:n(48959),SEEK:n(9960),STOP_ALL:n(19180),STOP:n(98328),UNLOCKED:n(50401),VOLUME:n(52498)}},64895:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(30341),S=n(83419),x=n(14463),h=n(45319),d=new S({Extends:m,initialize:function(e,l,i){if(i===void 0&&(i={}),this.tags=e.game.cache.audio.get(l),!this.tags)throw new Error('No cached audio asset with key "'+l);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,m.call(this,e,l,i)},play:function(t,e){return this.manager.isLocked(this,"play",[t,e])||!m.prototype.play.call(this,t,e)||!this.pickAndPlayAudioTag()?!1:(this.emit(x.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!m.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(x.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!m.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(x.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!m.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(x.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,l=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=l,this.audio.currentTime=l,this.applyConfig(),e===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+e*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t<this.tags.length;t++){var e=this.tags[t];if(e.dataset.used==="false")return e.dataset.used="true",this.audio=e,!0}if(!this.manager.override)return!1;var l=[];this.manager.forEachActiveSound(function(s){s.key===this.key&&s.audio&&l.push(s)},this),l.sort(function(s,r){return s.loop===r.loop?r.seek/r.duration-s.seek/s.duration:s.loop?1:-1});var i=l[0];return this.audio=i.audio,i.reset(),i.audio=null,i.startTime=0,i.previousTime=0,!0},playCatchPromise:function(){var t=this.audio.play();t&&t.catch(function(e){console.warn(e)})},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){m.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(t){if(this.isPlaying){if(this.startTime>0){this.startTime<t-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,t-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());return}var e=this.currentMarker?this.currentMarker.start:0,l=e+this.duration,i=this.audio.currentTime;if(this.currentConfig.loop)i>=l-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,i-l),i=this.audio.currentTime):i<e&&(this.audio.currentTime+=e,i=this.audio.currentTime),i<this.previousTime&&this.emit(x.LOOPED,this);else if(i>=l){this.reset(),this.stopAndReleaseAudioTag(),this.emit(x.COMPLETE,this);return}this.previousTime=i}},destroy:function(){m.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=h(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){m.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,!this.manager.isLocked(this,"mute",t)&&(this.updateMute(),this.emit(x.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,!this.manager.isLocked(this,"volume",t)&&(this.updateVolume(),this.emit(x.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,!this.manager.isLocked(this,x.RATE,t)&&(this.calculateRate(),this.emit(x.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,!this.manager.isLocked(this,x.DETUNE,t)&&(this.calculateRate(),this.emit(x.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(x.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,!this.manager.isLocked(this,"loop",t)&&(this.audio&&(this.audio.loop=t),this.emit(x.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(x.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});E.exports=d},33684:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(85034),S=n(83419),x=n(14463),h=n(64895),d=new S({Extends:m,initialize:function(e){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,m.call(this,e)},add:function(t,e){var l=new h(this,t,e);return this.sounds.push(l),l},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(s,r){for(var o=0;o<r.length;o++)if(r[o].dataset.locked==="true")return t.locked=!0,!1;return!0}),!!this.locked){var e=!1,l=function(){e=!0},i=function(){if(e){e=!1;return}document.body.removeEventListener("touchmove",l),document.body.removeEventListener("touchend",i);var s=[];if(t.game.cache.audio.entries.each(function(o,a){for(var u=0;u<a.length;u++){var f=a[u];f.dataset.locked==="true"&&s.push(f)}return!0}),s.length!==0){var r=s[s.length-1];r.oncanplaythrough=function(){r.oncanplaythrough=null,s.forEach(function(o){o.dataset.locked="false"}),t.unlocked=!0},s.forEach(function(o){o.load()})}};this.once(x.UNLOCKED,function(){for(this.forEachActiveSound(function(r){r.currentMarker===null&&r.duration===0&&(r.duration=r.tags[0].duration),r.totalDuration=r.tags[0].duration});this.lockedActionsQueue.length;){var s=this.lockedActionsQueue.shift();s.sound[s.prop].apply?s.sound[s.prop].apply(s.sound,s.value||[]):s.sound[s.prop]=s.value}},this),document.body.addEventListener("touchmove",l,!1),document.body.addEventListener("touchend",i,!1)}},onBlur:function(){this.forEachActiveSound(function(t){t.isPlaying&&(this.onBlurPausedSounds.push(t),t.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(t){t.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){m.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(t,e,l){return t.tags[0].dataset.locked==="true"?(this.lockedActionsQueue.push({sound:t,prop:e,value:l}),!0):!1},setMute:function(t){return this.mute=t,this},mute:{get:function(){return this._mute},set:function(t){this._mute=t,this.forEachActiveSound(function(e){e.updateMute()}),this.emit(x.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this._volume},set:function(t){this._volume=t,this.forEachActiveSound(function(e){e.updateVolume()}),this.emit(x.GLOBAL_VOLUME,this,t)}}});E.exports=d},23717:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={SoundManagerCreator:n(14747),Events:n(14463),BaseSound:n(30341),BaseSoundManager:n(85034),WebAudioSound:n(71741),WebAudioSoundManager:n(57490),HTML5AudioSound:n(64895),HTML5AudioSoundManager:n(33684),NoAudioSound:n(4603),NoAudioSoundManager:n(25960)}},4603:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(30341),S=n(83419),x=n(50792),h=n(79291),d=n(29747),t=function(){return!1},e=function(){return null},l=function(){return this},i=new S({Extends:x,initialize:function(r,o,a){a===void 0&&(a={}),x.call(this),this.manager=r,this.key=o,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=h({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},a),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:t,updateMarker:t,removeMarker:e,play:t,pause:t,resume:t,stop:t,setMute:l,setVolume:l,setRate:l,setDetune:l,setSeek:l,setLoop:l,setPan:l,applyConfig:e,resetConfig:e,update:d,calculateRate:e,destroy:function(){m.prototype.destroy.call(this)}});E.exports=i},25960:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(85034),S=n(83419),x=n(50792),h=n(4603),d=n(29747),t=new S({Extends:x,initialize:function(l){x.call(this),this.game=l,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(e,l){var i=new h(this,e,l);return this.sounds.push(i),i},addAudioSprite:function(e,l){var i=this.add(e,l);return i.spritemap={},i},get:function(e){return m.prototype.get.call(this,e)},getAll:function(e){return m.prototype.getAll.call(this,e)},play:function(e,l){return!1},playAudioSprite:function(e,l,i){return!1},remove:function(e){return m.prototype.remove.call(this,e)},removeAll:function(){return m.prototype.removeAll.call(this)},removeByKey:function(e){return m.prototype.removeByKey.call(this,e)},stopByKey:function(e){return m.prototype.stopByKey.call(this,e)},onBlur:d,onFocus:d,onGameBlur:d,onGameFocus:d,pauseAll:d,resumeAll:d,stopAll:d,update:d,setRate:d,setDetune:d,setMute:d,setVolume:d,unlock:d,forEachActiveSound:function(e,l){m.prototype.forEachActiveSound.call(this,e,l)},destroy:function(){m.prototype.destroy.call(this)}});E.exports=t},71741:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(30341),S=n(83419),x=n(14463),h=n(95540),d=new S({Extends:m,initialize:function(e,l,i){if(i===void 0&&(i={}),this.audioBuffer=e.game.cache.audio.get(l),!this.audioBuffer)throw new Error('Audio key "'+l+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=e.context.createGain(),this.volumeNode=e.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),e.context.createPanner&&(this.spatialNode=e.context.createPanner(),this.volumeNode.connect(this.spatialNode)),e.context.createStereoPanner?(this.pannerNode=e.context.createStereoPanner(),e.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(e.destination)):e.context.createPanner?this.spatialNode.connect(e.destination):this.volumeNode.connect(e.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,m.call(this,e,l,i)},play:function(t,e){return m.prototype.play.call(this,t,e)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(x.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime<this.startTime||!m.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(x.PAUSE,this),!0)},resume:function(){return this.manager.context.currentTime<this.startTime||!m.prototype.resume.call(this)?!1:(this.createAndStartBufferSource(),this.emit(x.RESUME,this),!0)},stop:function(){return m.prototype.stop.call(this)?(this.stopAndRemoveBufferSource(),this.emit(x.STOP,this),!0):!1},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,l=this.manager.context.currentTime+e,i=(this.currentMarker?this.currentMarker.start:0)+t,s=this.duration-t;this.playTime=l-t,this.startTime=l,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,l),Math.max(0,i),Math.max(0,s)),this.resetConfig()},createAndStartLoopBufferSource:function(){var t=this.getLoopTime(),e=this.currentMarker?this.currentMarker.start:0,l=this.duration;this.loopTime=t,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,t),Math.max(0,e),Math.max(0,l))},createBufferSource:function(){var t=this,e=this.manager.context.createBufferSource();return e.buffer=this.audioBuffer,e.connect(this.muteNode),e.onended=function(l){var i=l.target;(i===t.source||i===t.loopSource)&&(t.currentConfig.loop?t.hasLooped=!0:t.hasEnded=!0)},e},stopAndRemoveBufferSource:function(){if(this.source){var t=this.source;this.source=null,t.stop(),t.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 t=this.currentConfig.source;if(t&&this.manager.context.createPanner){var e=this.spatialNode;e.panningModel=h(t,"panningModel","equalpower"),e.distanceModel=h(t,"distanceModel","inverse"),e.orientationX.value=h(t,"orientationX",0),e.orientationY.value=h(t,"orientationY",0),e.orientationZ.value=h(t,"orientationZ",-1),e.refDistance=h(t,"refDistance",1),e.maxDistance=h(t,"maxDistance",1e4),e.rolloffFactor=h(t,"rolloffFactor",1),e.coneInnerAngle=h(t,"coneInnerAngle",360),e.coneOuterAngle=h(t,"coneOuterAngle",0),e.coneOuterGain=h(t,"coneOuterGain",0),this.spatialSource=h(t,"follow",null),this.spatialSource||(e.positionX.value=h(t,"x",0),e.positionY.value=h(t,"y",0),e.positionZ.value=h(t,"z",0))}m.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(t){this.spatialNode&&(this.spatialNode.positionX.value=t)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(t){this.spatialNode&&(this.spatialNode.positionY.value=t)}},update:function(){if(this.isPlaying&&this.spatialSource){var t=h(this.spatialSource,"x",null),e=h(this.spatialSource,"y",null);t&&t!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=t),e&&e!==this._spatialy&&(this._spatialy=this.spatialNode.positionY.value=e)}this.hasEnded?(m.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(x.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(x.LOOPED,this))},destroy:function(){this.pendingRemove||(m.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(){m.prototype.calculateRate.call(this);var t=this.manager.context.currentTime;this.source&&typeof this.totalRate=="number"&&this.source.playbackRate.setValueAtTime(this.totalRate,t),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,t)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var t=0,e=0;e<this.rateUpdates.length;e++){var l=0;e<this.rateUpdates.length-1?l=this.rateUpdates[e+1].time:l=this.manager.context.currentTime-this.playTime,t+=(l-this.rateUpdates[e].time)*this.rateUpdates[e].rate}return t},getLoopTime:function(){for(var t=0,e=0;e<this.rateUpdates.length-1;e++)t+=(this.rateUpdates[e+1].time-this.rateUpdates[e].time)*this.rateUpdates[e].rate;var l=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+l.time+(this.duration-t)/l.rate},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.calculateRate(),this.emit(x.RATE,this,t)}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.calculateRate(),this.emit(x.DETUNE,this,t)}},setDetune:function(t){return this.detune=t,this},mute:{get:function(){return this.muteNode.gain.value===0},set:function(t){this.currentConfig.mute=t,this.muteNode.gain.setValueAtTime(t?0:1,0),this.emit(x.MUTE,this,t)}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(t){this.currentConfig.volume=t,this.volumeNode.gain.setValueAtTime(t,0),this.emit(x.VOLUME,this,t)}},setVolume:function(t){return this.volume=t,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(t){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.currentConfig.seek=t,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(x.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),t&&this.createAndStartLoopBufferSource()),this.emit(x.LOOP,this,t)}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(t){this.currentConfig.pan=t,this.pannerNode&&this.pannerNode.pan.setValueAtTime(t,this.manager.context.currentTime),this.emit(x.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});E.exports=d},57490:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(53134),S=n(85034),x=n(83419),h=n(14463),d=n(8443),t=n(71741),e=n(95540),l=new x({Extends:S,initialize:function(s){this.context=this.createAudioContext(s),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",S.call(this,s),this.locked&&(s.isBooted?this.unlock():s.events.once(d.BOOT,this.unlock,this)),s.events.on(d.VISIBLE,this.onGameVisible,this)},onGameVisible:function(){var i=this.context;window.setTimeout(function(){i&&(i.suspend(),i.resume())},100)},createAudioContext:function(i){var s=i.config.audio;if(s.context)return s.context.resume(),s.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,s){var r=new t(this,i,s);return this.sounds.push(r),r},decodeAudio:function(i,s){var r;Array.isArray(i)?r=i:r=[{key:i,data:s}];for(var o=this.game.cache.audio,a=r.length,u=0;u<r.length;u++){var f=r[u],v=f.key,c=f.data;typeof c=="string"&&(c=m(c));var g=function(T,C){o.add(T,C),this.emit(h.DECODED,T),a--,a===0&&this.emit(h.DECODED_ALL)}.bind(this,v),p=function(T,C){console.error("Error decoding audio: "+T+" - ",C?C.message:""),a--,a===0&&this.emit(h.DECODED_ALL)}.bind(this,v);this.context.decodeAudioData(c,g,p)}},setListenerPosition:function(i,s){return i===void 0&&(i=this.game.scale.width/2),s===void 0&&(s=this.game.scale.height/2),this.listenerPosition.set(i,s),this},unlock:function(){var i=this,s=document.body,r=function o(){if(i.context&&s){var a=s.removeEventListener.bind(s);i.context.resume().then(function(){a("touchstart",o),a("touchend",o),a("mousedown",o),a("mouseup",o),a("keydown",o),i.unlocked=!0},function(){a("touchstart",o),a("touchend",o),a("mousedown",o),a("mouseup",o),a("keydown",o)})}};s&&(s.addEventListener("touchstart",r,!1),s.addEventListener("touchend",r,!1),s.addEventListener("mousedown",r,!1),s.addEventListener("mouseup",r,!1),s.addEventListener("keydown",r,!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,s){var r=this.context.listener;if(r&&r.positionX!==void 0){var o=e(this.listenerPosition,"x",null),a=e(this.listenerPosition,"y",null);o&&o!==this._spatialx&&(this._spatialx=r.positionX.value=o),a&&a!==this._spatialy&&(this._spatialy=r.positionY.value=a)}S.prototype.update.call(this,i,s),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(d.VISIBLE,this.onGameVisible,this),S.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(h.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(h.GLOBAL_VOLUME,this,i)}}});E.exports=l},73162:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37105),S=n(83419),x=n(29747),h=n(19186),d=new S({initialize:function(e){this.parent=e,this.list=[],this.position=0,this.addCallback=x,this.removeCallback=x,this._sortKey=""},add:function(t,e){return e?m.Add(this.list,t):m.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,l){return l?m.AddAt(this.list,t,e):m.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(e===void 0&&(e=function(l,i){return l[t]-i[t]}),h(this.list,e),this):this},getByName:function(t){return m.GetFirst(this.list,"name",t)},getRandom:function(t,e){return m.GetRandom(this.list,t,e)},getFirst:function(t,e,l,i){return m.GetFirst(this.list,t,e,l,i)},getAll:function(t,e,l,i){return m.GetAll(this.list,t,e,l,i)},count:function(t,e){return m.CountAllMatching(this.list,t,e)},swap:function(t,e){m.Swap(this.list,t,e)},moveTo:function(t,e){return m.MoveTo(this.list,t,e)},moveAbove:function(t,e){return m.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return m.MoveBelow(this.list,t,e)},remove:function(t,e){return e?m.Remove(this.list,t):m.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?m.RemoveAt(this.list,t):m.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,l){return l?m.RemoveBetween(this.list,t,e):m.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return m.BringToTop(this.list,t)},sendToBack:function(t){return m.SendToBack(this.list,t)},moveUp:function(t){return m.MoveUp(this.list,t),t},moveDown:function(t){return m.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return m.Shuffle(this.list),this},replace:function(t,e){return m.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,l,i){return m.SetAll(this.list,t,e,l,i),this},each:function(t,e){for(var l=[null],i=2;i<arguments.length;i++)l.push(arguments[i]);for(i=0;i<this.list.length;i++)l[0]=this.list[i],t.apply(e,l)},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}}});E.exports=d},90330:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h){this.entries={},this.size=0,this.setAll(h)},setAll:function(x){if(Array.isArray(x))for(var h=0;h<x.length;h++)this.set(x[h][0],x[h][1]);return this},set:function(x,h){return this.has(x)||this.size++,this.entries[x]=h,this},get:function(x){if(this.has(x))return this.entries[x]},getArray:function(){var x=[],h=this.entries;for(var d in h)x.push(h[d]);return x},has:function(x){return this.entries.hasOwnProperty(x)},delete:function(x){return this.has(x)&&(delete this.entries[x],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(x){delete this.entries[x]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var x=[],h=this.entries;for(var d in h)x.push(h[d]);return x},dump:function(){var x=this.entries;console.group("Map");for(var h in x)console.log(h,x[h]);console.groupEnd()},each:function(x){var h=this.entries;for(var d in h)if(x(d,h[d])===!1)break;return this},contains:function(x){var h=this.entries;for(var d in h)if(h[d]===x)return!0;return!1},merge:function(x,h){h===void 0&&(h=!1);var d=this.entries,t=x.entries;for(var e in t)d.hasOwnProperty(e)&&h?d[e]=t[e]:this.set(e,t[e]);return this}});E.exports=S},25774:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50792),x=n(82348),h=new m({Extends:S,initialize:function(){S.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(d){return this._active.indexOf(d)>-1},isPending:function(d){return this._toProcess>0&&this._pending.indexOf(d)>-1},isDestroying:function(d){return this._destroy.indexOf(d)>-1},add:function(d){return this.checkQueue&&this.isActive(d)&&!this.isDestroying(d)||this.isPending(d)||(this._pending.push(d),this._toProcess++),d},remove:function(d){if(this.isPending(d)){var t=this._pending,e=t.indexOf(d);e!==-1&&t.splice(e,1)}else this.isActive(d)&&(this._destroy.push(d),this._toProcess++);return d},removeAll:function(){for(var d=this._active,t=this._destroy,e=d.length;e--;)t.push(d[e]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var d=this._destroy,t=this._active,e,l;for(e=0;e<d.length;e++){l=d[e];var i=t.indexOf(l);i!==-1&&(t.splice(i,1),this.emit(x.PROCESS_QUEUE_REMOVE,l))}for(d.length=0,d=this._pending,e=0;e<d.length;e++)l=d[e],(!this.checkQueue||this.checkQueue&&t.indexOf(l)===-1)&&(t.push(l),this.emit(x.PROCESS_QUEUE_ADD,l));return d.length=0,this._toProcess=0,t},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});E.exports=h},59542:(E,y,n)=>{/**
|
||
* @author Vladimir Agafonkin
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(43886);function S(c){if(!(this instanceof S))return new S(c);this._maxEntries=Math.max(4,c||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}S.prototype={all:function(){return this._all(this.data,[])},search:function(c){var g=this.data,p=[],T=this.toBBox;if(!u(c,g))return p;for(var C=[],M,A,R,P;g;){for(M=0,A=g.children.length;M<A;M++)R=g.children[M],P=g.leaf?T(R):R,u(c,P)&&(g.leaf?p.push(R):a(c,P)?this._all(R,p):C.push(R));g=C.pop()}return p},collides:function(c){var g=this.data,p=this.toBBox;if(!u(c,g))return!1;for(var T=[],C,M,A,R;g;){for(C=0,M=g.children.length;C<M;C++)if(A=g.children[C],R=g.leaf?p(A):A,u(c,R)){if(g.leaf||a(c,R))return!0;T.push(A)}g=T.pop()}return!1},load:function(c){if(!(c&&c.length))return this;if(c.length<this._minEntries){for(var g=0,p=c.length;g<p;g++)this.insert(c[g]);return this}var T=this._build(c.slice(),0,c.length-1,0);if(!this.data.children.length)this.data=T;else if(this.data.height===T.height)this._splitRoot(this.data,T);else{if(this.data.height<T.height){var C=this.data;this.data=T,T=C}this._insert(T,this.data.height-T.height-1,!0)}return this},insert:function(c){return c&&this._insert(c,this.data.height-1),this},clear:function(){return this.data=f([]),this},remove:function(c,g){if(!c)return this;for(var p=this.data,T=this.toBBox(c),C=[],M=[],A,R,P,L;p||C.length;){if(p||(p=C.pop(),R=C[C.length-1],A=M.pop(),L=!0),p.leaf&&(P=x(c,p.children,g),P!==-1))return p.children.splice(P,1),C.push(p),this._condense(C),this;!L&&!p.leaf&&a(p,T)?(C.push(p),M.push(A),A=0,R=p,p=p.children[0]):R?(A++,p=R.children[A],L=!1):p=null}return this},toBBox:function(c){return c},compareMinX:e,compareMinY:l,toJSON:function(){return this.data},fromJSON:function(c){return this.data=c,this},_all:function(c,g){for(var p=[];c;)c.leaf?g.push.apply(g,c.children):p.push.apply(p,c.children),c=p.pop();return g},_build:function(c,g,p,T){var C=p-g+1,M=this._maxEntries,A;if(C<=M)return A=f(c.slice(g,p+1)),h(A,this.toBBox),A;T||(T=Math.ceil(Math.log(C)/Math.log(M)),M=Math.ceil(C/Math.pow(M,T-1))),A=f([]),A.leaf=!1,A.height=T;var R=Math.ceil(C/M),P=R*Math.ceil(Math.sqrt(M)),L,F,w,O;for(v(c,g,p,P,this.compareMinX),L=g;L<=p;L+=P)for(w=Math.min(L+P-1,p),v(c,L,w,R,this.compareMinY),F=L;F<=w;F+=R)O=Math.min(F+R-1,w),A.children.push(this._build(c,F,O,T-1));return h(A,this.toBBox),A},_chooseSubtree:function(c,g,p,T){for(var C,M,A,R,P,L,F,w;T.push(g),!(g.leaf||T.length-1===p);){for(F=w=1/0,C=0,M=g.children.length;C<M;C++)A=g.children[C],P=i(A),L=r(c,A)-P,L<w?(w=L,F=P<F?P:F,R=A):L===w&&P<F&&(F=P,R=A);g=R||g.children[0]}return g},_insert:function(c,g,p){var T=this.toBBox,C=p?c:T(c),M=[],A=this._chooseSubtree(C,this.data,g,M);for(A.children.push(c),t(A,C);g>=0&&M[g].children.length>this._maxEntries;)this._split(M,g),g--;this._adjustParentBBoxes(C,M,g)},_split:function(c,g){var p=c[g],T=p.children.length,C=this._minEntries;this._chooseSplitAxis(p,C,T);var M=this._chooseSplitIndex(p,C,T),A=f(p.children.splice(M,p.children.length-M));A.height=p.height,A.leaf=p.leaf,h(p,this.toBBox),h(A,this.toBBox),g?c[g-1].children.push(A):this._splitRoot(p,A)},_splitRoot:function(c,g){this.data=f([c,g]),this.data.height=c.height+1,this.data.leaf=!1,h(this.data,this.toBBox)},_chooseSplitIndex:function(c,g,p){var T,C,M,A,R,P,L,F;for(P=L=1/0,T=g;T<=p-g;T++)C=d(c,0,T,this.toBBox),M=d(c,T,p,this.toBBox),A=o(C,M),R=i(C)+i(M),A<P?(P=A,F=T,L=R<L?R:L):A===P&&R<L&&(L=R,F=T);return F},_chooseSplitAxis:function(c,g,p){var T=c.leaf?this.compareMinX:e,C=c.leaf?this.compareMinY:l,M=this._allDistMargin(c,g,p,T),A=this._allDistMargin(c,g,p,C);M<A&&c.children.sort(T)},_allDistMargin:function(c,g,p,T){c.children.sort(T);var C=this.toBBox,M=d(c,0,g,C),A=d(c,p-g,p,C),R=s(M)+s(A),P,L;for(P=g;P<p-g;P++)L=c.children[P],t(M,c.leaf?C(L):L),R+=s(M);for(P=p-g-1;P>=g;P--)L=c.children[P],t(A,c.leaf?C(L):L),R+=s(A);return R},_adjustParentBBoxes:function(c,g,p){for(var T=p;T>=0;T--)t(g[T],c)},_condense:function(c){for(var g=c.length-1,p;g>=0;g--)c[g].children.length===0?g>0?(p=c[g-1].children,p.splice(p.indexOf(c[g]),1)):this.clear():h(c[g],this.toBBox)},compareMinX:function(c,g){return c.left-g.left},compareMinY:function(c,g){return c.top-g.top},toBBox:function(c){return{minX:c.left,minY:c.top,maxX:c.right,maxY:c.bottom}}};function x(c,g,p){if(!p)return g.indexOf(c);for(var T=0;T<g.length;T++)if(p(c,g[T]))return T;return-1}function h(c,g){d(c,0,c.children.length,g,c)}function d(c,g,p,T,C){C||(C=f(null)),C.minX=1/0,C.minY=1/0,C.maxX=-1/0,C.maxY=-1/0;for(var M=g,A;M<p;M++)A=c.children[M],t(C,c.leaf?T(A):A);return C}function t(c,g){return c.minX=Math.min(c.minX,g.minX),c.minY=Math.min(c.minY,g.minY),c.maxX=Math.max(c.maxX,g.maxX),c.maxY=Math.max(c.maxY,g.maxY),c}function e(c,g){return c.minX-g.minX}function l(c,g){return c.minY-g.minY}function i(c){return(c.maxX-c.minX)*(c.maxY-c.minY)}function s(c){return c.maxX-c.minX+(c.maxY-c.minY)}function r(c,g){return(Math.max(g.maxX,c.maxX)-Math.min(g.minX,c.minX))*(Math.max(g.maxY,c.maxY)-Math.min(g.minY,c.minY))}function o(c,g){var p=Math.max(c.minX,g.minX),T=Math.max(c.minY,g.minY),C=Math.min(c.maxX,g.maxX),M=Math.min(c.maxY,g.maxY);return Math.max(0,C-p)*Math.max(0,M-T)}function a(c,g){return c.minX<=g.minX&&c.minY<=g.minY&&g.maxX<=c.maxX&&g.maxY<=c.maxY}function u(c,g){return g.minX<=c.maxX&&g.minY<=c.maxY&&g.maxX>=c.minX&&g.maxY>=c.minY}function f(c){return{children:c,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(c,g,p,T,C){for(var M=[g,p],A;M.length;)p=M.pop(),g=M.pop(),!(p-g<=T)&&(A=g+Math.ceil((p-g)/T/2)*T,m(c,A,g,p,C),M.push(g,A,A,p))}E.exports=S},86555:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45319),S=n(83419),x=n(56583),h=n(26099),d=new S({initialize:function(e,l,i,s){e===void 0&&(e=0),l===void 0&&(l=e),i===void 0&&(i=0),s===void 0&&(s=null),this._width=e,this._height=l,this._parent=s,this.aspectMode=i,this.aspectRatio=l===0?1:e/l,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new h},setAspectMode:function(t){return t===void 0&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.minWidth=m(t,0,this.maxWidth),this.minHeight=m(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return t===void 0&&(t=Number.MAX_VALUE),e===void 0&&(e=t),this.maxWidth=m(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=m(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(t===void 0&&(t=0),e===void 0&&(e=t),this.aspectMode){case d.NONE:this._width=this.getNewWidth(x(t,this.snapTo.x)),this._height=this.getNewHeight(x(e,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case d.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(x(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case d.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(x(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case d.FIT:this.constrain(t,e,!0);break;case d.ENVELOP:this.constrain(t,e,!1);break}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(x(t,this.snapTo.x)),this._height=this.getNewHeight(x(e,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(t,e){return e===void 0&&(e=!0),t=m(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return e===void 0&&(e=!0),t=m(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,l){t===void 0&&(t=0),e===void 0&&(e=t),l===void 0&&(l=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var i=this.snapTo,s=e===0?1:t/e;return l&&this.aspectRatio>s||!l&&this.aspectRatio<s?(t=x(t,i.x),e=t/this.aspectRatio,i.y>0&&(e=x(e,i.y),t=e*this.aspectRatio)):(l&&this.aspectRatio<s||!l&&this.aspectRatio>s)&&(e=x(e,i.y),t=e*this.aspectRatio,i.x>0&&(t=x(t,i.x),e=t*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});d.NONE=0,d.WIDTH_CONTROLS_HEIGHT=1,d.HEIGHT_CONTROLS_WIDTH=2,d.FIT=3,d.ENVELOP=4,E.exports=d},15238:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="add"},56187:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="remove"},82348:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={PROCESS_QUEUE_ADD:n(15238),PROCESS_QUEUE_REMOVE:n(56187)}},41392:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Events:n(82348),List:n(73162),Map:n(90330),ProcessQueue:n(25774),RTree:n(59542),Size:n(86555)}},57382:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(45319),x=n(40987),h=n(8054),d=n(50030),t=n(79237),e=new m({Extends:t,initialize:function(i,s,r,o,a){t.call(this,i,s,r,o,a),this.add("__BASE",0,0,0,o,a),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=o,this.height=a,this.imageData=this.context.getImageData(0,0,o,a),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===h.WEBGL&&this.refresh(),this},draw:function(l,i,s,r){return r===void 0&&(r=!0),this.context.drawImage(s,l,i),r&&this.update(),this},drawFrame:function(l,i,s,r,o){s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=!0);var a=this.manager.getFrame(l,i);if(a){var u=a.canvasData,f=a.cutWidth,v=a.cutHeight,c=a.source.resolution;this.context.drawImage(a.source.image,u.x,u.y,f,v,s,r,f/c,v/c),o&&this.update()}return this},setPixel:function(l,i,s,r,o,a){a===void 0&&(a=255),l=Math.abs(Math.floor(l)),i=Math.abs(Math.floor(i));var u=this.getIndex(l,i);if(u>-1){var f=this.context.getImageData(l,i,1,1);f.data[0]=s,f.data[1]=r,f.data[2]=o,f.data[3]=a,this.context.putImageData(f,l,i)}return this},putData:function(l,i,s,r,o,a,u){return r===void 0&&(r=0),o===void 0&&(o=0),a===void 0&&(a=l.width),u===void 0&&(u=l.height),this.context.putImageData(l,i,s,r,o,a,u),this},getData:function(l,i,s,r){l=S(Math.floor(l),0,this.width-1),i=S(Math.floor(i),0,this.height-1),s=S(s,1,this.width-l),r=S(r,1,this.height-i);var o=this.context.getImageData(l,i,s,r);return o},getPixel:function(l,i,s){s||(s=new x);var r=this.getIndex(l,i);if(r>-1){var o=this.data,a=o[r+0],u=o[r+1],f=o[r+2],v=o[r+3];s.setTo(a,u,f,v)}return s},getPixels:function(l,i,s,r){l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=this.width),r===void 0&&(r=s),l=Math.abs(Math.round(l)),i=Math.abs(Math.round(i));for(var o=S(l,0,this.width),a=S(l+s,0,this.width),u=S(i,0,this.height),f=S(i+r,0,this.height),v=new x,c=[],g=u;g<f;g++){for(var p=[],T=o;T<a;T++)v=this.getPixel(T,g,v),p.push({x:T,y:g,color:v.color,alpha:v.alphaGL});c.push(p)}return c},getIndex:function(l,i){return l=Math.abs(Math.round(l)),i=Math.abs(Math.round(i)),l<this.width&&i<this.height?(l+i*this.width)*4:-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(l,i,s,r,o){return l===void 0&&(l=0),i===void 0&&(i=0),s===void 0&&(s=this.width),r===void 0&&(r=this.height),o===void 0&&(o=!0),this.context.clearRect(l,i,s,r),o&&this.update(),this},setSize:function(l,i){return i===void 0&&(i=l),(l!==this.width||i!==this.height)&&(this.canvas.width=l,this.canvas.height=i,this._source.width=l,this._source.height=i,this._source.isPowerOf2=d(l,i),this.frames.__BASE.setSize(l,i,0,0),this.width=l,this.height=i,this.refresh()),this},destroy:function(){t.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}});E.exports=e},81320:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(10312),S=n(38058),x=n(27919),h=n(83419),d=n(8054),t=n(87774),e=n(4327),l=n(95540),i=n(79237),s=n(70554),r=n(42538),o=n(61340),a=new h({Extends:i,initialize:function(f,v,c,g,p){c===void 0&&(c=256),g===void 0&&(g=256),p===void 0&&(p=!0),this.type="DynamicTexture";var T=f.game.renderer,C=T&&T.type===d.CANVAS,M=C?x.create2D(this,c,g):[this];if(i.call(this,f,v,M,c,g),this.add("__BASE",0,0,0,c,g),this.renderer=T,this.width=-1,this.height=-1,this.commandBuffer=[],this.canvas=C?M:null,this.context=C?M.getContext("2d",{willReadFrequently:!0}):null,this.camera=new S(0,0,c,g).setScene(f.game.scene.systemScene,!1),this.drawingContext=C?null:new t(T,{width:c,height:g,camera:this.camera,autoClear:!1}),!C){var A=this.get();A.source.glTexture=this.drawingContext.texture}this.setSize(c,g,p)},setSize:function(u,f,v){f===void 0&&(f=u),v===void 0&&(v=!0),v&&(u=Math.floor(u),f=Math.floor(f),u%2!==0&&u++,f%2!==0&&f++);var c=this.get(),g=c.source;if(u!==this.width||f!==this.height){this.canvas&&(this.canvas.width=u,this.canvas.height=f);var p=this.drawingContext;p&&(p.width!==u||p.height!==f)&&p.resize(u,f),this.camera.setSize(u,f),g.width=u,g.height=f,c.setSize(u,f),this.width=u,this.height=f}else{var T=this.getSourceImage();c.cutX+u>T.width&&(u=T.width-c.cutX),c.cutY+f>T.height&&(f=T.height-c.cutY),c.setSize(u,f,c.cutX,c.cutY)}return this},render:function(){if(this.commandBuffer.length!==0)return this.camera.preRender(),this.renderer.type===d.WEBGL&&this._renderWebGL(),this.renderer.type===d.CANVAS&&this._renderCanvas(),this},_renderWebGL:function(){this.renderer.renderNodes.getNode("DynamicTextureHandler").run(this)},_renderCanvas:function(){var u=this.camera,f=this.context,v=this.renderer,c=this.manager;v.setContext(f);for(var g,p,T,C,M,A,R,P,L,F,w,O,B,I,D,N=this.commandBuffer,z=N.length,V=!1,U=!1,G=0;G<z;G++){var b=N[G];switch(b){case r.CLEAR:{I=N[++G],D=N[++G],B=N[++G],M=N[++G],I!==void 0&&D!==void 0&&B!==void 0&&M!==void 0?f.clearRect(I,D,B,M):(f.save(),f.setTransform(1,0,0,1,0,0),f.clearRect(0,0,this.width,this.height),f.restore());break}case r.FILL:{var Y=N[++G];I=N[++G],D=N[++G],B=N[++G],M=N[++G],g=(Y>>24&255)/255;var W=Y>>16&255,H=Y>>8&255,X=Y&255;f.save(),f.globalCompositeOperation="source-over",f.fillStyle="rgba("+W+","+H+","+X+","+g+")",f.fillRect(I,D,B,M),f.restore();break}case r.STAMP:{A=N[++G],C=N[++G],I=N[++G],D=N[++G],g=N[++G],O=N[++G],L=N[++G],F=N[++G],w=N[++G],R=N[++G],P=N[++G],p=N[++G],U&&(p=m.ERASE);var K=c.resetStamp(g,O);K.setPosition(I,D).setRotation(L).setScale(F,w).setTexture(A,C).setOrigin(R,P).setBlendMode(p),K.renderCanvas(v,K,u,null);break}case r.REPEAT:{A=N[++G],C=N[++G],I=N[++G],D=N[++G],g=N[++G],O=N[++G],L=N[++G],F=N[++G],w=N[++G],R=N[++G],P=N[++G],p=N[++G],B=N[++G],M=N[++G];var Z=N[++G],Q=N[++G],j=N[++G],J=N[++G],tt=N[++G];U&&(p=m.ERASE);var k=c.resetTileSprite(g,O);k.setPosition(I,D).setRotation(L).setScale(F,w).setTexture(A,C).setSize(B,M).setOrigin(R,P).setBlendMode(p).setTilePosition(Z,Q).setTileRotation(j).setTileScale(J,tt),k.renderCanvas(v,k,u,null);break}case r.DRAW:{var q=N[++G];if(I=N[++G],D=N[++G],I!==void 0){var _=q.x;q.x=I}if(D!==void 0){var rt=q.y;q.y=D}U&&(T=q.blendMode,q.blendMode=m.ERASE),q.renderCanvas(v,q,u,null),I!==void 0&&(q.x=_),D!==void 0&&(q.y=rt),U&&(q.blendMode=T);break}case r.SET_ERASE:{U=!!N[++G];break}case r.PRESERVE:{V=N[++G];break}case r.CALLBACK:{var at=N[++G];at();break}case r.CAPTURE:{q=N[++G];var ht=N[++G],ot=this.startCapture(q,ht);q.renderCanvas(v,q,ht.camera||u,ot.transform),this.finishCapture(q,ot);break}}}V||(N.length=0),v.setContext()},fill:function(u,f,v,c,g,p){f===void 0&&(f=1),v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=this.width),p===void 0&&(p=this.height);var T=u>>16&255,C=u>>8&255,M=u&255,A=s.getTintFromFloats(T/255,C/255,M/255,f);return this.commandBuffer.push(r.FILL,A,v,c,g,p),this},clear:function(u,f,v,c){return u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=this.width),c===void 0&&(c=this.height),this.commandBuffer.push(r.CLEAR,u,f,v,c),this},stamp:function(u,f,v,c,g){v===void 0&&(v=0),c===void 0&&(c=0);var p=l(g,"alpha",1),T=l(g,"tint",16777215),C=l(g,"angle",0),M=l(g,"rotation",0),A=l(g,"scale",1),R=l(g,"scaleX",A),P=l(g,"scaleY",A),L=l(g,"originX",.5),F=l(g,"originY",.5),w=l(g,"blendMode",0);return C!==0&&(M=C*Math.PI/180),this.commandBuffer.push(r.STAMP,u,f,v,c,p,T,M,R,P,L,F,w),this},erase:function(u,f,v,c,g){var p=this.commandBuffer,T=p.length;return p[T-2]===r.SET_ERASE&&!p[T-1]?p.length-=2:p.push(r.SET_ERASE,!0),this.draw(u,f,v,c,g),p.push(r.SET_ERASE,!1),this},draw:function(u,f,v,c,g){Array.isArray(u)||(u=[u]);for(var p=u.length,T=0;T<p;T++){var C=u[T];if(!(!C||C===this))if(C.renderWebGL||C.renderCanvas)this.commandBuffer.push(r.DRAW,C,f,v);else if(C.isParent||C.list)for(var M=C.getChildren(),A=0;A<M.length;A++){var R=M[A];R.willRender(this.camera)&&this.draw(R,f,v)}else typeof C=="string"?this.stamp(C,null,f,v,{alpha:c,tint:g}):C instanceof e?this.stamp(C.texture.key,C,f,v,{alpha:c,tint:g}):Array.isArray(C)&&this.draw(C,f,v,c,g)}return this},capture:function(u,f){return f||(f={}),this.commandBuffer.push(r.CAPTURE,u,f),this},startCapture:function(u,f){var v={},c=void 0;return f.transform instanceof o?c=f.transform:f.transform==="world"&&u.parentContainer&&(c=u.parentContainer.getWorldTransformMatrix()),c&&(v.transform=c),f.camera&&(c||(c=new o),f.camera.matrixExternal.multiply(c,c)),f.x!==void 0&&(v.x=u.x,u.x=f.x),f.y!==void 0&&(v.y=u.y,u.y=f.y),f.rotation!==void 0?(v.rotation=u.rotation,u.rotation=f.rotation):f.angle!==void 0&&(v.rotation=u.rotation,u.angle=f.angle),f.scaleX!==void 0&&(v.scaleX=u.scaleX,u.scaleX=f.scaleX),f.scaleY!==void 0&&(v.scaleY=u.scaleY,u.scaleY=f.scaleY),f.originX!==void 0&&(v.originX=u.originX,u.originX=f.originX),f.originY!==void 0&&(v.originY=u.originY,u.originY=f.originY),f.alpha!==void 0&&(v.alpha=u.alpha,u.alpha=f.alpha),f.tint!==void 0&&(v.tint=u.tint,u.tint=f.tint),f.blendMode!==void 0&&(v.blendMode=u.blendMode,u.blendMode=f.blendMode),v},finishCapture:function(u,f){f.x!==void 0&&(u.x=f.x),f.y!==void 0&&(u.y=f.y),f.rotation!==void 0&&(u.rotation=f.rotation),f.scaleX!==void 0&&(u.scaleX=f.scaleX),f.scaleY!==void 0&&(u.scaleY=f.scaleY),f.originX!==void 0&&(u.originX=f.originX),f.originY!==void 0&&(u.originY=f.originY),f.alpha!==void 0&&(u.alpha=f.alpha),f.tint!==void 0&&(u.tint=f.tint),f.blendMode!==void 0&&(u.blendMode=f.blendMode)},repeat:function(u,f,v,c,g,p,T){v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=this.width),p===void 0&&(p=this.height);var C=l(T,"alpha",1),M=l(T,"tint",16777215),A=l(T,"angle",0),R=l(T,"rotation",0),P=l(T,"scale",1),L=l(T,"scaleX",P),F=l(T,"scaleY",P),w=l(T,"originX",0),O=l(T,"originY",0),B=l(T,"blendMode",0);A!==0&&(R=A*Math.PI/180);var I=l(T,"tilePositionX",0),D=l(T,"tilePositionY",0),N=l(T,"tileRotation",0),z=l(T,"tileScaleX",1),V=l(T,"tileScaleY",1);return this.commandBuffer.push(r.REPEAT,u,f,v,c,C,M,R,L,F,w,O,B,g,p,I,D,N,z,V),this},preserve:function(u){return this.commandBuffer.push(r.PRESERVE,u),this},callback:function(u){return this.commandBuffer.push(r.CALLBACK,u),this},snapshotArea:function(u,f,v,c,g,p,T){return this.drawingContext?this.renderer.snapshotFramebuffer(this.drawingContext.framebuffer,this.width,this.height,g,!1,u,f,v,c,p,T):this.renderer.snapshotCanvas(this.canvas,g,!1,u,f,v,c,p,T),this},snapshot:function(u,f,v){return this.snapshotArea(0,0,this.width,this.height,u,f,v)},snapshotPixel:function(u,f,v){return this.snapshotArea(u,f,1,1,v,"pixel")},getWebGLTexture:function(){if(this.drawingContext)return this.drawingContext.texture},renderWebGL:function(u,f,v,c){var g=this.manager.resetStamp();g.setTexture(this),g.setOrigin(0),g.renderWebGLStep(u,g,v,c)},renderCanvas:function(){},destroy:function(){var u=this.manager.stamp;u&&u.texture===this&&this.manager.resetStamp(),i.prototype.destroy.call(this),x.remove(this.canvas),this.drawingContext&&this.drawingContext.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});E.exports=a},42538:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CLEAR:0,FILL:1,STAMP:2,REPEAT:3,DRAW:4,SET_ERASE:5,PRESERVE:6,CALLBACK:7,CAPTURE:8}},4327:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(45319),x=n(79291),h=new m({initialize:function(t,e,l,i,s,r,o){this.texture=t,this.name=e,this.source=t.source[l],this.sourceIndex=l,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(r,o,i,s)},setCutPosition:function(d,t){return d===void 0&&(d=0),t===void 0&&(t=0),this.cutX=d,this.cutY=t,this.updateUVs()},setCutSize:function(d,t){return this.cutWidth=d,this.cutHeight=t,this.updateUVs()},setSize:function(d,t,e,l){e===void 0&&(e=0),l===void 0&&(l=0),this.setCutPosition(e,l),this.setCutSize(d,t),this.width=d,this.height=t,this.halfWidth=Math.floor(d*.5),this.halfHeight=Math.floor(t*.5),this.centerX=Math.floor(d/2),this.centerY=Math.floor(t/2);var i=this.data,s=i.cut;s.x=e,s.y=l,s.w=d,s.h=t,s.r=e+d,s.b=l+t,i.sourceSize.w=d,i.sourceSize.h=t,i.spriteSourceSize.w=d,i.spriteSourceSize.h=t,i.radius=.5*Math.sqrt(d*d+t*t);var r=i.drawImage;return r.x=e,r.y=l,r.width=d,r.height=t,this.updateUVs()},setTrim:function(d,t,e,l,i,s){var r=this.data,o=r.spriteSourceSize;return r.trim=!0,r.sourceSize.w=d,r.sourceSize.h=t,o.x=e,o.y=l,o.w=i,o.h=s,o.r=e+i,o.b=l+s,this.x=e,this.y=l,this.width=i,this.height=s,this.halfWidth=i*.5,this.halfHeight=s*.5,this.centerX=Math.floor(i/2),this.centerY=Math.floor(s/2),this.updateUVs()},setScale9:function(d,t,e,l){var i=this.data;return i.scale9=!0,i.is3Slice=t===0&&l===this.height,i.scale9Borders.x=d,i.scale9Borders.y=t,i.scale9Borders.w=e,i.scale9Borders.h=l,this},setCropUVs:function(d,t,e,l,i,s,r){var o=this.cutX,a=this.cutY,u=this.cutWidth,f=this.cutHeight,v=this.realWidth,c=this.realHeight;t=S(t,0,v),e=S(e,0,c),l=S(l,0,v-t),i=S(i,0,c-e);var g=o+t,p=a+e,T=l,C=i,M=this.data;if(M.trim){var A=M.spriteSourceSize;l=S(l,0,A.x+u-t),i=S(i,0,A.y+f-e);var R=t+l,P=e+i,L=!(A.r<t||A.b<e||A.x>R||A.y>P);if(L){var F=Math.max(A.x,t),w=Math.max(A.y,e),O=Math.min(A.r,R)-F,B=Math.min(A.b,P)-w;T=O,C=B,s?g=o+(u-(F-A.x)-O):g=o+(F-A.x),r?p=a+(f-(w-A.y)-B):p=a+(w-A.y),t=F,e=w,l=O,i=B}else g=0,p=0,T=0,C=0}else s&&(g=o+(u-t-l)),r&&(p=a+(f-e-i));var I=this.source.width,D=this.source.height;return d.u0=Math.max(0,g/I),d.v0=1-Math.max(0,p/D),d.u1=Math.min(1,(g+T)/I),d.v1=1-Math.min(1,(p+C)/D),d.x=t,d.y=e,d.cx=g,d.cy=p,d.cw=T,d.ch=C,d.width=l,d.height=i,d.flipX=s,d.flipY=r,d},updateCropUVs:function(d,t,e){return this.setCropUVs(d,d.x,d.y,d.width,d.height,t,e)},setUVs:function(d,t,e,l,i,s){var r=this.data.drawImage;return r.width=d,r.height=t,this.u0=e,this.v0=l,this.u1=i,this.v1=s,this},updateUVs:function(){var d=this.cutX,t=this.cutY,e=this.cutWidth,l=this.cutHeight,i=this.data.drawImage;i.width=e,i.height=l;var s=this.source.width,r=this.source.height;return this.u0=d/s,this.v0=1-t/r,this.u1=(d+e)/s,this.v1=1-(t+l)/r,this},updateUVsInverted:function(){var d=this.source.width,t=this.source.height;return this.u0=(this.cutX+this.cutHeight)/d,this.v0=1-this.cutY/t,this.u1=this.cutX/d,this.v1=1-(this.cutY+this.cutWidth)/t,this},clone:function(){var d=new h(this.texture,this.name,this.sourceIndex);return d.cutX=this.cutX,d.cutY=this.cutY,d.cutWidth=this.cutWidth,d.cutHeight=this.cutHeight,d.x=this.x,d.y=this.y,d.width=this.width,d.height=this.height,d.halfWidth=this.halfWidth,d.halfHeight=this.halfHeight,d.centerX=this.centerX,d.centerY=this.centerY,d.rotated=this.rotated,d.data=x(!0,d.data,this.data),d.updateUVs(),d},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}}});E.exports=h},79237:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(4327),x=n(11876),h='Texture "%s" has no frame "%s"',d=new m({initialize:function(e,l,i,s,r){Array.isArray(i)||(i=[i]),this.manager=e,this.key=l,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0,this.smoothPixelArt=null;for(var o=0;o<i.length;o++)this.source.push(new x(this,i[o],s,r))},add:function(t,e,l,i,s,r){if(this.has(t))return null;var o=new S(this,t,e,l,i,s,r);return this.frames[t]=o,this.firstFrame==="__BASE"&&(this.firstFrame=t),this.frameTotal++,o},remove:function(t){if(this.has(t)){var e=this.get(t);return e.destroy(),delete this.frames[t],!0}return!1},has:function(t){return this.frames.hasOwnProperty(t)},get:function(t){t||(t=this.firstFrame);var e=this.frames[t];return e||(console.warn(h,this.key,t),e=this.frames[this.firstFrame]),e},getTextureSourceIndex:function(t){for(var e=0;e<this.source.length;e++)if(this.source[e]===t)return e;return-1},getFramesFromTextureSource:function(t,e){e===void 0&&(e=!1);var l=[];for(var i in this.frames)if(!(i==="__BASE"&&!e)){var s=this.frames[i];s.sourceIndex===t&&l.push(s)}return l},getFrameBounds:function(t){t===void 0&&(t=0);for(var e=this.getFramesFromTextureSource(t,!0),l=e[0],i=l.cutX,s=l.cutY,r=l.cutX+l.cutWidth,o=l.cutY+l.cutHeight,a=1;a<e.length;a++){var u=e[a];u.cutX<i&&(i=u.cutX),u.cutY<s&&(s=u.cutY),u.cutX+u.cutWidth>r&&(r=u.cutX+u.cutWidth),u.cutY+u.cutHeight>o&&(o=u.cutY+u.cutHeight)}return{x:i,y:s,width:r-i,height:o-s}},getFrameNames:function(t){t===void 0&&(t=!1);var e=Object.keys(this.frames);if(!t){var l=e.indexOf("__BASE");l!==-1&&e.splice(l,1)}return e},getSourceImage:function(t){(t==null||this.frameTotal===1)&&(t="__BASE");var e=this.frames[t];return e?e.source.image:(console.warn(h,this.key,t),this.frames.__BASE.source.image)},getDataSourceImage:function(t){(t==null||this.frameTotal===1)&&(t="__BASE");var e=this.frames[t],l;return e?l=e.sourceIndex:(console.warn(h,this.key,t),l=this.frames.__BASE.sourceIndex),this.dataSource[l].image},setDataSource:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var l=this.source[e];this.dataSource.push(new x(this,t[e],l.width,l.height))}},setFilter:function(t){var e;for(e=0;e<this.source.length;e++)this.source[e].setFilter(t);for(e=0;e<this.dataSource.length;e++)this.dataSource[e].setFilter(t)},setSmoothPixelArt:function(t){this.smoothPixelArt=t,t&&this.setFilter(Phaser.Textures.FilterMode.LINEAR)},setWrap:function(t,e){e===void 0&&(e=t);for(var l=0;l<this.source.length;l++)this.source[l].setWrap(t,e);for(l=0;l<this.dataSource.length;l++)this.dataSource[l].setWrap(t,e)},destroy:function(){var t,e=this.source,l=this.dataSource;for(t=0;t<e.length;t++)e[t]&&e[t].destroy();for(t=0;t<l.length;t++)l[t]&&l[t].destroy();for(var i in this.frames){var s=this.frames[i];s&&s.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}});E.exports=d},17130:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(27919),S=n(57382),x=n(83419),h=n(40987),d=n(8054),t=n(81320),e=n(50792),l=n(69442),i=n(4327),s=n(8443),r=n(35154),o=n(88571),a=n(41212),u=n(61309),f=n(87841),v=n(79237),c=n(20839),g=new x({Extends:e,initialize:function(T){e.call(this),this.game=T,this.name="TextureManager",this.list={},this._tempCanvas=m.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new f,this.tileSprite,this.silentWarnings=!1,T.events.once(s.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(l.LOAD,this.updatePending,this),this.on(l.ERROR,this.updatePending,this);var p=this.game.config;p.defaultImage!==null&&this.addBase64("__DEFAULT",p.defaultImage),p.missingImage!==null&&this.addBase64("__MISSING",p.missingImage),p.whiteImage!==null&&this.addBase64("__WHITE",p.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(s.DESTROY,this.destroy,this),this.game.events.once(s.SYSTEM_READY,function(T){this.stamp=new o(T).setOrigin(0),this.tileSprite=new c(T,0,0,256,256,"__WHITE").setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(l.LOAD),this.off(l.ERROR),this.emit(l.READY))},checkKey:function(p){return!p||typeof p!="string"||this.exists(p)?(this.silentWarnings||console.error("Texture key already in use: "+p),!1):!0},remove:function(p){if(typeof p=="string")if(this.exists(p))p=this.get(p);else return this.silentWarnings||console.warn("No texture found matching key: "+p),this;var T=p.key;return this.list.hasOwnProperty(T)&&(p.destroy(),this.emit(l.REMOVE,T),this.emit(l.REMOVE_KEY+T)),this},removeKey:function(p){return this.list.hasOwnProperty(p)&&delete this.list[p],this},addBase64:function(p,T){if(this.checkKey(p)){var C=this,M=new Image;M.onerror=function(){C.emit(l.ERROR,p)},M.onload=function(){var A=C.create(p,M);A&&(u.Image(A,0),C.emit(l.ADD,p,A),C.emit(l.ADD_KEY+p,A),C.emit(l.LOAD,p,A))},M.src=T}return this},getBase64:function(p,T,C,M){C===void 0&&(C="image/png"),M===void 0&&(M=.92);var A="",R=this.getFrame(p,T);if(R&&(R.source.isRenderTexture||R.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(R){var P=R.canvasData,L=m.create2D(this,P.width,P.height),F=L.getContext("2d",{willReadFrequently:!0});P.width>0&&P.height>0&&F.drawImage(R.source.image,P.x,P.y,P.width,P.height,0,0,P.width,P.height),A=L.toDataURL(C,M),m.remove(L)}return A},addImage:function(p,T,C){var M=null;return this.checkKey(p)&&(M=this.create(p,T),u.Image(M,0),C&&M.setDataSource(C),this.emit(l.ADD,p,M),this.emit(l.ADD_KEY+p,M)),M},addGLTexture:function(p,T){var C=null;if(this.checkKey(p)){var M=T.width,A=T.height;C=this.create(p,T,M,A),C.add("__BASE",0,0,0,M,A),this.emit(l.ADD,p,C),this.emit(l.ADD_KEY+p,C)}return C},addCompressedTexture:function(p,T,C){var M=null;if(this.checkKey(p)){if(M=this.create(p,T),M.add("__BASE",0,0,0,T.width,T.height),C){var A=function(P,L,F){Array.isArray(F.textures)||Array.isArray(F.frames)?u.JSONArray(P,L,F):u.JSONHash(P,L,F)};if(Array.isArray(C))for(var R=0;R<C.length;R++)A(M,R,C[R]);else A(M,0,C)}this.emit(l.ADD,p,M),this.emit(l.ADD_KEY+p,M)}return M},addRenderTexture:function(p,T){var C=null;return this.checkKey(p)&&(C=this.create(p,T),C.add("__BASE",0,0,0,T.width,T.height),this.emit(l.ADD,p,C),this.emit(l.ADD_KEY+p,C)),C},createCanvas:function(p,T,C){if(T===void 0&&(T=256),C===void 0&&(C=256),this.checkKey(p)){var M=m.create(this,T,C,d.CANVAS,!0);return this.addCanvas(p,M)}return null},addCanvas:function(p,T,C){C===void 0&&(C=!1);var M=null;return C?M=new S(this,p,T,T.width,T.height):this.checkKey(p)&&(M=new S(this,p,T,T.width,T.height),this.list[p]=M,this.emit(l.ADD,p,M),this.emit(l.ADD_KEY+p,M)),M},addDynamicTexture:function(p,T,C,M){var A=null;return typeof p=="string"&&!this.exists(p)?(M===void 0&&(M=!0),A=new t(this,p,T,C,M)):(A=p,p=A.key),this.checkKey(p)?(this.list[p]=A,this.emit(l.ADD,p,A),this.emit(l.ADD_KEY+p,A)):A=null,A},addAtlas:function(p,T,C,M){return Array.isArray(C.textures)||Array.isArray(C.frames)?this.addAtlasJSONArray(p,T,C,M):this.addAtlasJSONHash(p,T,C,M)},addAtlasJSONArray:function(p,T,C,M){var A=null;if(T instanceof v?(p=T.key,A=T):this.checkKey(p)&&(A=this.create(p,T)),A){if(Array.isArray(C))for(var R=C.length===1,P=0;P<A.source.length;P++){var L=R?C[0]:C[P];u.JSONArray(A,P,L)}else u.JSONArray(A,0,C);M&&A.setDataSource(M),this.emit(l.ADD,p,A),this.emit(l.ADD_KEY+p,A)}return A},addAtlasJSONHash:function(p,T,C,M){var A=null;if(T instanceof v?(p=T.key,A=T):this.checkKey(p)&&(A=this.create(p,T)),A){if(Array.isArray(C))for(var R=0;R<C.length;R++)u.JSONHash(A,R,C[R]);else u.JSONHash(A,0,C);M&&A.setDataSource(M),this.emit(l.ADD,p,A),this.emit(l.ADD_KEY+p,A)}return A},addAtlasXML:function(p,T,C,M){var A=null;return T instanceof v?(p=T.key,A=T):this.checkKey(p)&&(A=this.create(p,T)),A&&(u.AtlasXML(A,0,C),M&&A.setDataSource(M),this.emit(l.ADD,p,A),this.emit(l.ADD_KEY+p,A)),A},addUnityAtlas:function(p,T,C,M){var A=null;return T instanceof v?(p=T.key,A=T):this.checkKey(p)&&(A=this.create(p,T)),A&&(u.UnityYAML(A,0,C),M&&A.setDataSource(M),this.emit(l.ADD,p,A),this.emit(l.ADD_KEY+p,A)),A},addSpriteSheet:function(p,T,C,M){var A=null;if(T instanceof v?(p=T.key,A=T):this.checkKey(p)&&(A=this.create(p,T)),A){var R=A.source[0].width,P=A.source[0].height;u.SpriteSheet(A,0,0,0,R,P,C),M&&A.setDataSource(M),this.emit(l.ADD,p,A),this.emit(l.ADD_KEY+p,A)}return A},addSpriteSheetFromAtlas:function(p,T){if(!this.checkKey(p))return null;var C=r(T,"atlas",null),M=r(T,"frame",null);if(!(!C||!M)){var A=this.get(C),R=A.get(M);if(R){var P=R.source.image;P||(P=R.source.glTexture);var L=this.create(p,P);return R.trimmed?u.SpriteSheetFromAtlas(L,R,T):u.SpriteSheet(L,0,R.cutX,R.cutY,R.cutWidth,R.cutHeight,T),this.emit(l.ADD,p,L),this.emit(l.ADD_KEY+p,L),L}}},addUint8Array:function(p,T,C,M){if(!this.checkKey(p)||T.length/4!==C*M)return null;var A=this.create(p,T,C,M);return A.add("__BASE",0,0,0,C,M),this.emit(l.ADD,p,A),this.emit(l.ADD_KEY+p,A),A},create:function(p,T,C,M){var A=null;return this.checkKey(p)&&(A=new v(this,p,T,C,M),this.list[p]=A),A},exists:function(p){return this.list.hasOwnProperty(p)},get:function(p){return p===void 0&&(p="__DEFAULT"),this.list[p]?this.list[p]:p instanceof v?p:p instanceof i?p.texture:this.list.__MISSING},cloneFrame:function(p,T){if(this.list[p])return this.list[p].get(T).clone()},getFrame:function(p,T){if(this.list[p])return this.list[p].get(T)},parseFrame:function(p){if(p){if(typeof p=="string")return this.getFrame(p);if(Array.isArray(p)&&p.length===2)return this.getFrame(p[0],p[1]);if(a(p))return this.getFrame(p.key,p.frame);if(p instanceof v)return p.get();if(p instanceof i)return p}else return},getTextureKeys:function(){var p=[];for(var T in this.list)T!=="__DEFAULT"&&T!=="__MISSING"&&T!=="__WHITE"&&T!=="__NORMAL"&&p.push(T);return p},getPixel:function(p,T,C,M){var A=this.getFrame(C,M);if(A){var R=A.source,P=R.image;if(!(R.isCanvas||R.isVideo||P instanceof HTMLImageElement))return console.warn("TextureManager.getPixelAlpha: The texture source must be Image, Canvas, or Video"),null;p-=A.x,T-=A.y;var L=A.data.cut;if(p+=L.x,T+=L.y,p>=L.x&&p<L.r&&T>=L.y&&T<L.b){var F=this._tempContext;F.clearRect(0,0,1,1),F.drawImage(P,p,T,1,1,0,0,1,1);var w=F.getImageData(0,0,1,1);return new h(w.data[0],w.data[1],w.data[2],w.data[3])}}return null},getPixelAlpha:function(p,T,C,M){var A=this.getFrame(C,M);if(A){var R=A.source,P=R.image;if(!(R.isCanvas||R.isVideo||P instanceof HTMLImageElement))return console.warn("TextureManager.getPixelAlpha: The texture source must be Image, Canvas, or Video"),null;p-=A.x,T-=A.y;var L=A.data.cut;if(p+=L.x,T+=L.y,p>=L.x&&p<L.r&&T>=L.y&&T<L.b){var F=this._tempContext;F.clearRect(0,0,1,1),F.drawImage(P,p,T,1,1,0,0,1,1);var w=F.getImageData(0,0,1,1);return w.data[3]}}return null},setTexture:function(p,T,C){return this.list[T]&&(p.texture=this.list[T],p.frame=p.texture.get(C)),p},renameTexture:function(p,T){var C=this.get(p);return C&&p!==T?(C.key=T,this.list[T]=C,delete this.list[p],!0):!1},each:function(p,T){for(var C=[null],M=1;M<arguments.length;M++)C.push(arguments[M]);for(var A in this.list)C[0]=this.list[A],p.apply(T,C)},resetStamp:function(p,T){p===void 0&&(p=1),T===void 0&&(T=16777215);var C=this.stamp;return C.setCrop(),C.setPosition(0),C.setAngle(0),C.setScale(1),C.setAlpha(p),C.setTint(T),C.setTexture("__WHITE"),C},resetTileSprite:function(p,T){p===void 0&&(p=1),T===void 0&&(T=16777215);var C=this.tileSprite;return C.setPosition(0),C.setAngle(0),C.setScale(1),C.setAlpha(p),C.setTint(T),C.setTexture("__WHITE"),C},destroy:function(){for(var p in this.list)this.list[p].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,m.remove(this._tempCanvas)}});E.exports=g},11876:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(27919),S=n(83419),x=n(50030),h=n(29795),d=n(82751),t=new S({initialize:function(l,i,s,r,o){o===void 0&&(o=!0);var a=l.manager.game;this.renderer=a.renderer,this.texture=l,this.source=i,this.image=i.compressed?null:i,this.compressionAlgorithm=i.compressed?i.format:null,this.resolution=1,this.width=s||i.naturalWidth||i.videoWidth||i.width||0,this.height=r||i.naturalHeight||i.videoHeight||i.height||0,this.scaleMode=h.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 d,this.isPowerOf2=x(this.width,this.height),this.glTexture=null,this.flipY=o,this.init(a)},init:function(e){var l=this.renderer;if(l){var i=this.source;if(l.gl){var s=this.image,r=this.flipY,o=this.width,a=this.height,u=this.scaleMode;this.isCanvas?this.glTexture=l.createCanvasTexture(s,!1,r):this.isVideo?this.glTexture=l.createVideoTexture(s,!1,r):this.isRenderTexture?this.glTexture=l.createTextureFromSource(null,o,a,u,void 0,r):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=l.createTextureFromSource(i,void 0,void 0,u,void 0,r):i instanceof Uint8Array?this.glTexture=l.createUint8ArrayTexture(i,o,a,u,void 0,r):this.glTexture=l.createTextureFromSource(s,o,a,u,void 0,r)}else this.isRenderTexture&&(this.image=i.canvas)}e.config.antialias||this.setFilter(1)},setFilter:function(e){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,e),this.scaleMode=e},setFlipY:function(e){return e===void 0&&(e=!0),e===this.flipY?this:(this.flipY=e,this.update(),this)},setWrap:function(e,l){return this.renderer&&this.renderer.gl&&this.renderer.setTextureWrap(this.glTexture,e,l),this},update:function(){var e=this.renderer,l=this.image,i=this.flipY,s=e.gl;if(s){var r=this.glTexture;this.isCanvas?e.updateCanvasTexture(l,r,i):this.isVideo?e.updateVideoTexture(l,r,i):r.update(l,this.width,this.height,i,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format)}},updateSize:function(e,l){this.width===e&&this.height===l||(this.width=e,this.height=l,this.isPowerOf2=x(e,l))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&m.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});E.exports=t},43378:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={CLAMP_TO_EDGE:33071,REPEAT:10497,MIRRORED_REPEAT:33648};E.exports=y},19673:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={LINEAR:0,NEAREST:1};E.exports=y},44538:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="addtexture"},63486:E=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="addtexture-"},94851:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="onerror"},29099:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="onload"},8678:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="ready"},86415:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="removetexture"},30879:E=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="removetexture-"},69442:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ADD:n(44538),ADD_KEY:n(63486),ERROR:n(94851),LOAD:n(29099),READY:n(8678),REMOVE:n(86415),REMOVE_KEY:n(30879)}},27458:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(79291),S=n(19673),x=n(43378),h={CanvasTexture:n(57382),DynamicTexture:n(81320),Events:n(69442),FilterMode:S,Frame:n(4327),Parsers:n(61309),Texture:n(79237),TextureManager:n(17130),TextureSource:n(11876),WrapMode:x};h=m(!1,h,S),h=m(!1,h,x),E.exports=h},89905:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(!S.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var x=n.source[m];n.add("__BASE",m,0,0,x.width,x.height);for(var h=S.getElementsByTagName("SubTexture"),d,t=0;t<h.length;t++){var e=h[t].attributes,l=e.name.value,i=parseInt(e.x.value,10),s=parseInt(e.y.value,10),r=parseInt(e.width.value,10),o=parseInt(e.height.value,10);if(d=n.add(l,m,i,s,r,o),e.frameX){var a=Math.abs(parseInt(e.frameX.value,10)),u=Math.abs(parseInt(e.frameY.value,10)),f=parseInt(e.frameWidth.value,10),v=parseInt(e.frameHeight.value,10);d.setTrim(r,o,a,u,f,v)}}return n};E.exports=y},72893:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.source[m];return n.add("__BASE",m,0,0,S.width,S.height),n};E.exports=y},4832:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.source[m];return n.add("__BASE",m,0,0,S.width,S.height),n};E.exports=y},78566:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(41786),S=function(x,h,d){if(!d.frames&&!d.textures){console.warn("Invalid Texture Atlas JSON Array");return}var t=x.source[h];x.add("__BASE",h,0,0,t.width,t.height);for(var e=Array.isArray(d.textures)?d.textures[h].frames:d.frames,l,i=0;i<e.length;i++){var s=e[i];if(l=x.add(s.filename,h,s.frame.x,s.frame.y,s.frame.w,s.frame.h),!l){console.warn("Invalid atlas json, frame already exists: "+s.filename);continue}s.trimmed&&l.setTrim(s.sourceSize.w,s.sourceSize.h,s.spriteSourceSize.x,s.spriteSourceSize.y,s.spriteSourceSize.w,s.spriteSourceSize.h),s.rotated&&(l.rotated=!0,l.updateUVsInverted());var r=s.anchor||s.pivot;r&&(l.customPivot=!0,l.pivotX=r.x,l.pivotY=r.y),s.scale9Borders&&l.setScale9(s.scale9Borders.x,s.scale9Borders.y,s.scale9Borders.w,s.scale9Borders.h),l.customData=m(s)}for(var o in d)o!=="frames"&&(Array.isArray(d[o])?x.customData[o]=d[o].slice(0):x.customData[o]=d[o]);return x};E.exports=S},39711:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(41786),S=function(x,h,d){if(!d.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var t=x.source[h];x.add("__BASE",h,0,0,t.width,t.height);var e=d.frames,l;for(var i in e)if(e.hasOwnProperty(i)){var s=e[i];if(l=x.add(i,h,s.frame.x,s.frame.y,s.frame.w,s.frame.h),!l){console.warn("Invalid atlas json, frame already exists: "+i);continue}s.trimmed&&l.setTrim(s.sourceSize.w,s.sourceSize.h,s.spriteSourceSize.x,s.spriteSourceSize.y,s.spriteSourceSize.w,s.spriteSourceSize.h),s.rotated&&(l.rotated=!0,l.updateUVsInverted());var r=s.anchor||s.pivot;r&&(l.customPivot=!0,l.pivotX=r.x,l.pivotY=r.y),s.scale9Borders&&l.setScale9(s.scale9Borders.x,s.scale9Borders.y,s.scale9Borders.w,s.scale9Borders.h),l.customData=m(s)}for(var o in d)o!=="frames"&&(Array.isArray(d[o])?x.customData[o]=d[o].slice(0):x.customData[o]=d[o]);return x};E.exports=S},31403:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=[171,75,84,88,32,49,49,187,13,10,26,10],S,x=new Uint8Array(n,0,12);for(S=0;S<x.length;S++)if(x[S]!==m[S]){console.warn("KTXParser - Invalid file format");return}var h=Uint32Array.BYTES_PER_ELEMENT,d=new DataView(n,12,13*h),t=d.getUint32(0,!0)===67305985,e=d.getUint32(1*h,t);if(e!==0){console.warn("KTXParser - Only compressed formats supported");return}var l=d.getUint32(4*h,t),i=d.getUint32(6*h,t),s=d.getUint32(7*h,t),r=Math.max(1,d.getUint32(11*h,t)),o=d.getUint32(12*h,t),a=new Array(r),u=12+13*4+o,f=i,v=s;for(S=0;S<r;S++){var c=new Int32Array(n,u,1)[0];u+=4,a[S]={data:new Uint8Array(n,u,c),width:f,height:v},f=Math.max(1,f>>1),v=Math.max(1,v>>1),u+=c}return{mipmaps:a,width:i,height:s,internalFormat:l,compressed:!0,generateMipmap:!1}};E.exports=y},82038:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function y(T,C,M,A,R,P,L){return L===void 0&&(L=16),Math.floor((T+M)/R)*Math.floor((C+A)/P)*L}function n(T,C){return T=Math.max(T,16),C=Math.max(C,8),T*C/4}function m(T,C){return T=Math.max(T,8),C=Math.max(C,8),T*C/2}function S(T,C){return Math.ceil(T/4)*Math.ceil(C/4)*16}function x(T,C){return y(T,C,3,3,4,4,8)}function h(T,C){return y(T,C,3,3,4,4)}function d(T,C){return y(T,C,4,3,5,4)}function t(T,C){return y(T,C,4,4,5,5)}function e(T,C){return y(T,C,5,4,6,5)}function l(T,C){return y(T,C,5,5,6,6)}function i(T,C){return y(T,C,7,4,8,5)}function s(T,C){return y(T,C,7,5,8,6)}function r(T,C){return y(T,C,7,7,8,8)}function o(T,C){return y(T,C,9,4,10,5)}function a(T,C){return y(T,C,9,5,10,6)}function u(T,C){return y(T,C,9,7,10,8)}function f(T,C){return y(T,C,9,9,10,10)}function v(T,C){return y(T,C,11,9,12,10)}function c(T,C){return y(T,C,11,11,12,12)}var g={0:{sizeFunc:n,glFormat:[35841]},1:{sizeFunc:n,glFormat:[35843]},2:{sizeFunc:m,glFormat:[35840]},3:{sizeFunc:m,glFormat:[35842]},6:{sizeFunc:x,glFormat:[36196]},7:{sizeFunc:x,glFormat:[33776,35916]},8:{sizeFunc:h,glFormat:[33777,35917]},9:{sizeFunc:h,glFormat:[33778,35918]},11:{sizeFunc:h,glFormat:[33779,35919]},14:{sizeFunc:S,glFormat:[36494,36495]},15:{sizeFunc:S,glFormat:[36492,36493]},22:{sizeFunc:x,glFormat:[37492,37493]},23:{sizeFunc:h,glFormat:[37496,37497]},24:{sizeFunc:x,glFormat:[37494,37495]},25:{sizeFunc:x,glFormat:[37488]},26:{sizeFunc:h,glFormat:[37490]},27:{sizeFunc:h,glFormat:[37808,37840]},28:{sizeFunc:d,glFormat:[37809,37841]},29:{sizeFunc:t,glFormat:[37810,37842]},30:{sizeFunc:e,glFormat:[37811,37843]},31:{sizeFunc:l,glFormat:[37812,37844]},32:{sizeFunc:i,glFormat:[37813,37845]},33:{sizeFunc:s,glFormat:[37814,37846]},34:{sizeFunc:r,glFormat:[37815,37847]},35:{sizeFunc:o,glFormat:[37816,37848]},36:{sizeFunc:a,glFormat:[37817,37849]},37:{sizeFunc:u,glFormat:[37818,37850]},38:{sizeFunc:f,glFormat:[37819,37851]},39:{sizeFunc:v,glFormat:[37820,37852]},40:{sizeFunc:c,glFormat:[37821,37853]}},p=function(T){for(var C=new Uint32Array(T,0,13),M=C[0],A=M===55727696,R=A?C[2]:C[3],P=C[4],L=g[R].glFormat[P],F=g[R].sizeFunc,w=C[11],O=C[7],B=C[6],I=52+C[12],D=new Uint8Array(T,I),N=new Array(w),z=0,V=O,U=B,G=0;G<w;G++){var b=F(V,U);N[G]={data:new Uint8Array(D.buffer,D.byteOffset+z,b),width:V,height:U},V=Math.max(1,V>>1),U=Math.max(1,U>>1),z+=b}return{mipmaps:N,width:O,height:B,internalFormat:L,compressed:!0,generateMipmap:!1}};E.exports=p},75549:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S=function(x,h,d,t,e,l,i){var s=m(i,"frameWidth",null),r=m(i,"frameHeight",s);if(s===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var o=x.source[h];x.add("__BASE",h,0,0,o.width,o.height);var a=m(i,"startFrame",0),u=m(i,"endFrame",-1),f=m(i,"margin",0),v=m(i,"spacing",0),c=Math.floor((e-f+v)/(s+v)),g=Math.floor((l-f+v)/(r+v)),p=c*g;p===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",x.key),(a>p||a<-p)&&(a=0),a<0&&(a=p+a),(u===-1||u>p||u<a)&&(u=p);for(var T=f,C=f,M=0,A=0,R=0,P=0;P<p;P++){M=0,A=0;var L=T+s,F=C+r;L>e&&(M=L-e),F>l&&(A=F-l),P>=a&&P<=u&&(x.add(R,h,d+T,t+C,s-M,r-A),R++),T+=s+v,T+s>e&&(T=f,C+=r+v)}return x};E.exports=S},47534:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S=function(x,h,d){var t=m(d,"frameWidth",null),e=m(d,"frameHeight",t);if(!t)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var l=x.source[0];x.add("__BASE",0,0,0,l.width,l.height),m(d,"startFrame",0),m(d,"endFrame",-1);for(var i=m(d,"margin",0),s=m(d,"spacing",0),r=h.cutX,o=h.cutY,a=h.cutWidth,u=h.cutHeight,f=h.realWidth,v=h.realHeight,c=Math.floor((f-i+s)/(t+s)),g=Math.floor((v-i+s)/(e+s)),p=h.x,T=t-p,C=t-(f-a-p),M=h.y,A=e-M,R=e-(v-u-M),P,L=i,F=i,w=0,O=0,B=0;B<g;B++){for(var I=B===0,D=B===g-1,N=0;N<c;N++){var z=N===0,V=N===c-1;if(P=x.add(w,O,r+L,o+F,t,e),z||I||V||D){var U=z?p:0,G=I?M:0,b=0,Y=0;z&&(b+=t-T),V&&(b+=t-C),I&&(Y+=e-A),D&&(Y+=e-R);var W=t-b,H=e-Y;P.cutWidth=W,P.cutHeight=H,P.setTrim(t,e,U,G,W,H)}L+=s,z?L+=T:V?L+=C:L+=t,w++}L=i,F+=s,I?F+=A:D?F+=R:F+=e}return x};E.exports=S},86147:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=0,n=function(S,x,h,d){var t=y-d.y-d.height;S.add(h,x,d.x,t,d.width,d.height)},m=function(S,x,h){var d=S.source[x];S.add("__BASE",x,0,0,d.width,d.height),y=d.height;for(var t=h.split(`
|
||
`),e=/^[ ]*(- )*(\w+)+[: ]+(.*)/,l="",i="",s={x:0,y:0,width:0,height:0},r=0;r<t.length;r++){var o=t[r].match(e);if(o){var a=o[1]==="- ",u=o[2],f=o[3];if(a&&(i!==l&&(n(S,x,i,s),l=i),s={x:0,y:0,width:0,height:0}),u==="name"){i=f;continue}switch(u){case"x":case"y":case"width":case"height":s[u]=parseInt(f,10);break}}}return i!==l&&n(S,x,i,s),S};E.exports=m},55222:(E,y,n)=>{/**
|
||
* @author Ben Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2024 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(50030),S=function(l){for(var i=l.mipmaps,s=1;s<i.length;s++){var r=i[s].width,o=i[s].height;if(!m(r,o))return console.warn("Mip level "+s+" is not a power-of-two size: "+r+"x"+o),!1}var a=e[l.internalFormat];return a?a(l):(console.warn("No format checker found for internal format "+l.internalFormat+". Assuming valid."),!0)};function x(l){for(var i=l.mipmaps,s=0;s<i.length;s++){var r=i[s].width,o=i[s].height;if((r<<s)%4!==0||(o<<s)%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 "+s+" is "+r+"x"+o),!1}return!0}function h(){return!0}function d(l){var i=l.mipmaps,s=i[0];return m(s.width,s.height)?!0:(console.warn("PVRTC base dimensions must be power of two. Base level is "+s.width+"x"+s.height),!1)}function t(l){var i=l.mipmaps,s=i[0];return s.width%4!==0||s.height%4!==0?(console.warn("S3TC SRGB base dimensions must be a multiple of 4 pixels. Base level is "+s.width+"x"+s.height+" pixels"),!1):!0}var e={37488:h,37489:h,37490:h,37491:h,37492:h,37493:h,37494:h,37495:h,37496:h,37497:h,36196:h,37808:h,37809:h,37810:h,37811:h,37812:h,37813:h,37814:h,37815:h,37816:h,37817:h,37818:h,37819:h,37820:h,37821:h,37840:h,37841:h,37842:h,37843:h,37844:h,37845:h,37846:h,37847:h,37848:h,37849:h,37850:h,37851:h,37852:h,37853:h,36492:x,36493:x,36494:x,36495:x,36283:x,36284:x,36285:x,36286:x,35840:d,35841:d,35842:d,35843:d,33776:x,33777:x,33778:x,33779:x,35916:t,35917:t,35918:t,35919:t};E.exports=S},61309:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={AtlasXML:n(89905),Canvas:n(72893),Image:n(4832),JSONArray:n(78566),JSONHash:n(39711),KTXParser:n(31403),PVRParser:n(82038),SpriteSheet:n(75549),SpriteSheetFromAtlas:n(47534),UnityYAML:n(86147)}},80341:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h,d,t,e,l,i,s){(t===void 0||t<=0)&&(t=32),(e===void 0||e<=0)&&(e=32),l===void 0&&(l=0),i===void 0&&(i=0),this.name=h,this.firstgid=d|0,this.imageWidth=t|0,this.imageHeight=e|0,this.imageMargin=l|0,this.imageSpacing=i|0,this.properties=s||{},this.images=[],this.total=0},containsImageIndex:function(x){return x>=this.firstgid&&x<this.firstgid+this.total},addImage:function(x,h,d,t){return this.images.push({gid:x,image:h,width:d,height:t}),this.total++,this}});E.exports=S},27462:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=new m({initialize:function(h){if(this.gids=[],h!==void 0)for(var d=0;d<h.length;++d)for(var t=h[d],e=0;e<t.total;++e)this.gids[t.firstgid+e]=t;this._gids=this.gids},enabled:{get:function(){return!!this.gids},set:function(x){this.gids=x?this._gids:void 0}},getTypeIncludingTile:function(x){if(x.type!==void 0&&x.type!=="")return x.type;if(!(!this.gids||x.gid===void 0)){var h=this.gids[x.gid];if(h){var d=h.getTileData(x.gid);if(d)return d.type}}},setTextureAndFrame:function(x,h,d,t){if(h===null&&this.gids&&t.gid!==void 0){var e=this.gids[t.gid];e&&(h===null&&e.image!==void 0&&(h=e.image.key),d===null&&(d=t.gid-e.firstgid),x.scene.textures.getFrame(h,d)||(h=null,d=null))}x.setTexture(h,d)},setPropertiesFromTiledObject:function(x,h){if(this.gids!==void 0&&h.gid!==void 0){var d=this.gids[h.gid];d!==void 0&&this.setFromJSON(x,d.getTileProperties(h.gid))}this.setFromJSON(x,h.properties)},setFromJSON:function(x,h){if(h){if(Array.isArray(h)){for(var d=0;d<h.length;d++){var t=h[d];x[t.name]!==void 0?x[t.name]=t.value:x.setData(t.name,t.value)}return}for(var e in h)x[e]!==void 0?x[e]=h[e]:x.setData(e,h[e])}}});E.exports=S},31989:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(80341),S=n(87010),x=n(46177),h=n(49075),d=function(t,e,l,i,s,r,o,a){l===void 0&&(l=32),i===void 0&&(i=32),s===void 0&&(s=10),r===void 0&&(r=10),a===void 0&&(a=!1);var u=null;if(Array.isArray(o)){var f=e!==void 0?e:"map";u=x(f,m.ARRAY_2D,o,l,i,a)}else if(e!==void 0){var v=t.cache.tilemap.get(e);v?u=x(e,v.format,v.data,l,i,a):console.warn("No map data found for key "+e)}return u===null&&(u=new S({tileWidth:l,tileHeight:i,width:s,height:r})),new h(t,u)};E.exports=d},23029:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(31401),x=n(91907),h=n(62644),d=n(93232),t=new m({Mixins:[S.AlphaSingle,S.Flip,S.Visible],initialize:function(l,i,s,r,o,a,u,f){this.layer=l,this.index=i,this.x=s,this.y=r,this.width=o,this.height=a,this.right,this.bottom,this.baseWidth=u!==void 0?u:o,this.baseHeight=f!==void 0?f:a,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(e,l){return!(e<this.pixelX||l<this.pixelY||e>this.right||l>this.bottom)},copy:function(e){return this.index=e.index,this.alpha=e.alpha,this.properties=h(e.properties),this.visible=e.visible,this.setFlip(e.flipX,e.flipY),this.tint=e.tint,this.rotation=e.rotation,this.collideUp=e.collideUp,this.collideDown=e.collideDown,this.collideLeft=e.collideLeft,this.collideRight=e.collideRight,this.collisionCallback=e.collisionCallback,this.collisionCallbackContext=e.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(e){var l=this.tilemapLayer;if(l){var i=l.tileToWorldXY(this.x,this.y,void 0,e);return i.x}return this.x*this.baseWidth},getRight:function(e){var l=this.tilemapLayer;return l?this.getLeft(e)+this.width*l.scaleX:this.getLeft(e)+this.width},getTop:function(e){var l=this.tilemapLayer;if(l){var i=l.tileToWorldXY(this.x,this.y,void 0,e);return i.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(e){var l=this.tilemapLayer;return l?this.getTop(e)+this.height*l.scaleY:this.getTop(e)+this.height},getBounds:function(e,l){return l===void 0&&(l=new d),l.x=this.getLeft(e),l.y=this.getTop(e),l.width=this.getRight(e)-l.x,l.height=this.getBottom(e)-l.y,l},getCenterX:function(e){return(this.getLeft(e)+this.getRight(e))/2},getCenterY:function(e){return(this.getTop(e)+this.getBottom(e))/2},intersects:function(e,l,i,s){return!(i<=this.pixelX||s<=this.pixelY||e>=this.right||l>=this.bottom)},isInteresting:function(e,l){return e&&l?this.canCollide||this.hasInterestingFace:e?this.collides:l?this.hasInterestingFace:!1},resetCollision:function(e){if(e===void 0&&(e=!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,e){var l=this.tilemapLayer;l&&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(e,l,i,s,r){if(l===void 0&&(l=e),i===void 0&&(i=e),s===void 0&&(s=e),r===void 0&&(r=!0),this.collideLeft=e,this.collideRight=l,this.collideUp=i,this.collideDown=s,this.faceLeft=e,this.faceRight=l,this.faceTop=i,this.faceBottom=s,r){var o=this.tilemapLayer;o&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(e,l){return e===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=e,this.collisionCallbackContext=l),this},setSize:function(e,l,i,s){return e!==void 0&&(this.width=e),l!==void 0&&(this.height=l),i!==void 0&&(this.baseWidth=i),s!==void 0&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var e=this.layer.orientation;if(e===x.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(e===x.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(e===x.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(e===x.HEXAGONAL){var l=this.layer.staggerAxis,i=this.layer.staggerIndex,s=this.layer.hexSideLength,r,o;l==="y"?(o=(this.baseHeight-s)/2+s,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*o):l==="x"&&(r=(this.baseWidth-s)/2+s,this.pixelX=this.x*r,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 e=this.layer.tilemapLayer;if(e){var l=e.gidMap[this.index];if(l)return l}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var e=this.tilemapLayer;return e?e.tilemap:null}}});E.exports=t},49075:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(84101),S=n(83419),x=n(39506),h=n(80341),d=n(95540),t=n(14977),e=n(27462),l=n(91907),i=n(36305),s=n(19133),r=n(68287),o=n(23029),a=n(81086),u=n(44731),f=n(53180),v=n(20442),c=n(33629),g=new S({initialize:function(T,C){this.scene=T,this.tileWidth=C.tileWidth,this.tileHeight=C.tileHeight,this.width=C.width,this.height=C.height,this.orientation=C.orientation,this.renderOrder=C.renderOrder,this.format=C.format,this.version=C.version,this.properties=C.properties,this.widthInPixels=C.widthInPixels,this.heightInPixels=C.heightInPixels,this.imageCollections=C.imageCollections,this.images=C.images,this.layers=C.layers,this.tiles=C.tiles,this.tilesets=C.tilesets,this.objects=C.objects,this.currentLayerIndex=0,this.hexSideLength=C.hexSideLength;var M=this.orientation;this._convert={WorldToTileXY:a.GetWorldToTileXYFunction(M),WorldToTileX:a.GetWorldToTileXFunction(M),WorldToTileY:a.GetWorldToTileYFunction(M),TileToWorldXY:a.GetTileToWorldXYFunction(M),TileToWorldX:a.GetTileToWorldXFunction(M),TileToWorldY:a.GetTileToWorldYFunction(M),GetTileCorners:a.GetTileCornersFunction(M)}},setRenderOrder:function(p){var T=["right-down","left-down","right-up","left-up"];return typeof p=="number"&&(p=T[p]),T.indexOf(p)>-1&&(this.renderOrder=p),this},addTilesetImage:function(p,T,C,M,A,R,P,L){if(p===void 0)return null;T==null&&(T=p);var F=this.scene.sys.textures;if(!F.exists(T))return console.warn('Texture key "%s" not found',T),null;var w=F.get(T),O=this.getTilesetIndex(p);if(O===null&&this.format===h.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',p,this.tilesets),null;var B=this.tilesets[O];return B?((C||M)&&B.setTileSize(C,M),(A||R)&&B.setSpacing(A,R),B.setImage(w),B):(C===void 0&&(C=this.tileWidth),M===void 0&&(M=this.tileHeight),A===void 0&&(A=0),R===void 0&&(R=0),P===void 0&&(P=0),L===void 0&&(L={x:0,y:0}),B=new c(p,P,C,M,A,R,void 0,void 0,L),B.setImage(w),this.tilesets.push(B),this.tiles=m(this),B)},copy:function(p,T,C,M,A,R,P,L){return L=this.getLayer(L),L!==null?(a.Copy(p,T,C,M,A,R,P,L),this):null},createBlankLayer:function(p,T,C,M,A,R,P,L){C===void 0&&(C=0),M===void 0&&(M=0),A===void 0&&(A=this.width),R===void 0&&(R=this.height),P===void 0&&(P=this.tileWidth),L===void 0&&(L=this.tileHeight);var F=this.getLayerIndex(p);if(F!==null)return console.warn("Invalid Tilemap Layer ID: "+p),null;for(var w=new t({name:p,tileWidth:P,tileHeight:L,width:A,height:R,orientation:this.orientation,hexSideLength:this.hexSideLength}),O,B=0;B<R;B++){O=[];for(var I=0;I<A;I++)O.push(new o(w,-1,I,B,P,L,this.tileWidth,this.tileHeight));w.data.push(O)}this.layers.push(w),this.currentLayerIndex=this.layers.length-1;var D=new v(this.scene,this,this.currentLayerIndex,T,C,M);return D.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(D),D},createLayer:function(p,T,C,M,A){var R=this.getLayerIndex(p);if(R===null)return console.warn("Invalid Tilemap Layer ID: "+p),typeof p=="string"&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var P=this.layers[R];if(P.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+p),null;this.currentLayerIndex=R,C===void 0&&(C=P.x),M===void 0&&(M=P.y);var L;return A?(Array.isArray(T)&&(T.length>1&&console.warn("TilemapGPULayer can only use one tileset. Using the first item given."),T=T[0]),L=new f(this.scene,this,R,T,C,M)):(L=new v(this.scene,this,R,T,C,M),L.setRenderOrder(this.renderOrder)),this.scene.sys.displayList.add(L),L},createFromObjects:function(p,T,C){C===void 0&&(C=!0);var M=[],A=this.getObjectLayer(p);if(!A)return console.warn("createFromObjects: Invalid objectLayerName given: "+p),M;var R=new e(C?this.tilesets:void 0);Array.isArray(T)||(T=[T]);var P=A.objects;T.sortByY&&P.sort(function(j,J){return j.y>J.y?1:-1});for(var L=0;L<T.length;L++){var F=T[L],w=d(F,"id",null),O=d(F,"gid",null),B=d(F,"name",null),I=d(F,"type",null);R.enabled=!d(F,"ignoreTileset",null);for(var D,N=[],z=0;z<P.length;z++)D=P[z],(w===null&&O===null&&B===null&&I===null||w!==null&&D.id===w||O!==null&&D.gid===O||B!==null&&D.name===B||I!==null&&R.getTypeIncludingTile(D)===I)&&N.push(D);for(var V=d(F,"classType",r),U=d(F,"scene",this.scene),G=d(F,"container",null),b=d(F,"key",null),Y=d(F,"frame",null),W=0;W<N.length;W++){D=N[W];var H=new V(U);if(H.setName(D.name),H.setPosition(D.x,D.y),R.setTextureAndFrame(H,b,Y,D),D.width&&(H.displayWidth=D.width),D.height&&(H.displayHeight=D.height),this.orientation===l.ISOMETRIC){var X=this.tileWidth/this.tileHeight,K={x:H.x-H.y,y:(H.x+H.y)/X};H.x=K.x,H.y=K.y}var Z={x:H.originX*D.width,y:(H.originY-(D.gid?1:0))*D.height};if(D.rotation){var Q=x(D.rotation);i(Z,Q),H.rotation=Q}H.x+=Z.x,H.y+=Z.y,(D.flippedHorizontal!==void 0||D.flippedVertical!==void 0)&&H.setFlip(D.flippedHorizontal,D.flippedVertical),D.visible||(H.visible=!1),R.setPropertiesFromTiledObject(H,D),G?G.add(H):U.add.existing(H),M.push(H)}}return M},createFromTiles:function(p,T,C,M,A,R){return R=this.getLayer(R),R===null?null:a.CreateFromTiles(p,T,C,M,A,R)},fill:function(p,T,C,M,A,R,P){return R===void 0&&(R=!0),P=this.getLayer(P),P===null?null:(a.Fill(p,T,C,M,A,R,P),this)},filterObjects:function(p,T,C){if(typeof p=="string"){var M=p;if(p=this.getObjectLayer(p),!p)return console.warn("No object layer found with the name: "+M),null}return p.objects.filter(T,C)},filterTiles:function(p,T,C,M,A,R,P,L){return L=this.getLayer(L),L===null?null:a.FilterTiles(p,T,C,M,A,R,P,L)},findByIndex:function(p,T,C,M){return M=this.getLayer(M),M===null?null:a.FindByIndex(p,T,C,M)},findObject:function(p,T,C){if(typeof p=="string"){var M=p;if(p=this.getObjectLayer(p),!p)return console.warn("No object layer found with the name: "+M),null}return p.objects.find(T,C)||null},findTile:function(p,T,C,M,A,R,P,L){return L=this.getLayer(L),L===null?null:a.FindTile(p,T,C,M,A,R,P,L)},forEachTile:function(p,T,C,M,A,R,P,L){return L=this.getLayer(L),L===null?null:(a.ForEachTile(p,T,C,M,A,R,P,L),this)},getImageIndex:function(p){return this.getIndex(this.images,p)},getImageLayerNames:function(){return!this.images||!Array.isArray(this.images)?[]:this.images.map(function(p){return p.name})},getIndex:function(p,T){for(var C=0;C<p.length;C++)if(p[C].name===T)return C;return null},getLayer:function(p){var T=this.getLayerIndex(p);return T!==null?this.layers[T]:null},getObjectLayer:function(p){var T=this.getIndex(this.objects,p);return T!==null?this.objects[T]:null},getObjectLayerNames:function(){return!this.objects||!Array.isArray(this.objects)?[]:this.objects.map(function(p){return p.name})},getLayerIndex:function(p){return p===void 0?this.currentLayerIndex:typeof p=="string"?this.getLayerIndexByName(p):typeof p=="number"&&p<this.layers.length?p:p instanceof u&&p.tilemap===this?p.layerIndex:null},getLayerIndexByName:function(p){return this.getIndex(this.layers,p)},getTileAt:function(p,T,C,M){return M=this.getLayer(M),M===null?null:a.GetTileAt(p,T,C,M)},getTileAtWorldXY:function(p,T,C,M,A){return A=this.getLayer(A),A===null?null:a.GetTileAtWorldXY(p,T,C,M,A)},getTileLayerNames:function(){return!this.layers||!Array.isArray(this.layers)?[]:this.layers.map(function(p){return p.name})},getTilesWithin:function(p,T,C,M,A,R){return R=this.getLayer(R),R===null?null:a.GetTilesWithin(p,T,C,M,A,R)},getTilesWithinShape:function(p,T,C,M){return M=this.getLayer(M),M===null?null:a.GetTilesWithinShape(p,T,C,M)},getTilesWithinWorldXY:function(p,T,C,M,A,R,P){return P=this.getLayer(P),P===null?null:a.GetTilesWithinWorldXY(p,T,C,M,A,R,P)},getTileset:function(p){var T=this.getIndex(this.tilesets,p);return T!==null?this.tilesets[T]:null},getTilesetIndex:function(p){return this.getIndex(this.tilesets,p)},hasTileAt:function(p,T,C){return C=this.getLayer(C),C===null?null:a.HasTileAt(p,T,C)},hasTileAtWorldXY:function(p,T,C,M){return M=this.getLayer(M),M===null?null:a.HasTileAtWorldXY(p,T,C,M)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(p){this.setLayer(p)}},putTileAt:function(p,T,C,M,A){return M===void 0&&(M=!0),A=this.getLayer(A),A===null?null:a.PutTileAt(p,T,C,M,A)},putTileAtWorldXY:function(p,T,C,M,A,R){return M===void 0&&(M=!0),R=this.getLayer(R),R===null?null:a.PutTileAtWorldXY(p,T,C,M,A,R)},putTilesAt:function(p,T,C,M,A){return M===void 0&&(M=!0),A=this.getLayer(A),A===null?null:(a.PutTilesAt(p,T,C,M,A),this)},randomize:function(p,T,C,M,A,R){return R=this.getLayer(R),R===null?null:(a.Randomize(p,T,C,M,A,R),this)},calculateFacesAt:function(p,T,C){return C=this.getLayer(C),C===null?null:(a.CalculateFacesAt(p,T,C),this)},calculateFacesWithin:function(p,T,C,M,A){return A=this.getLayer(A),A===null?null:(a.CalculateFacesWithin(p,T,C,M,A),this)},removeLayer:function(p){var T=this.getLayerIndex(p);if(T!==null){s(this.layers,T);for(var C=T;C<this.layers.length;C++)this.layers[C].tilemapLayer&&this.layers[C].tilemapLayer.layerIndex--;return this.currentLayerIndex===T&&(this.currentLayerIndex=0),this}else return null},destroyLayer:function(p){var T=this.getLayerIndex(p);return T!==null?(p=this.layers[T],p.tilemapLayer.destroy(),s(this.layers,T),this.currentLayerIndex===T&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var p=this.layers,T=0;T<p.length;T++)p[T].tilemapLayer&&p[T].tilemapLayer.destroy(!1);return p.length=0,this.currentLayerIndex=0,this},removeTile:function(p,T,C){T===void 0&&(T=-1),C===void 0&&(C=!0);var M=[];Array.isArray(p)||(p=[p]);for(var A=0;A<p.length;A++){var R=p[A];M.push(this.removeTileAt(R.x,R.y,!0,C,R.tilemapLayer)),T>-1&&this.putTileAt(T,R.x,R.y,C,R.tilemapLayer)}return M},removeTileAt:function(p,T,C,M,A){return C===void 0&&(C=!0),M===void 0&&(M=!0),A=this.getLayer(A),A===null?null:a.RemoveTileAt(p,T,C,M,A)},removeTileAtWorldXY:function(p,T,C,M,A,R){return C===void 0&&(C=!0),M===void 0&&(M=!0),R=this.getLayer(R),R===null?null:a.RemoveTileAtWorldXY(p,T,C,M,A,R)},renderDebug:function(p,T,C){return C=this.getLayer(C),C===null?null:(this.orientation===l.ORTHOGONAL&&a.RenderDebug(p,T,C),this)},renderDebugFull:function(p,T){for(var C=this.layers,M=0;M<C.length;M++)a.RenderDebug(p,T,C[M]);return this},replaceByIndex:function(p,T,C,M,A,R,P){return P=this.getLayer(P),P===null?null:(a.ReplaceByIndex(p,T,C,M,A,R,P),this)},setCollision:function(p,T,C,M,A){return T===void 0&&(T=!0),C===void 0&&(C=!0),A===void 0&&(A=!0),M=this.getLayer(M),M===null?null:(a.SetCollision(p,T,C,M,A),this)},setCollisionBetween:function(p,T,C,M,A){return C===void 0&&(C=!0),M===void 0&&(M=!0),A=this.getLayer(A),A===null?null:(a.SetCollisionBetween(p,T,C,M,A),this)},setCollisionByProperty:function(p,T,C,M){return T===void 0&&(T=!0),C===void 0&&(C=!0),M=this.getLayer(M),M===null?null:(a.SetCollisionByProperty(p,T,C,M),this)},setCollisionByExclusion:function(p,T,C,M){return T===void 0&&(T=!0),C===void 0&&(C=!0),M=this.getLayer(M),M===null?null:(a.SetCollisionByExclusion(p,T,C,M),this)},setCollisionFromCollisionGroup:function(p,T,C){return p===void 0&&(p=!0),T===void 0&&(T=!0),C=this.getLayer(C),C===null?null:(a.SetCollisionFromCollisionGroup(p,T,C),this)},setTileIndexCallback:function(p,T,C,M){return M=this.getLayer(M),M===null?null:(a.SetTileIndexCallback(p,T,C,M),this)},setTileLocationCallback:function(p,T,C,M,A,R,P){return P=this.getLayer(P),P===null?null:(a.SetTileLocationCallback(p,T,C,M,A,R,P),this)},setLayer:function(p){var T=this.getLayerIndex(p);return T!==null&&(this.currentLayerIndex=T),this},setBaseTileSize:function(p,T){this.tileWidth=p,this.tileHeight=T,this.widthInPixels=this.width*p,this.heightInPixels=this.height*T;for(var C=0;C<this.layers.length;C++){this.layers[C].baseTileWidth=p,this.layers[C].baseTileHeight=T;for(var M=this.layers[C].data,A=this.layers[C].width,R=this.layers[C].height,P=0;P<R;P++)for(var L=0;L<A;L++){var F=M[P][L];F!==null&&F.setSize(void 0,void 0,p,T)}}return this},setLayerTileSize:function(p,T,C){if(C=this.getLayer(C),C===null)return this;C.tileWidth=p,C.tileHeight=T;for(var M=C.data,A=C.width,R=C.height,P=0;P<R;P++)for(var L=0;L<A;L++){var F=M[P][L];F!==null&&F.setSize(p,T)}return this},shuffle:function(p,T,C,M,A){return A=this.getLayer(A),A===null?null:(a.Shuffle(p,T,C,M,A),this)},swapByIndex:function(p,T,C,M,A,R,P){return P=this.getLayer(P),P===null?null:(a.SwapByIndex(p,T,C,M,A,R,P),this)},tileToWorldX:function(p,T,C){return C=this.getLayer(C),C===null?null:this._convert.TileToWorldX(p,T,C)},tileToWorldY:function(p,T,C){return C=this.getLayer(C),C===null?null:this._convert.TileToWorldY(p,T,C)},tileToWorldXY:function(p,T,C,M,A){return A=this.getLayer(A),A===null?null:this._convert.TileToWorldXY(p,T,C,M,A)},getTileCorners:function(p,T,C,M){return M=this.getLayer(M),M===null?null:this._convert.GetTileCorners(p,T,C,M)},weightedRandomize:function(p,T,C,M,A,R){return R=this.getLayer(R),R===null?null:(a.WeightedRandomize(T,C,M,A,p,R),this)},worldToTileX:function(p,T,C,M){return M=this.getLayer(M),M===null?null:this._convert.WorldToTileX(p,T,C,M)},worldToTileY:function(p,T,C,M){return M=this.getLayer(M),M===null?null:this._convert.WorldToTileY(p,T,C,M)},worldToTileXY:function(p,T,C,M,A,R){return R=this.getLayer(R),R===null?null:this._convert.WorldToTileXY(p,T,C,M,A,R)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}});E.exports=g},45939:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(44603),S=n(31989);m.register("tilemap",function(x){var h=x!==void 0?x:{};return S(this.scene,h.key,h.tileWidth,h.tileHeight,h.width,h.height,h.data,h.insertNull)})},46029:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(39429),S=n(31989);m.register("tilemap",function(x,h,d,t,e,l,i){return x===null&&(x=void 0),h===null&&(h=void 0),d===null&&(d=void 0),t===null&&(t=void 0),e===null&&(e=void 0),S(this.scene,x,h,d,t,e,l,i)})},53180:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(67743),S=n(83419),x=n(44731),h=n(57912),d=new S({Extends:x,Mixins:[h],initialize:function(e,l,i,s,r,o){x.call(this,"TilemapGPULayer",e,l,i,r,o),this.tileset=null,this.layerDataTexture=null,this.setTileset(s),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return m}},setTileset:function(t){typeof t=="string"&&(t=this.tilemap.getTileset(t)),this.tileset=t,this.generateLayerDataTexture()},generateLayerDataTexture:function(){for(var t=this.layer,e=this.tileset,l=e.firstgid,i=this.scene.renderer,s=e.getAnimationDataIndexMap(i),r=new Uint32Array(t.width*t.height),o=0;o<t.height;o++)for(var a=0;a<t.width;a++){var u=t.data[o][a],f=u.index-l,v=u.flipX,c=u.flipY,g=!1;s.has(f)&&(f=s.get(f),g=!0),v&&(f|=2147483648),c&&(f|=1073741824),g&&(f|=536870912),u.index===-1&&(f=268435456),r[o*t.width+a]=f}this.layerDataTexture&&this.layerDataTexture.destroy();var p=new Uint8Array(r.buffer);this.layerDataTexture=i.createUint8ArrayTexture(p,t.width,t.height,!1,!0)}});E.exports=d},57912:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(6736),E.exports={renderWebGL:S,renderCanvas:x}},6736:E=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=m.customRenderNodes.Submitter||m.defaultRenderNodes.Submitter;h.run(S,m,x)};E.exports=y},20442:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(79317),S=n(83419),x=n(81086),h=n(19218),d=n(44731),t=new S({Extends:d,Mixins:[h],initialize:function(l,i,s,r,o,a){d.call(this,"TilemapLayer",l,i,s,o,a),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=x.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.setTilesets(r),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return m}},setTilesets:function(e){var l=[],i=[],s=this.tilemap;Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];if(typeof o=="string"&&(o=s.getTileset(o)),o){i.push(o);for(var a=o.firstgid,u=0;u<o.total;u++)l[a+u]=o}}this.gidMap=l,this.tileset=i},setRenderOrder:function(e){var l=["right-down","left-down","right-up","left-up"];return typeof e=="string"&&(e=l.indexOf(e)),e>=0&&e<4&&(this._renderOrder=e),this},cull:function(e){return this.cullCallback(this.layer,e,this.culledTiles,this._renderOrder)},setSkipCull:function(e){return e===void 0&&(e=!0),this.skipCull=e,this},setCullPadding:function(e,l){return e===void 0&&(e=1),l===void 0&&(l=1),this.cullPaddingX=e,this.cullPaddingY=l,this},setTint:function(e,l,i,s,r,o){e===void 0&&(e=16777215);var a=function(u){u.tint=e,u.tintFill=!1};return this.forEachTile(a,this,l,i,s,r,o)},setTintFill:function(e,l,i,s,r,o){e===void 0&&(e=16777215);var a=function(u){u.tint=e,u.tintFill=!0};return this.forEachTile(a,this,l,i,s,r,o)},destroy:function(e){this.culledTiles.length=0,this.cullCallback=null,d.prototype.destroy.call(this,e)}});E.exports=t},44731:(E,y,n)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(78389),x=n(31401),h=n(95643),d=n(81086),t=n(26099),e=new m({Extends:h,Mixins:[x.Alpha,x.BlendMode,x.ComputedSize,x.Depth,x.ElapseTimer,x.Flip,x.GetBounds,x.Lighting,x.Mask,x.Origin,x.RenderNodes,x.Transform,x.Visible,x.ScrollFactor,S],initialize:function(i,s,r,o,a,u){h.call(this,s,i),this.isTilemap=!0,this.tilemap=r,this.layerIndex=o,this.layer=r.layers[o],this.layer.tilemapLayer=this,this.gidMap=[],this.tempVec=new t,this.collisionCategory=1,this.collisionMask=1,this.setAlpha(this.layer.alpha),this.setPosition(a,u),this.setOrigin(0,0),this.setSize(r.tileWidth*this.layer.width,r.tileHeight*this.layer.height)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(l,i){this.updateTimer(l,i)},calculateFacesAt:function(l,i){return d.CalculateFacesAt(l,i,this.layer),this},calculateFacesWithin:function(l,i,s,r){return d.CalculateFacesWithin(l,i,s,r,this.layer),this},createFromTiles:function(l,i,s,r,o){return d.CreateFromTiles(l,i,s,r,o,this.layer)},copy:function(l,i,s,r,o,a,u){return d.Copy(l,i,s,r,o,a,u,this.layer),this},fill:function(l,i,s,r,o,a){return d.Fill(l,i,s,r,o,a,this.layer),this},filterTiles:function(l,i,s,r,o,a,u){return d.FilterTiles(l,i,s,r,o,a,u,this.layer)},findByIndex:function(l,i,s){return d.FindByIndex(l,i,s,this.layer)},findTile:function(l,i,s,r,o,a,u){return d.FindTile(l,i,s,r,o,a,u,this.layer)},forEachTile:function(l,i,s,r,o,a,u){return d.ForEachTile(l,i,s,r,o,a,u,this.layer),this},getTileAt:function(l,i,s){return d.GetTileAt(l,i,s,this.layer)},getTileAtWorldXY:function(l,i,s,r){return d.GetTileAtWorldXY(l,i,s,r,this.layer)},getIsoTileAtWorldXY:function(l,i,s,r,o){s===void 0&&(s=!0);var a=this.tempVec;return d.IsometricWorldToTileXY(l,i,!0,a,o,this.layer,s),this.getTileAt(a.x,a.y,r)},getTilesWithin:function(l,i,s,r,o){return d.GetTilesWithin(l,i,s,r,o,this.layer)},getTilesWithinShape:function(l,i,s){return d.GetTilesWithinShape(l,i,s,this.layer)},getTilesWithinWorldXY:function(l,i,s,r,o,a){return d.GetTilesWithinWorldXY(l,i,s,r,o,a,this.layer)},hasTileAt:function(l,i){return d.HasTileAt(l,i,this.layer)},hasTileAtWorldXY:function(l,i,s){return d.HasTileAtWorldXY(l,i,s,this.layer)},putTileAt:function(l,i,s,r){return d.PutTileAt(l,i,s,r,this.layer)},putTileAtWorldXY:function(l,i,s,r,o){return d.PutTileAtWorldXY(l,i,s,r,o,this.layer)},putTilesAt:function(l,i,s,r){return d.PutTilesAt(l,i,s,r,this.layer),this},randomize:function(l,i,s,r,o){return d.Randomize(l,i,s,r,o,this.layer),this},removeTileAt:function(l,i,s,r){return d.RemoveTileAt(l,i,s,r,this.layer)},removeTileAtWorldXY:function(l,i,s,r,o){return d.RemoveTileAtWorldXY(l,i,s,r,o,this.layer)},renderDebug:function(l,i){return d.RenderDebug(l,i,this.layer),this},replaceByIndex:function(l,i,s,r,o,a){return d.ReplaceByIndex(l,i,s,r,o,a,this.layer),this},setCollision:function(l,i,s,r){return d.SetCollision(l,i,s,this.layer,r),this},setCollisionBetween:function(l,i,s,r){return d.SetCollisionBetween(l,i,s,r,this.layer),this},setCollisionByProperty:function(l,i,s){return d.SetCollisionByProperty(l,i,s,this.layer),this},setCollisionByExclusion:function(l,i,s){return d.SetCollisionByExclusion(l,i,s,this.layer),this},setCollisionFromCollisionGroup:function(l,i){return d.SetCollisionFromCollisionGroup(l,i,this.layer),this},setTileIndexCallback:function(l,i,s){return d.SetTileIndexCallback(l,i,s,this.layer),this},setTileLocationCallback:function(l,i,s,r,o,a){return d.SetTileLocationCallback(l,i,s,r,o,a,this.layer),this},shuffle:function(l,i,s,r){return d.Shuffle(l,i,s,r,this.layer),this},swapByIndex:function(l,i,s,r,o,a){return d.SwapByIndex(l,i,s,r,o,a,this.layer),this},tileToWorldX:function(l,i){return this.tilemap.tileToWorldX(l,i,this)},tileToWorldY:function(l,i){return this.tilemap.tileToWorldY(l,i,this)},tileToWorldXY:function(l,i,s,r){return this.tilemap.tileToWorldXY(l,i,s,r,this)},getTileCorners:function(l,i,s){return this.tilemap.getTileCorners(l,i,s,this)},weightedRandomize:function(l,i,s,r,o){return d.WeightedRandomize(i,s,r,o,l,this.layer),this},worldToTileX:function(l,i,s){return this.tilemap.worldToTileX(l,i,s,this)},worldToTileY:function(l,i,s){return this.tilemap.worldToTileY(l,i,s,this)},worldToTileXY:function(l,i,s,r,o){return this.tilemap.worldToTileXY(l,i,s,r,o,this)},destroy:function(l){l===void 0&&(l=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),l&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.gidMap=[],this.tileset=[],h.prototype.destroy.call(this))}});E.exports=e},16153:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61340),S=new m,x=new m,h=new m,d=function(t,e,l,i){var s=e.cull(l),r=s.length,o=l.alpha*e.alpha;if(!(r===0||o<=0)){x.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=t.currentContext,u=e.gidMap;a.save(),S.copyWithScrollFactorFrom(l.matrixCombined,l.scrollX,l.scrollY,e.scrollFactorX,e.scrollFactorY),i&&S.multiply(i),S.multiply(x,h),h.setToContext(a),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(a.imageSmoothingEnabled=!1);for(var f=0;f<r;f++){var v=s[f],c=u[v.index];if(c){var g=c.image.getSourceImage(),p=c.getTileTextureCoordinates(v.index),T=c.tileWidth,C=c.tileHeight;if(!(p===null||T===0||C===0)){var M=T*.5,A=C*.5;p.x+=c.tileOffset.x,p.y+=c.tileOffset.y,a.save(),a.translate(v.pixelX+M,v.pixelY+A),v.rotation!==0&&a.rotate(v.rotation),(v.flipX||v.flipY)&&a.scale(v.flipX?-1:1,v.flipY?-1:1),a.globalAlpha=o*v.alpha,a.drawImage(g,p.x,p.y,T,C,-M,-A,T,C),a.restore()}}}a.restore()}};E.exports=d},19218:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(29747),S=m,x=m;S=n(99558),x=n(16153),E.exports={renderWebGL:S,renderCanvas:x}},99558:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70554),S=m.getTintAppendFloatAlpha,x={frame:{source:{glTexture:null}},uvSource:{u0:0,v0:0,u1:1,v1:1},frameWidth:0,frameHeight:0},h={tintFill:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},d=function(t,e,l,i){var s=l.camera,r=e.cull(s),o=r.length,a=e.alpha;if(!(o===0||a<=0))for(var u=e.gidMap,f=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter,v=e.customRenderNodes.Transformer||e.defaultRenderNodes.Transformer,c=e.timeElapsed,g=0;g<o;g++){var p=r[g],T=u[p.index];if(T){var C=T.getAnimatedTileId(p.index,c);if(C!==null){var M=T.getTileTextureCoordinates(C),A=T.tileWidth,R=T.tileHeight;if(!(!M||A===0||R===0)){var P=T.glTexture,L=A,F=R,w=M.x,O=M.y,B=S(p.tint,a*p.alpha);x.frame.source.glTexture=T.glTexture,x.frameWidth=L,x.frameHeight=F,x.uvSource.u0=w/P.width,x.uvSource.v0=1-(O+F)/P.height,x.uvSource.u1=(w+L)/P.width,x.uvSource.v1=1-O/P.height,h.tintFill=p.tintFill,h.tintTopLeft=B,h.tintTopRight=B,h.tintBottomLeft=B,h.tintBottomRight=B,f.run(l,e,i,p,x,v,h)}}}}};E.exports=d},33629:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(26099),x=new m({initialize:function(d,t,e,l,i,s,r,o,a){(e===void 0||e<=0)&&(e=32),(l===void 0||l<=0)&&(l=32),i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r={}),o===void 0&&(o={}),this.name=d,this.firstgid=t,this.tileWidth=e,this.tileHeight=l,this.tileMargin=i,this.tileSpacing=s,this.tileProperties=r,this.tileData=o,this.tileOffset=new S,a!==void 0&&this.tileOffset.set(a.x,a.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[],this.animationSearchThreshold=64,this.maxAnimationLength=0,this._animationDataTexture=null,this._animationDataIndexMap=null},getTileProperties:function(h){return this.containsTileIndex(h)?this.tileProperties[h-this.firstgid]:null},getTileData:function(h){return this.containsTileIndex(h)?this.tileData[h-this.firstgid]:null},getTileCollisionGroup:function(h){var d=this.getTileData(h);return d&&d.objectgroup?d.objectgroup:null},containsTileIndex:function(h){return h>=this.firstgid&&h<this.firstgid+this.total},getAnimatedTileId:function(h,d){if(!this.containsTileIndex(h))return null;var t=this.getTileData(h);if(!(t&&t.animation))return h;d=d%t.animationDuration;for(var e=t.animation,l=null,i=0,s=e.length-1,r=0,o=0;i<=s;){if(r=i+s>>>1,l=e[r],o=l.startTime,o<=d&&o+l.duration>d)return l.tileid+this.firstgid;o<d?i=r+1:s=r-1}return null},getTileTextureCoordinates:function(h){return this.containsTileIndex(h)?this.texCoordinates[h-this.firstgid]:null},setImage:function(h){this.image=h;var d=h.get(),t=h.getFrameBounds();return this.glTexture=d.source.glTexture,d.width>t.width||d.height>t.height?this.updateTileData(d.width,d.height):this.updateTileData(t.width,t.height,t.x,t.y),this},setTileSize:function(h,d){return h!==void 0&&(this.tileWidth=h),d!==void 0&&(this.tileHeight=d),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(h,d){return h!==void 0&&(this.tileMargin=h),d!==void 0&&(this.tileSpacing=d),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(h,d,t,e){t===void 0&&(t=0),e===void 0&&(e=0);var l=(d-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(h-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(l%1!==0||i%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),l=Math.floor(l),i=Math.floor(i),this.rows=l,this.columns=i,this.total=l*i,this.texCoordinates.length=0;for(var s=this.tileMargin+t,r=this.tileMargin+e,o=0;o<this.rows;o++){for(var a=0;a<this.columns;a++)this.texCoordinates.push({x:s,y:r}),s+=this.tileWidth+this.tileSpacing;s=this.tileMargin+t,r+=this.tileHeight+this.tileSpacing}return this._animationDataTexture&&this.createAnimationDataTexture(),this},getAnimationDataTexture:function(h){return this._animationDataTexture||this.createAnimationDataTexture(h),this._animationDataTexture},getAnimationDataIndexMap:function(h){return this._animationDataIndexMap||this.createAnimationDataTexture(h),this._animationDataIndexMap},createAnimationDataTexture:function(h){for(var d=this.tileData,t=this.total,e=[],l=[],i=new Map,s=0,r=0;r<t;r++){var o=d[r];if(o&&o.animation){var a=o.animation,u=o.animationDuration;i.set(r,e.length),e.push([u,l.length]);for(var f=0;f<a.length;f++){var v=a[f];l.push([v.duration,v.tileid])}s=Math.max(s,a.length)}}var c=e.length+l.length;if(c>4096*4096/2)throw new Error("Tileset.animationDataTexture: too many animations - total number of animations plus animation frames is max 8388608, got "+c);var g=c*2,p=Math.min(g,4096),T=Math.ceil(g/4096),C=new Uint32Array(p*T),M=0,A=e.length;for(r=0;r<A;r++){a=e[r];var R=a[0],P=a[1];C[M++]=R,C[M++]=(P+A)*2}for(r=0;r<l.length;r++){v=l[r];var L=v[0],F=v[1];C[M++]=L,C[M++]=F}this.animationDataTexture&&this.animationDataTexture.destroy();var w=new Uint8Array(C.buffer);this._animationDataTexture=h.createUint8ArrayTexture(w,p,T,!1,!0),this._animationDataIndexMap=i,this.maxAnimationLength=s}});E.exports=x},72023:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7423),S=function(x,h,d){var t=m(x,h,!0,d),e=m(x,h-1,!0,d),l=m(x,h+1,!0,d),i=m(x-1,h,!0,d),s=m(x+1,h,!0,d),r=t&&t.collides;return r&&(t.faceTop=!0,t.faceBottom=!0,t.faceLeft=!0,t.faceRight=!0),e&&e.collides&&(r&&(t.faceTop=!1),e.faceBottom=!r),l&&l.collides&&(r&&(t.faceBottom=!1),l.faceTop=!r),i&&i.collides&&(r&&(t.faceLeft=!1),i.faceRight=!r),s&&s.collides&&(r&&(t.faceRight=!1),s.faceLeft=!r),t&&!t.collides&&t.resetFaces(),t};E.exports=S},42573:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7423),S=n(7386),x=function(h,d,t,e,l){for(var i=null,s=null,r=null,o=null,a=S(h,d,t,e,null,l),u=0;u<a.length;u++){var f=a[u];f&&(f.collides?(i=m(f.x,f.y-1,!0,l),s=m(f.x,f.y+1,!0,l),r=m(f.x-1,f.y,!0,l),o=m(f.x+1,f.y,!0,l),f.faceTop=!(i&&i.collides),f.faceBottom=!(s&&s.collides),f.faceLeft=!(r&&r.collides),f.faceRight=!(o&&o.collides)):f.resetFaces())}};E.exports=x},33528:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=new m,x=function(h,d,t,e){var l=t.tilemapLayer,i=l.cullPaddingX,s=l.cullPaddingY,r=l.tilemap.tileToWorldXY(h,d,S,e,l);return r.x>e.worldView.x+l.scaleX*t.tileWidth*(-i-.5)&&r.x<e.worldView.right+l.scaleX*t.tileWidth*(i-.5)&&r.y>e.worldView.y+l.scaleY*t.tileHeight*(-s-1)&&r.y<e.worldView.bottom+l.scaleY*t.tileHeight*(s-.5)};E.exports=x},1785:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(42573),S=n(7386),x=n(62991),h=n(23029),d=function(t,e,l,i,s,r,o,a){o===void 0&&(o=!0);var u=S(t,e,l,i,null,a),f=[];u.forEach(function(M){var A=new h(M.layer,M.index,M.x,M.y,M.width,M.height,M.baseWidth,M.baseHeight);A.copy(M),f.push(A)});for(var v=s-t,c=r-e,g=0;g<f.length;g++){var p=f[g],T=p.x+v,C=p.y+c;x(T,C,a)&&a.data[C][T]&&(p.x=T,p.y=C,p.updatePixelXY(),a.data[C][T]=p)}o&&m(s-1,r-1,l+2,i+2,a),u.length=0,f.length=0};E.exports=d},78419:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62644),S=n(7386),x=n(27987),h=function(d,t,e,l,i,s){e||(e={}),Array.isArray(d)||(d=[d]);var r=s.tilemapLayer;l||(l=r.scene),i||(i=l.cameras.main);var o=s.width,a=s.height,u=S(0,0,o,a,null,s),f=[],v,c=function(C,M,A){for(var R=0;R<A.length;R++){var P=A[R];C.hasOwnProperty(P)||(C[P]=M[P])}};for(v=0;v<u.length;v++){var g=u[v],p=m(e);if(d.indexOf(g.index)!==-1){var T=r.tileToWorldXY(g.x,g.y,void 0,i,s);p.x=T.x,p.y=T.y,c(p,g,["rotation","flipX","flipY","alpha","visible","tint"]),p.hasOwnProperty("origin")||(p.x+=g.width*.5,p.y+=g.height*.5),p.hasOwnProperty("useSpriteSheet")&&(p.key=g.tileset.image,p.frame=g.index-g.tileset.firstgid),f.push(l.make.sprite(p))}}if(Array.isArray(t))for(v=0;v<d.length;v++)x(d[v],t[v],0,0,o,a,s);else if(t!==null)for(v=0;v<d.length;v++)x(d[v],t,0,0,o,a,s);return f};E.exports=h},19545:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(87841),S=n(63448),x=n(56583),h=new m,d=function(t,e){var l=t.tilemapLayer.tilemap,i=t.tilemapLayer,s=Math.floor(l.tileWidth*i.scaleX),r=Math.floor(l.tileHeight*i.scaleY),o=x(e.worldView.x-i.x,s,0,!0)-i.cullPaddingX,a=S(e.worldView.right-i.x,s,0,!0)+i.cullPaddingX,u=x(e.worldView.y-i.y,r,0,!0)-i.cullPaddingY,f=S(e.worldView.bottom-i.y,r,0,!0)+i.cullPaddingY;return h.setTo(o,u,a-o,f-u)};E.exports=d},30003:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19545),S=n(32483),x=function(h,d,t,e){t===void 0&&(t=[]),e===void 0&&(e=0),t.length=0;var l=h.tilemapLayer,i=m(h,d);return(l.skipCull||l.scrollFactorX!==1||l.scrollFactorY!==1)&&(i.left=0,i.right=h.width,i.top=0,i.bottom=h.height),S(h,i,e,t),t};E.exports=x},35137:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=n(42573),x=n(20576),h=function(d,t,e,l,i,s,r){for(var o=r.collideIndexes.indexOf(d)!==-1,a=m(t,e,l,i,null,r),u=0;u<a.length;u++)a[u].index=d,x(a[u],o);s&&S(t-1,e-1,l+2,i+2,r)};E.exports=h},40253:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=function(x,h,d,t,e,l,i,s){var r=m(d,t,e,l,i,s);return r.filter(x,h)};E.exports=S},52692:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){m===void 0&&(m=0),S===void 0&&(S=!1);var h=0,d,t,e;if(S){for(t=x.height-1;t>=0;t--)for(d=x.width-1;d>=0;d--)if(e=x.data[t][d],e&&e.index===n){if(h===m)return e;h+=1}}else for(t=0;t<x.height;t++)for(d=0;d<x.width;d++)if(e=x.data[t][d],e&&e.index===n){if(h===m)return e;h+=1}return null};E.exports=y},66151:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=function(x,h,d,t,e,l,i,s){var r=m(d,t,e,l,i,s);return r.find(x,h)||null};E.exports=S},97560:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=function(x,h,d,t,e,l,i,s){var r=m(d,t,e,l,i,s);r.forEach(x,h)};E.exports=S},43305:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=n(30003),x=n(9474),h=n(14018),d=n(29747),t=n(54503),e=function(l){return l===m.ORTHOGONAL?S:l===m.HEXAGONAL?x:l===m.STAGGERED?t:l===m.ISOMETRIC?h:d};E.exports=e},7423:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62991),S=function(x,h,d,t){if(m(x,h,t)){var e=t.data[h][x]||null;return e?e.index===-1?d?e:null:e:null}else return null};E.exports=S},60540:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7423),S=n(26099),x=new S,h=function(d,t,e,l,i){return i.tilemapLayer.worldToTileXY(d,t,!0,x,l),m(x.x,x.y,e,i)};E.exports=h},55826:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t){var e=t.baseTileWidth,l=t.baseTileHeight,i=t.tilemapLayer,s=0,r=0;i&&(d||(d=i.scene.cameras.main),s=i.x+d.scrollX*(1-i.scrollFactorX),r=i.y+d.scrollY*(1-i.scrollFactorY),e*=i.scaleX,l*=i.scaleY);var o=s+x*e,a=r+h*l;return[new m(o,a),new m(o+e,a),new m(o+e,a+l),new m(o,a+l)]};E.exports=S},11758:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=n(27229),x=n(29747),h=n(55826),d=function(t){return t===m.ORTHOGONAL?h:t===m.ISOMETRIC?x:t===m.HEXAGONAL?S:(t===m.STAGGERED,x)};E.exports=d},39167:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=n(29747),x=n(97281),h=function(d){return d===m.ORTHOGONAL?x:S};E.exports=h},62e3:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=n(19951),x=n(14127),h=n(29747),d=n(97202),t=n(70326),e=function(l){return l===m.ORTHOGONAL?t:l===m.ISOMETRIC?x:l===m.HEXAGONAL?S:l===m.STAGGERED?d:h};E.exports=e},5984:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=n(29747),x=n(28054),h=n(29650),d=function(t){return t===m.ORTHOGONAL?h:t===m.STAGGERED?x:S};E.exports=d},7386:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S=function(x,h,d,t,e,l){x===void 0&&(x=0),h===void 0&&(h=0),d===void 0&&(d=l.width),t===void 0&&(t=l.height),e||(e={});var i=m(e,"isNotEmpty",!1),s=m(e,"isColliding",!1),r=m(e,"hasInterestingFace",!1);x<0&&(d+=x,x=0),h<0&&(t+=h,h=0),x+d>l.width&&(d=Math.max(l.width-x,0)),h+t>l.height&&(t=Math.max(l.height-h,0));for(var o=[],a=h;a<h+t;a++)for(var u=x;u<x+d;u++){var f=l.data[a][u];if(f!==null){if(i&&f.index===-1||s&&!f.collides||r&&!f.hasInterestingFace)continue;o.push(f)}}return o};E.exports=S},91141:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(55738),S=n(7386),x=n(91865),h=n(29747),d=n(26099),t=n(91907),e=function(o,a){return x.RectangleToTriangle(a,o)},l=new d,i=new d,s=new d,r=function(o,a,u,f){if(f.orientation!==t.ORTHOGONAL)return console.warn("GetTilesWithinShape only works with orthogonal tilemaps"),[];if(o===void 0)return[];var v=h;o instanceof m.Circle?v=x.CircleToRectangle:o instanceof m.Rectangle?v=x.RectangleToRectangle:o instanceof m.Triangle?v=e:o instanceof m.Line&&(v=x.LineToRectangle),f.tilemapLayer.worldToTileXY(o.left,o.top,!0,i,u);var c=i.x,g=i.y;f.tilemapLayer.worldToTileXY(o.right,o.bottom,!1,s,u);var p=Math.ceil(s.x),T=Math.ceil(s.y),C=Math.max(p-c,1),M=Math.max(T-g,1),A=S(c,g,C,M,a,f),R=f.tileWidth,P=f.tileHeight;f.tilemapLayer&&(R*=f.tilemapLayer.scaleX,P*=f.tilemapLayer.scaleY);for(var L=[],F=new m.Rectangle(0,0,R,P),w=0;w<A.length;w++){var O=A[w];f.tilemapLayer.tileToWorldXY(O.x,O.y,l,u),F.x=l.x,F.y=l.y,v(o,F)&&L.push(O)}return L};E.exports=r},96523:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=n(26099),x=new S,h=new S,d=function(t,e,l,i,s,r,o){var a=o.tilemapLayer.tilemap._convert.WorldToTileXY;a(t,e,!0,x,r,o);var u=x.x,f=x.y;a(t+l,e+i,!1,h,r,o);var v=Math.ceil(h.x),c=Math.ceil(h.y);return m(u,f,v-u,c-f,s,o)};E.exports=d},96113:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=n(20242),x=n(10095),h=function(d){return d===m.ORTHOGONAL?x:S};E.exports=h},16926:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=n(86625),x=n(96897),h=n(29747),d=n(15108),t=n(85896),e=function(l){return l===m.ORTHOGONAL?t:l===m.ISOMETRIC?x:l===m.HEXAGONAL?S:l===m.STAGGERED?d:h};E.exports=e},55762:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=n(20242),x=n(51900),h=n(63288),d=function(t){return t===m.ORTHOGONAL?h:t===m.STAGGERED?x:S};E.exports=d},45091:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62991),S=function(x,h,d){if(m(x,h,d)){var t=d.data[h][x];return t!==null&&t.index>-1}else return!1};E.exports=S},24152:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(45091),S=n(26099),x=new S,h=function(d,t,e,l){l.tilemapLayer.worldToTileXY(d,t,!0,x,e);var i=x.x,s=x.y;return m(i,s,l)};E.exports=h},90454:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(63448),S=n(56583),x=function(h,d){var t=h.tilemapLayer.tilemap,e=h.tilemapLayer,l=Math.floor(t.tileWidth*e.scaleX),i=Math.floor(t.tileHeight*e.scaleY),s=h.hexSideLength,r,o,a,u;if(h.staggerAxis==="y"){var f=(i-s)/2+s;r=S(d.worldView.x-e.x,l,0,!0)-e.cullPaddingX,o=m(d.worldView.right-e.x,l,0,!0)+e.cullPaddingX,a=S(d.worldView.y-e.y,f,0,!0)-e.cullPaddingY,u=m(d.worldView.bottom-e.y,f,0,!0)+e.cullPaddingY}else{var v=(l-s)/2+s;r=S(d.worldView.x-e.x,v,0,!0)-e.cullPaddingX,o=m(d.worldView.right-e.x,v,0,!0)+e.cullPaddingX,a=S(d.worldView.y-e.y,i,0,!0)-e.cullPaddingY,u=m(d.worldView.bottom-e.y,i,0,!0)+e.cullPaddingY}return{left:r,right:o,top:a,bottom:u}};E.exports=x},9474:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(90454),S=n(32483),x=function(h,d,t,e){t===void 0&&(t=[]),e===void 0&&(e=0),t.length=0;var l=h.tilemapLayer,i=m(h,d);return l.skipCull&&l.scrollFactorX===1&&l.scrollFactorY===1&&(i.left=0,i.right=h.width,i.top=0,i.bottom=h.height),S(h,i,e,t),t};E.exports=x},27229:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19951),S=n(26099),x=new S,h=function(d,t,e,l){var i=l.baseTileWidth,s=l.baseTileHeight,r=l.tilemapLayer;r&&(i*=r.scaleX,s*=r.scaleY);var o=m(d,t,x,e,l),a=[],u=.5773502691896257,f,v;l.staggerAxis==="y"?(f=u*i,v=s/2):(f=i/2,v=u*s);for(var c=0;c<6;c++){var g=2*Math.PI*(.5-c)/6;a.push(new S(o.x+f*Math.cos(g),o.y+v*Math.sin(g)))}return a};E.exports=h},19951:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e){d||(d=new m);var l=e.baseTileWidth,i=e.baseTileHeight,s=e.tilemapLayer,r=0,o=0;s&&(t||(t=s.scene.cameras.main),r=s.x+t.scrollX*(1-s.scrollFactorX),o=s.y+t.scrollY*(1-s.scrollFactorY),l*=s.scaleX,i*=s.scaleY);var a=l/2,u=i/2,f,v,c=e.staggerAxis,g=e.staggerIndex;return c==="y"?(f=r+l*x+l,v=o+1.5*h*u+u,h%2===0&&(g==="odd"?f-=a:f+=a)):c==="x"&&g==="odd"&&(f=r+1.5*x*a+a,v=o+i*x+i,x%2===0&&(g==="odd"?v-=u:v+=u)),d.set(f,v)};E.exports=S},86625:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e,l){t||(t=new m);var i=l.baseTileWidth,s=l.baseTileHeight,r=l.tilemapLayer;r&&(e||(e=r.scene.cameras.main),x=x-(r.x+e.scrollX*(1-r.scrollFactorX)),h=h-(r.y+e.scrollY*(1-r.scrollFactorY)),i*=r.scaleX,s*=r.scaleY);var o=.5773502691896257,a=-.3333333333333333,u=0,f=.6666666666666666,v=i/2,c=s/2,g,p,T,C,M;l.staggerAxis==="y"?(g=(x-v)/(o*i),p=(h-c)/c,T=o*g+a*p,C=u*g+f*p):(g=(x-v)/v,p=(h-c)/(o*s),T=a*g+o*p,C=f*g+u*p),M=-T-C;var A=Math.round(T),R=Math.round(C),P=Math.round(M),L=Math.abs(A-T),F=Math.abs(R-C),w=Math.abs(P-M);L>F&&L>w?A=-R-P:F>w&&(R=-A-P);var O,B=R;return l.staggerIndex==="odd"?O=B%2===0?R/2+A:R/2+A-.5:O=B%2===0?R/2+A:R/2+A+.5,t.set(O,B)};E.exports=S},62991:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n>=0&&n<S.width&&m>=0&&m<S.height};E.exports=y},14018:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(33528),S=function(x,h,d,t){d===void 0&&(d=[]),t===void 0&&(t=0),d.length=0;var e=x.tilemapLayer,l=x.data,i=x.width,s=x.height,r=e.skipCull,o=0,a=i,u=0,f=s,v,c,g;if(t===0)for(c=u;c<f;c++)for(v=o;v<a;v++)g=l[c][v],!(!g||g.index===-1||!g.visible||g.alpha===0)&&(!r&&!m(v,c,x,h)||d.push(g));else if(t===1)for(c=u;c<f;c++)for(v=a;v>=o;v--)g=l[c][v],!(!g||g.index===-1||!g.visible||g.alpha===0)&&(!r&&!m(v,c,x,h)||d.push(g));else if(t===2)for(c=f;c>=u;c--)for(v=o;v<a;v++)g=l[c][v],!(!g||g.index===-1||!g.visible||g.alpha===0)&&(!r&&!m(v,c,x,h)||d.push(g));else if(t===3)for(c=f;c>=u;c--)for(v=a;v>=o;v--)g=l[c][v],!(!g||g.index===-1||!g.visible||g.alpha===0)&&(!r&&!m(v,c,x,h)||d.push(g));return e.tilesDrawn=d.length,e.tilesTotal=i*s,d};E.exports=S},14127:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e){d||(d=new m);var l=e.baseTileWidth,i=e.baseTileHeight,s=e.tilemapLayer,r=0,o=0;s&&(t||(t=s.scene.cameras.main),r=s.x+t.scrollX*(1-s.scrollFactorX),l*=s.scaleX,o=s.y+t.scrollY*(1-s.scrollFactorY),i*=s.scaleY);var a=r+(x-h)*(l/2),u=o+(x+h)*(i/2);return d.set(a,u)};E.exports=S},96897:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e,l,i){t||(t=new m);var s=l.baseTileWidth,r=l.baseTileHeight,o=l.tilemapLayer;o&&(e||(e=o.scene.cameras.main),h=h-(o.y+e.scrollY*(1-o.scrollFactorY)),r*=o.scaleY,x=x-(o.x+e.scrollX*(1-o.scrollFactorX)),s*=o.scaleX);var a=s/2,u=r/2;x=x-a,i||(h=h-r);var f=.5*(x/a+h/u),v=.5*(-x/a+h/u);return d&&(f=Math.floor(f),v=Math.floor(v)),t.set(f,v)};E.exports=S},71558:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(23029),S=n(62991),x=n(72023),h=n(20576),d=function(t,e,l,i,s){if(i===void 0&&(i=!0),!S(e,l,s))return null;var r,o=s.data[l][e],a=o&&o.collides;t instanceof m?(s.data[l][e]===null&&(s.data[l][e]=new m(s,t.index,e,l,s.tileWidth,s.tileHeight)),s.data[l][e].copy(t)):(r=t,s.data[l][e]===null?s.data[l][e]=new m(s,r,e,l,s.tileWidth,s.tileHeight):s.data[l][e].index=r);var u=s.data[l][e],f=s.collideIndexes.indexOf(u.index)!==-1;if(r=t instanceof m?t.index:t,r===-1)u.width=s.tileWidth,u.height=s.tileHeight;else{var v=s.tilemapLayer.tilemap,c=v.tiles,g=c[r][2],p=v.tilesets[g];u.width=p.tileWidth,u.height=p.tileHeight}return h(u,f),i&&a!==u.collides&&x(e,l,s),u};E.exports=d},26303:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(71558),S=n(26099),x=new S,h=function(d,t,e,l,i,s){return s.tilemapLayer.worldToTileXY(t,e,!0,x,i,s),m(d,x.x,x.y,l,s)};E.exports=h},14051:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(42573),S=n(71558),x=function(h,d,t,e,l){if(e===void 0&&(e=!0),!Array.isArray(h))return null;Array.isArray(h[0])||(h=[h]);for(var i=h.length,s=h[0].length,r=0;r<i;r++)for(var o=0;o<s;o++){var a=h[r][o];S(a,d+o,t+r,!1,l)}e&&m(d-1,t-1,s+2,i+2,l)};E.exports=x},77389:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=n(26546),x=function(h,d,t,e,l,i){var s,r=m(h,d,t,e,{},i);if(!l)for(l=[],s=0;s<r.length;s++)l.indexOf(r[s].index)===-1&&l.push(r[s].index);for(s=0;s<r.length;s++)r[s].index=S(l)};E.exports=x},63557:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(23029),S=n(62991),x=n(72023),h=function(d,t,e,l,i){if(e===void 0&&(e=!0),l===void 0&&(l=!0),!S(d,t,i))return null;var s=i.data[t][d];if(s)i.data[t][d]=e?null:new m(i,-1,d,t,i.tileWidth,i.tileHeight);else return null;return l&&s&&s.collides&&x(d,t,i),s};E.exports=h},94178:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(63557),S=n(26099),x=new S,h=function(d,t,e,l,i,s){return s.tilemapLayer.worldToTileXY(d,t,!0,x,i,s),m(x.x,x.y,e,l,s)};E.exports=h},15533:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=n(3956),x=new S(105,210,231,150),h=new S(243,134,48,200),d=new S(40,39,37,150),t=function(e,l,i){l===void 0&&(l={});var s=l.tileColor!==void 0?l.tileColor:x,r=l.collidingTileColor!==void 0?l.collidingTileColor:h,o=l.faceColor!==void 0?l.faceColor:d,a=m(0,0,i.width,i.height,null,i);e.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),e.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var u=0;u<a.length;u++){var f=a[u],v=f.tileset?f.tileset.tileOffset:{x:0,y:0},c=f.width,g=f.height,p=f.pixelX-v.x,T=f.pixelY-v.y,C=f.collides?r:s;C!==null&&(e.fillStyle(C.color,C.alpha/255),e.fillRect(p,T,c,g)),p+=1,T+=1,c-=2,g-=2,o!==null&&(e.lineStyle(1,o.color,o.alpha/255),f.faceTop&&e.lineBetween(p,T,p+c,T),f.faceRight&&e.lineBetween(p+c,T,p+c,T+g),f.faceBottom&&e.lineBetween(p,T+g,p+c,T+g),f.faceLeft&&e.lineBetween(p,T,p,T+g))}};E.exports=t},27987:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=function(x,h,d,t,e,l,i){for(var s=m(d,t,e,l,null,i),r=0;r<s.length;r++)s[r]&&s[r].index===x&&(s[r].index=h)};E.exports=S},32483:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=n.data,d=n.width,t=n.height,e=n.tilemapLayer,l=Math.max(0,m.left),i=Math.min(d,m.right),s=Math.max(0,m.top),r=Math.min(t,m.bottom),o,a,u;if(S===0)for(a=s;a<r;a++)for(o=l;h[a]&&o<i;o++)u=h[a][o],!(!u||u.index===-1||!u.visible||u.alpha===0)&&x.push(u);else if(S===1)for(a=s;a<r;a++)for(o=i;h[a]&&o>=l;o--)u=h[a][o],!(!u||u.index===-1||!u.visible||u.alpha===0)&&x.push(u);else if(S===2)for(a=r;a>=s;a--)for(o=l;h[a]&&o<i;o++)u=h[a][o],!(!u||u.index===-1||!u.visible||u.alpha===0)&&x.push(u);else if(S===3)for(a=r;a>=s;a--)for(o=i;h[a]&&o>=l;o--)u=h[a][o],!(!u||u.index===-1||!u.visible||u.alpha===0)&&x.push(u);return e.tilesDrawn=x.length,e.tilesTotal=d*t,x};E.exports=y},57068:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20576),S=n(42573),x=n(9589),h=function(d,t,e,l,i){t===void 0&&(t=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),Array.isArray(d)||(d=[d]);for(var s=0;s<d.length;s++)x(d[s],t,l);if(i)for(var r=0;r<l.height;r++)for(var o=0;o<l.width;o++){var a=l.data[r][o];a&&d.indexOf(a.index)!==-1&&m(a,t)}e&&S(0,0,l.width,l.height,l)};E.exports=h},37266:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20576),S=n(42573),x=n(9589),h=function(d,t,e,l,i,s){if(e===void 0&&(e=!0),l===void 0&&(l=!0),s===void 0&&(s=!0),!(d>t)){for(var r=d;r<=t;r++)x(r,e,i);if(s)for(var o=0;o<i.height;o++)for(var a=0;a<i.width;a++){var u=i.data[o][a];u&&u.index>=d&&u.index<=t&&m(u,e)}l&&S(0,0,i.width,i.height,i)}};E.exports=h},75661:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20576),S=n(42573),x=n(9589),h=function(d,t,e,l){t===void 0&&(t=!0),e===void 0&&(e=!0),Array.isArray(d)||(d=[d]);for(var i=0;i<l.height;i++)for(var s=0;s<l.width;s++){var r=l.data[i][s];r&&d.indexOf(r.index)===-1&&(m(r,t),x(r.index,t,l))}e&&S(0,0,l.width,l.height,l)};E.exports=h},64740:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20576),S=n(42573),x=n(97022),h=function(d,t,e,l){t===void 0&&(t=!0),e===void 0&&(e=!0);for(var i=0;i<l.height;i++)for(var s=0;s<l.width;s++){var r=l.data[i][s];if(r){for(var o in d)if(x(r.properties,o)){var a=d[o];Array.isArray(a)||(a=[a]);for(var u=0;u<a.length;u++)r.properties[o]===a[u]&&m(r,t)}}}e&&S(0,0,l.width,l.height,l)};E.exports=h},63307:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(20576),S=n(42573),x=function(h,d,t){h===void 0&&(h=!0),d===void 0&&(d=!0);for(var e=0;e<t.height;e++)for(var l=0;l<t.width;l++){var i=t.data[e][l];if(i){var s=i.getCollisionGroup();s&&s.objects&&s.objects.length>0&&m(i,h)}}d&&S(0,0,t.width,t.height,t)};E.exports=x},9589:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=S.collideIndexes.indexOf(n);m&&x===-1?S.collideIndexes.push(n):!m&&x!==-1&&S.collideIndexes.splice(x,1)};E.exports=y},20576:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m?n.setCollision(!0,!0,!0,!0,!1):n.resetCollision(!1)};E.exports=y},79583:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){if(typeof n=="number")x.callbacks[n]=m!==null?{callback:m,callbackContext:S}:void 0;else for(var h=0,d=n.length;h<d;h++)x.callbacks[n[h]]=m!==null?{callback:m,callbackContext:S}:void 0};E.exports=y},93254:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=function(x,h,d,t,e,l,i){for(var s=m(x,h,d,t,null,i),r=0;r<s.length;r++)s[r].setCollisionCallback(e,l)};E.exports=S},32903:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=n(33680),x=function(h,d,t,e,l){var i=m(h,d,t,e,null,l),s=i.map(function(o){return o.index});S(s);for(var r=0;r<i.length;r++)i[r].index=s[r]};E.exports=x},61325:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(63448),S=n(56583),x=function(h,d){var t=h.tilemapLayer.tilemap,e=h.tilemapLayer,l=Math.floor(t.tileWidth*e.scaleX),i=Math.floor(t.tileHeight*e.scaleY),s=S(d.worldView.x-e.x,l,0,!0)-e.cullPaddingX,r=m(d.worldView.right-e.x,l,0,!0)+e.cullPaddingX,o=S(d.worldView.y-e.y,i/2,0,!0)-e.cullPaddingY,a=m(d.worldView.bottom-e.y,i/2,0,!0)+e.cullPaddingY;return{left:s,right:r,top:o,bottom:a}};E.exports=x},54503:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(61325),S=n(32483),x=function(h,d,t,e){t===void 0&&(t=[]),e===void 0&&(e=0),t.length=0;var l=h.tilemapLayer,i=m(h,d);return l.skipCull&&l.scrollFactorX===1&&l.scrollFactorY===1&&(i.left=0,i.right=h.width,i.top=0,i.bottom=h.height),S(h,i,e,t),t};E.exports=x},97202:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e){d||(d=new m);var l=e.baseTileWidth,i=e.baseTileHeight,s=e.tilemapLayer,r=0,o=0;s&&(t||(t=s.scene.cameras.main),r=s.x+t.scrollX*(1-s.scrollFactorX),l*=s.scaleX,o=s.y+t.scrollY*(1-s.scrollFactorY),i*=s.scaleY);var a=r+x*l+h%2*(l/2),u=o+h*(i/2);return d.set(a,u)};E.exports=S},28054:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=S.baseTileHeight,h=S.tilemapLayer,d=0;return h&&(m===void 0&&(m=h.scene.cameras.main),d=h.y+m.scrollY*(1-h.scrollFactorY),x*=h.scaleY),d+n*(x/2)+x};E.exports=y},15108:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e,l){t||(t=new m);var i=l.baseTileWidth,s=l.baseTileHeight,r=l.tilemapLayer;r&&(e||(e=r.scene.cameras.main),h=h-(r.y+e.scrollY*(1-r.scrollFactorY)),s*=r.scaleY,x=x-(r.x+e.scrollX*(1-r.scrollFactorX)),i*=r.scaleX);var o=d?Math.floor(h/(s/2)):h/(s/2),a=d?Math.floor((x+o%2*.5*i)/i):(x+o%2*.5*i)/i;return t.set(a,o)};E.exports=S},51900:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=x.baseTileHeight,d=x.tilemapLayer;return d&&(S||(S=d.scene.cameras.main),n=n-(d.y+S.scrollY*(1-d.scrollFactorY)),h*=d.scaleY),m?Math.floor(n/(h/2)):n/(h/2)};E.exports=y},86560:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=function(x,h,d,t,e,l,i){for(var s=m(d,t,e,l,null,i),r=0;r<s.length;r++)s[r]&&(s[r].index===x?s[r].index=h:s[r].index===h&&(s[r].index=x))};E.exports=S},97281:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=S.baseTileWidth,h=S.tilemapLayer,d=0;return h&&(m||(m=h.scene.cameras.main),d=h.x+m.scrollX*(1-h.scrollFactorX),x*=h.scaleX),d+n*x};E.exports=y},70326:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(97281),S=n(29650),x=n(26099),h=function(d,t,e,l,i){return e||(e=new x(0,0)),e.x=m(d,l,i),e.y=S(t,l,i),e};E.exports=h},29650:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=S.baseTileHeight,h=S.tilemapLayer,d=0;return h&&(m||(m=h.scene.cameras.main),d=h.y+m.scrollY*(1-h.scrollFactorY),x*=h.scaleY),d+n*x};E.exports=y},77366:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(7386),S=n(75508),x=function(h,d,t,e,l,i){if(l){var s,r=m(h,d,t,e,null,i),o=0;for(s=0;s<l.length;s++)o+=l[s].weight;if(!(o<=0))for(s=0;s<r.length;s++){for(var a=S.RND.frac()*o,u=0,f=-1,v=0;v<l.length;v++)if(u+=l[v].weight,a<=u){var c=l[v].index;f=Array.isArray(c)?c[Math.floor(S.RND.frac()*c.length)]:c;break}r[s].index=f}}};E.exports=x},10095:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(85896),S=n(26099),x=new S,h=function(d,t,e,l){return m(d,0,t,x,e,l),x.x};E.exports=h},85896:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(26099),S=function(x,h,d,t,e,l){d===void 0&&(d=!0),t||(t=new m);var i=l.baseTileWidth,s=l.baseTileHeight,r=l.tilemapLayer;r&&(e||(e=r.scene.cameras.main),x=x-(r.x+e.scrollX*(1-r.scrollFactorX)),h=h-(r.y+e.scrollY*(1-r.scrollFactorY)),i*=r.scaleX,s*=r.scaleY);var o=x/i,a=h/s;return d&&(o=Math.floor(o),a=Math.floor(a)),t.set(o,a)};E.exports=S},63288:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(85896),S=n(26099),x=new S,h=function(d,t,e,l){return m(0,d,t,x,e,l),x.y};E.exports=h},81086:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CalculateFacesAt:n(72023),CalculateFacesWithin:n(42573),CheckIsoBounds:n(33528),Copy:n(1785),CreateFromTiles:n(78419),CullBounds:n(19545),CullTiles:n(30003),Fill:n(35137),FilterTiles:n(40253),FindByIndex:n(52692),FindTile:n(66151),ForEachTile:n(97560),GetCullTilesFunction:n(43305),GetTileAt:n(7423),GetTileAtWorldXY:n(60540),GetTileCorners:n(55826),GetTileCornersFunction:n(11758),GetTilesWithin:n(7386),GetTilesWithinShape:n(91141),GetTilesWithinWorldXY:n(96523),GetTileToWorldXFunction:n(39167),GetTileToWorldXYFunction:n(62e3),GetTileToWorldYFunction:n(5984),GetWorldToTileXFunction:n(96113),GetWorldToTileXYFunction:n(16926),GetWorldToTileYFunction:n(55762),HasTileAt:n(45091),HasTileAtWorldXY:n(24152),HexagonalCullBounds:n(90454),HexagonalCullTiles:n(9474),HexagonalGetTileCorners:n(27229),HexagonalTileToWorldXY:n(19951),HexagonalWorldToTileXY:n(86625),IsInLayerBounds:n(62991),IsometricCullTiles:n(14018),IsometricTileToWorldXY:n(14127),IsometricWorldToTileXY:n(96897),PutTileAt:n(71558),PutTileAtWorldXY:n(26303),PutTilesAt:n(14051),Randomize:n(77389),RemoveTileAt:n(63557),RemoveTileAtWorldXY:n(94178),RenderDebug:n(15533),ReplaceByIndex:n(27987),RunCull:n(32483),SetCollision:n(57068),SetCollisionBetween:n(37266),SetCollisionByExclusion:n(75661),SetCollisionByProperty:n(64740),SetCollisionFromCollisionGroup:n(63307),SetLayerCollisionIndex:n(9589),SetTileCollision:n(20576),SetTileIndexCallback:n(79583),SetTileLocationCallback:n(93254),Shuffle:n(32903),StaggeredCullBounds:n(61325),StaggeredCullTiles:n(54503),StaggeredTileToWorldXY:n(97202),StaggeredTileToWorldY:n(28054),StaggeredWorldToTileXY:n(15108),StaggeredWorldToTileY:n(51900),SwapByIndex:n(86560),TileToWorldX:n(97281),TileToWorldXY:n(70326),TileToWorldY:n(29650),WeightedRandomize:n(77366),WorldToTileX:n(10095),WorldToTileXY:n(85896),WorldToTileY:n(63288)}},91907:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={ORIENTATION:n(91907)};E.exports=m},62501:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(79291),S=n(21829),x={Components:n(81086),Parsers:n(57442),Formats:n(80341),ImageCollection:n(16536),ParseToTilemap:n(31989),Tile:n(23029),Tilemap:n(49075),TilemapCreator:n(45939),TilemapFactory:n(46029),Tileset:n(33629),TilemapLayerBase:n(44731),TilemapLayer:n(20442),TilemapGPULayer:n(53180),Orientation:n(91907),LayerData:n(14977),MapData:n(87010),ObjectLayer:n(48700)};x=m(!1,x,S.ORIENTATION),E.exports=x},14977:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(91907),x=n(95540),h=new m({initialize:function(t){t===void 0&&(t={}),this.name=x(t,"name","layer"),this.id=x(t,"id",0),this.x=x(t,"x",0),this.y=x(t,"y",0),this.width=x(t,"width",0),this.height=x(t,"height",0),this.tileWidth=x(t,"tileWidth",0),this.tileHeight=x(t,"tileHeight",0),this.baseTileWidth=x(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=x(t,"baseTileHeight",this.tileHeight),this.orientation=x(t,"orientation",S.ORTHOGONAL),this.widthInPixels=x(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=x(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=x(t,"alpha",1),this.visible=x(t,"visible",!0),this.properties=x(t,"properties",[]),this.indexes=x(t,"indexes",[]),this.collideIndexes=x(t,"collideIndexes",[]),this.callbacks=x(t,"callbacks",[]),this.bodies=x(t,"bodies",[]),this.data=x(t,"data",[]),this.tilemapLayer=x(t,"tilemapLayer",null),this.hexSideLength=x(t,"hexSideLength",0),this.staggerAxis=x(t,"staggerAxis","y"),this.staggerIndex=x(t,"staggerIndex","odd")}});E.exports=h},87010:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(91907),x=n(95540),h=new m({initialize:function(t){t===void 0&&(t={}),this.name=x(t,"name","map"),this.width=x(t,"width",0),this.height=x(t,"height",0),this.infinite=x(t,"infinite",!1),this.tileWidth=x(t,"tileWidth",0),this.tileHeight=x(t,"tileHeight",0),this.widthInPixels=x(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=x(t,"heightInPixels",this.height*this.tileHeight),this.format=x(t,"format",null),this.orientation=x(t,"orientation",S.ORTHOGONAL),this.renderOrder=x(t,"renderOrder","right-down"),this.version=x(t,"version","1"),this.properties=x(t,"properties",{}),this.layers=x(t,"layers",[]),this.images=x(t,"images",[]),this.objects=x(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=x(t,"collision",{}),this.tilesets=x(t,"tilesets",[]),this.imageCollections=x(t,"imageCollections",[]),this.tiles=x(t,"tiles",[]),this.hexSideLength=x(t,"hexSideLength",0),this.staggerAxis=x(t,"staggerAxis","y"),this.staggerIndex=x(t,"staggerIndex","odd")}});E.exports=h},48700:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(95540),x=new m({initialize:function(d){d===void 0&&(d={}),this.name=S(d,"name","object layer"),this.id=S(d,"id",0),this.opacity=S(d,"opacity",1),this.properties=S(d,"properties",{}),this.propertyTypes=S(d,"propertytypes",{}),this.type=S(d,"type","objectgroup"),this.visible=S(d,"visible",!0),this.objects=S(d,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});E.exports=x},6641:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(91907),S=function(x){return x=x.toLowerCase(),x==="isometric"?m.ISOMETRIC:x==="staggered"?m.STAGGERED:x==="hexagonal"?m.HEXAGONAL:m.ORTHOGONAL};E.exports=S},46177:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(80341),S=n(2342),x=n(82593),h=n(46594),d=n(87021),t=function(e,l,i,s,r,o){var a;switch(l){case m.ARRAY_2D:a=S(e,i,s,r,o);break;case m.CSV:a=x(e,i,s,r,o);break;case m.TILED_JSON:a=h(e,i,o);break;case m.WELTMEISTER:a=d(e,i,o);break;default:console.warn("Unrecognized tilemap data format: "+l),a=null}return a};E.exports=t},2342:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(80341),S=n(14977),x=n(87010),h=n(23029),d=function(t,e,l,i,s){for(var r=new S({tileWidth:l,tileHeight:i}),o=new x({name:t,tileWidth:l,tileHeight:i,format:m.ARRAY_2D,layers:[r]}),a=[],u=e.length,f=0,v=0;v<e.length;v++){a[v]=[];for(var c=e[v],g=0;g<c.length;g++){var p=parseInt(c[g],10);isNaN(p)||p===-1?a[v][g]=s?null:new h(r,-1,g,v,l,i):a[v][g]=new h(r,p,g,v,l,i)}f===0&&(f=c.length)}return o.width=r.width=f,o.height=r.height=u,o.widthInPixels=r.widthInPixels=f*l,o.heightInPixels=r.heightInPixels=u*i,r.data=a,o};E.exports=d},82593:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(80341),S=n(2342),x=function(h,d,t,e,l){var i=d.trim().split(`
|
||
`).map(function(r){return r.split(",")}),s=S(h,i,t,e,l);return s.format=m.CSV,s};E.exports=x},6656:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(14977),S=n(23029),x=function(h,d){for(var t=[],e=0;e<h.layer.length;e++){for(var l=h.layer[e],i=new m({name:l.name,width:l.width,height:l.height,tileWidth:l.tilesize,tileHeight:l.tilesize,visible:l.visible===1}),s=[],r=[],o=0;o<l.data.length;o++){for(var a=0;a<l.data[o].length;a++){var u=l.data[o][a]-1,f;u>-1?f=new S(i,u,a,o,l.tilesize,l.tilesize):f=d?null:new S(i,-1,a,o,l.tilesize,l.tilesize),s.push(f)}r.push(s),s=[]}i.data=r,t.push(i)}return t};E.exports=x},96483:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(33629),S=function(x){for(var h=[],d=[],t=0;t<x.layer.length;t++){var e=x.layer[t],l=e.tilesetName;l!==""&&d.indexOf(l)===-1&&(d.push(l),h.push(new m(l,0,e.tilesize,e.tilesize,0,0)))}return h};E.exports=S},87021:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(80341),S=n(87010),x=n(6656),h=n(96483),d=function(t,e,l){if(e.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var i=0,s=0,r=0;r<e.layer.length;r++)e.layer[r].width>i&&(i=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new S({width:i,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:m.WELTMEISTER});return o.layers=x(e,l),o.tilesets=h(e),o};E.exports=d},52833:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ParseTileLayers:n(6656),ParseTilesets:n(96483),ParseWeltmeister:n(87021)}},57442:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={FromOrientationString:n(6641),Parse:n(46177),Parse2DArray:n(2342),ParseCSV:n(82593),Impact:n(52833),Tiled:n(96761)}},51233:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(79291),S=function(x){for(var h,d,t,e,l,i=0;i<x.layers.length;i++){h=x.layers[i],e=null;for(var s=0;s<h.data.length;s++){l=h.data[s];for(var r=0;r<l.length;r++)d=l[r],!(d===null||d.index<0)&&(t=x.tiles[d.index][2],e=x.tilesets[t],d.width=e.tileWidth,d.height=e.tileHeight,e.tileProperties&&e.tileProperties[d.index-e.firstgid]&&(d.properties=m(d.properties,e.tileProperties[d.index-e.firstgid])))}}};E.exports=S},41868:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){for(var m=window.atob(n),S=m.length,x=new Array(S/4),h=0;h<S;h+=4)x[h/4]=(m.charCodeAt(h)|m.charCodeAt(h+1)<<8|m.charCodeAt(h+2)<<16|m.charCodeAt(h+3)<<24)>>>0;return x};E.exports=y},84101:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(33629),S=function(x){var h,d,t=[];for(h=0;h<x.imageCollections.length;h++)for(var e=x.imageCollections[h],l=e.images,i=0;i<l.length;i++){var s=l[i],r={x:0,y:s.height-x.tileHeight};d=new m(s.image,s.gid,s.width,s.height,0,0,void 0,void 0,r),d.updateTileData(s.width,s.height),x.tilesets.push(d)}for(h=0;h<x.tilesets.length;h++){d=x.tilesets[h];for(var o=d.tileMargin,a=d.tileMargin,u=0,f=0,v=0,c=d.firstgid;c<d.firstgid+d.total&&(t[c]=[o,a,h],o+=d.tileWidth+d.tileSpacing,u++,!(u===d.total||(f++,f===d.columns&&(o=d.tileMargin,a+=d.tileHeight+d.tileSpacing,f=0,v++,v===d.rows))));c++);}return t};E.exports=S},79677:(E,y,n)=>{/**
|
||
* @author Seth Berrier <berriers@uwstout.edu>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S=function(x,h,d){if(!h)return{i:0,layers:x.layers,name:"",opacity:1,visible:!0,x:0,y:0};var t=h.x+m(h,"startx",0)*x.tilewidth+m(h,"offsetx",0),e=h.y+m(h,"starty",0)*x.tileheight+m(h,"offsety",0);return{i:0,layers:h.layers,name:d.name+h.name+"/",opacity:d.opacity*h.opacity,visible:d.visible&&h.visible,x:d.x+t,y:d.y+e}};E.exports=S},29920:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=2147483648,n=1073741824,m=536870912,S=function(x){var h=!!(x&y),d=!!(x&n),t=!!(x&m);x=x&536870911;var e=0,l=!1;return h&&d&&t?(e=Math.PI/2,l=!0):h&&d&&!t?(e=Math.PI,l=!1):h&&!d&&t?(e=Math.PI/2,l=!1):h&&!d&&!t?(e=0,l=!0):!h&&d&&t?(e=3*Math.PI/2,l=!1):!h&&d&&!t?(e=Math.PI,l=!0):!h&&!d&&t?(e=3*Math.PI/2,l=!0):!h&&!d&&!t&&(e=0,l=!1),{gid:x,flippedHorizontal:h,flippedVertical:d,flippedAntiDiagonal:t,rotation:e,flipped:l}};E.exports=S},12635:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S=n(79677),x=function(h){for(var d=[],t=[],e=S(h);e.i<e.layers.length||t.length>0;){if(e.i>=e.layers.length){if(t.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}e=t.pop();continue}var l=e.layers[e.i];if(e.i++,l.type!=="imagelayer"){if(l.type==="group"){var i=S(h,l,e);t.push(e),e=i}continue}var s=m(l,"offsetx",0)+m(l,"startx",0),r=m(l,"offsety",0)+m(l,"starty",0);d.push({name:e.name+l.name,image:l.image,x:e.x+s+l.x,y:e.y+r+l.y,alpha:e.opacity*l.opacity,visible:e.visible&&l.visible,properties:m(l,"properties",{})})}return d};E.exports=x},46594:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(51233),S=n(84101),x=n(91907),h=n(62644),d=n(80341),t=n(6641),e=n(87010),l=n(12635),i=n(22611),s=n(28200),r=n(24619),o=function(a,u,f){var v=h(u),c=new e({width:v.width,height:v.height,name:a,tileWidth:v.tilewidth,tileHeight:v.tileheight,orientation:t(v.orientation),format:d.TILED_JSON,version:v.version,properties:v.properties,renderOrder:v.renderorder,infinite:v.infinite});if(c.orientation===x.HEXAGONAL)if(c.hexSideLength=v.hexsidelength,c.staggerAxis=v.staggeraxis,c.staggerIndex=v.staggerindex,c.staggerAxis==="y"){var g=(c.tileHeight-c.hexSideLength)/2;c.widthInPixels=c.tileWidth*(c.width+.5),c.heightInPixels=c.height*(c.hexSideLength+g)+g}else{var p=(c.tileWidth-c.hexSideLength)/2;c.widthInPixels=c.width*(c.hexSideLength+p)+p,c.heightInPixels=c.tileHeight*(c.height+.5)}c.layers=s(v,f),c.images=l(v);var T=r(v);return c.tilesets=T.tilesets,c.imageCollections=T.imageCollections,c.objects=i(v),c.tiles=S(c),m(c),c};E.exports=o},52205:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(18254),S=n(29920),x=function(t){return{x:t.x,y:t.y}},h=["id","name","type","rotation","properties","visible","x","y","width","height"],d=function(t,e,l){e===void 0&&(e=0),l===void 0&&(l=0);var i=m(t,h);if(i.x+=e,i.y+=l,t.gid){var s=S(t.gid);i.gid=s.gid,i.flippedHorizontal=s.flippedHorizontal,i.flippedVertical=s.flippedVertical,i.flippedAntiDiagonal=s.flippedAntiDiagonal}else t.polyline?i.polyline=t.polyline.map(x):t.polygon?i.polygon=t.polygon.map(x):t.ellipse?i.ellipse=t.ellipse:t.text?i.text=t.text:t.point?i.point=!0:i.rectangle=!0;return i};E.exports=d},22611:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95540),S=n(52205),x=n(48700),h=n(79677),d=function(t){for(var e=[],l=[],i=h(t);i.i<i.layers.length||l.length>0;){if(i.i>=i.layers.length){if(l.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=l.pop();continue}var s=i.layers[i.i];if(i.i++,s.opacity*=i.opacity,s.visible=i.visible&&s.visible,s.type!=="objectgroup"){if(s.type==="group"){var r=h(t,s,i);l.push(i),i=r}continue}s.name=i.name+s.name;for(var o=i.x+m(s,"startx",0)+m(s,"offsetx",0),a=i.y+m(s,"starty",0)+m(s,"offsety",0),u=[],f=0;f<s.objects.length;f++){var v=S(s.objects[f],o,a);u.push(v)}var c=new x(s);c.objects=u,e.push(c)}return e};E.exports=d},28200:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(41868),S=n(91907),x=n(79677),h=n(6641),d=n(95540),t=n(14977),e=n(29920),l=n(23029),i=function(s,r){for(var o=d(s,"infinite",!1),a=[],u=[],f=x(s);f.i<f.layers.length||u.length>0;){if(f.i>=f.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=u.pop();continue}var v=f.layers[f.i];if(f.i++,v.type!=="tilelayer"){if(v.type==="group"){var c=x(s,v,f);u.push(f),f=c}continue}if(v.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+v.name+"'");continue}else if(v.encoding&&v.encoding==="base64"){if(v.chunks)for(var g=0;g<v.chunks.length;g++)v.chunks[g].data=m(v.chunks[g].data);v.data&&(v.data=m(v.data)),delete v.encoding}var p,T,C,M,A,R,P=[],L=0;if(o){var F=d(v,"startx",0)+v.x,w=d(v,"starty",0)+v.y;p=new t({name:f.name+v.name,id:v.id,x:f.x+d(v,"offsetx",0)+F*s.tilewidth,y:f.y+d(v,"offsety",0)+w*s.tileheight,width:v.width,height:v.height,tileWidth:s.tilewidth,tileHeight:s.tileheight,alpha:f.opacity*v.opacity,visible:f.visible&&v.visible,properties:d(v,"properties",[]),orientation:h(s.orientation)}),p.orientation===S.HEXAGONAL&&(p.hexSideLength=s.hexsidelength,p.staggerAxis=s.staggeraxis,p.staggerIndex=s.staggerindex,p.staggerAxis==="y"?(A=(p.tileHeight-p.hexSideLength)/2,p.widthInPixels=p.tileWidth*(p.width+.5),p.heightInPixels=p.height*(p.hexSideLength+A)+A):(R=(p.tileWidth-p.hexSideLength)/2,p.widthInPixels=p.width*(p.hexSideLength+R)+R,p.heightInPixels=p.tileHeight*(p.height+.5)));for(var O=0;O<v.height;O++){P[O]=[null];for(var B=0;B<v.width;B++)P[O][B]=null}for(O=0,H=v.chunks.length;O<H;O++)for(var I=v.chunks[O],D=I.x-F,N=I.y-w,z=0,V=0,U=I.data.length;V<U;V++){var G=L+D,b=z+N;T=e(I.data[V]),T.gid>0?(C=new l(p,T.gid,G,b,s.tilewidth,s.tileheight),C.rotation=T.rotation,C.flipX=T.flipped,P[b][G]=C):(M=r?null:new l(p,-1,G,b,s.tilewidth,s.tileheight),P[b][G]=M),L++,L===I.width&&(z++,L=0)}}else{p=new t({name:f.name+v.name,id:v.id,x:f.x+d(v,"offsetx",0)+v.x,y:f.y+d(v,"offsety",0)+v.y,width:v.width,height:v.height,tileWidth:s.tilewidth,tileHeight:s.tileheight,alpha:f.opacity*v.opacity,visible:f.visible&&v.visible,properties:d(v,"properties",[]),orientation:h(s.orientation)}),p.orientation===S.HEXAGONAL&&(p.hexSideLength=s.hexsidelength,p.staggerAxis=s.staggeraxis,p.staggerIndex=s.staggerindex,p.staggerAxis==="y"?(A=(p.tileHeight-p.hexSideLength)/2,p.widthInPixels=p.tileWidth*(p.width+.5),p.heightInPixels=p.height*(p.hexSideLength+A)+A):(R=(p.tileWidth-p.hexSideLength)/2,p.widthInPixels=p.width*(p.hexSideLength+R)+R,p.heightInPixels=p.tileHeight*(p.height+.5)));for(var Y=[],W=0,H=v.data.length;W<H;W++)T=e(v.data[W]),T.gid>0?(C=new l(p,T.gid,L,P.length,s.tilewidth,s.tileheight),C.rotation=T.rotation,C.flipX=T.flipped,Y.push(C)):(M=r?null:new l(p,-1,L,P.length,s.tilewidth,s.tileheight),Y.push(M)),L++,L===v.width&&(P.push(Y),L=0,Y=[])}p.data=P,a.push(p)}return a};E.exports=i},24619:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(33629),S=n(16536),x=n(52205),h=n(57880),d=function(t){for(var e=[],l=[],i=null,s,r=0;r<t.tilesets.length;r++){var o=t.tilesets[r];if(o.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(o.image){var a=new m(o.name,o.firstgid,o.tilewidth,o.tileheight,o.margin,o.spacing,void 0,void 0,o.tileoffset);if(t.version>1){var u=void 0,f=void 0;if(Array.isArray(o.tiles)){u=u||{},f=f||{};for(var v=0;v<o.tiles.length;v++){var c=o.tiles[v];if(c.properties){var g={};c.properties.forEach(function(N){g[N.name]=N.value}),f[c.id]=g}if(c.objectgroup&&((u[c.id]||(u[c.id]={})).objectgroup=c.objectgroup,c.objectgroup.objects)){var p=c.objectgroup.objects.map(function(N){return x(N)});u[c.id].objectgroup.objects=p}c.animation&&((u[c.id]||(u[c.id]={})).animation=c.animation),c.type&&((u[c.id]||(u[c.id]={})).type=c.type)}for(var T in u){var C=u[T].animation;if(C){for(var M=0,A=0;A<C.length;A++)C[A].startTime=M,M+=C[A].duration;u[T].animationDuration=M}}}Array.isArray(o.wangsets)&&(u=u||{},f=f||{},h(o.wangsets,u)),u&&(a.tileData=u,a.tileProperties=f)}else if(o.tileproperties&&(a.tileProperties=o.tileproperties),o.tiles){a.tileData=o.tiles;for(s in a.tileData){var R=a.tileData[s].objectgroup;if(R&&R.objects){var P=R.objects.map(function(N){return x(N)});a.tileData[s].objectgroup.objects=P}}}a.updateTileData(o.imagewidth,o.imageheight),e.push(a)}else{var L=new S(o.name,o.firstgid,o.tilewidth,o.tileheight,o.margin,o.spacing,o.properties),F=0;for(v=0;v<o.tiles.length;v++){c=o.tiles[v];var w=c.image,O=parseInt(c.id,10),B=o.firstgid+O,I=c.imagewidth,D=c.imageheight;L.addImage(B,w,I,D),F=Math.max(O,F)}L.maxId=F,l.push(L)}i&&(i.lastgid=o.firstgid-1),i=o}return{tilesets:e,imageCollections:l}};E.exports=d},57880:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){for(var S=0;S<n.length;S++){var x=n[S],h=S;if(x.name&&x.name!==""&&(h=x.name),Array.isArray(x.wangtiles)&&x.wangtiles.length>0){var d={},t={},e,l,i;if(Array.isArray(x.edgecolors))for(e=0;e<x.edgecolors.length;e++)i=1+e,l=x.edgecolors[e],l.name!==""&&(d[i]=l.name);if(Array.isArray(x.cornercolors))for(e=0;e<x.cornercolors.length;e++)i=1+e,l=x.cornercolors[e],l.name!==""&&(t[i]=l.name);if(Array.isArray(x.colors))for(e=0;e<x.colors.length;e++)l=x.colors[e],i=1+e,l.name!==""&&(d[i]=t[i]=l.name);for(var s=[d,t,d,t,d,t,d,t],r=0;r<x.wangtiles.length;r++){var o=x.wangtiles[r],a=m[o.tileid]||(m[o.tileid]={});a=a.wangid||(a.wangid={});for(var u=[],f=0;f<Math.min(s.length,o.wangid.length);f++){if(l=o.wangid[f],l===0){u.push(void 0);continue}var v=s[f][l];if(v!==void 0){u.push(v);continue}u.push(l)}a[h]=u}}}};E.exports=y},96761:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={AssignTileProperties:n(51233),Base64Decode:n(41868),BuildTilesetIndex:n(84101),CreateGroupLayer:n(79677),ParseGID:n(29920),ParseImageLayers:n(12635),ParseJSONTiled:n(46594),ParseObject:n(52205),ParseObjectLayers:n(22611),ParseTileLayers:n(28200),ParseTilesets:n(24619)}},33385:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(37277),x=n(44594),h=n(94880),d=n(72905),t=new m({initialize:function(l){this.scene=l,this.systems=l.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],l.sys.events.once(x.BOOT,this.boot,this),l.sys.events.on(x.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(x.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var e=this.systems.events;e.on(x.PRE_UPDATE,this.preUpdate,this),e.on(x.UPDATE,this.update,this),e.once(x.SHUTDOWN,this.shutdown,this)},addEvent:function(e){var l;if(e instanceof h){if(l=e,this.removeEvent(l),l.elapsed=l.startAt,l.hasDispatched=!1,l.repeatCount=l.repeat===-1||l.loop?999999999999:l.repeat,l.delay<=0&&l.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay")}else l=new h(e);return this._pendingInsertion.push(l),l},delayedCall:function(e,l,i,s){return this.addEvent({delay:e,callback:l,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(e){Array.isArray(e)||(e=[e]);for(var l=0;l<e.length;l++){var i=e[l];d(this._pendingRemoval,i),d(this._pendingInsertion,i),d(this._active,i)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var e=this._pendingRemoval.length,l=this._pendingInsertion.length;if(!(e===0&&l===0)){var i,s;for(i=0;i<e;i++){s=this._pendingRemoval[i];var r=this._active.indexOf(s);r>-1&&this._active.splice(r,1),s.destroy()}for(i=0;i<l;i++)s=this._pendingInsertion[i],this._active.push(s);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(e,l){if(this.now=e,!this.paused){l*=this.timeScale;for(var i=0;i<this._active.length;i++){var s=this._active[i];if(!s.paused&&(s.elapsed+=l*s.timeScale,s.elapsed>=s.delay)){var r=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0){if(s.repeatCount--,r>=s.delay)for(;r>=s.delay&&s.repeatCount>0;)s.callback&&s.callback.apply(s.callbackScope,s.args),r-=s.delay,s.repeatCount--;s.elapsed=r,s.hasDispatched=!1}else s.hasDispatched&&this._pendingRemoval.push(s)}}}},shutdown:function(){var e;for(e=0;e<this._pendingInsertion.length;e++)this._pendingInsertion[e].destroy();for(e=0;e<this._active.length;e++)this._active[e].destroy();for(e=0;e<this._pendingRemoval.length;e++)this._pendingRemoval[e].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var l=this.systems.events;l.off(x.PRE_UPDATE,this.preUpdate,this),l.off(x.UPDATE,this.update,this),l.off(x.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(x.START,this.start,this),this.scene=null,this.systems=null}});S.register("Clock",t,"time"),E.exports=t},96120:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50792),x=n(39429),h=n(95540),d=n(44594),t=n(89809),e=new m({Extends:S,initialize:function(i,s){S.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 r=this.systems.events;r.on(d.PRE_UPDATE,this.preUpdate,this),r.on(d.UPDATE,this.update,this),r.once(d.SHUTDOWN,this.destroy,this),s&&this.add(s)},preUpdate:function(l,i){this.paused||(this.elapsed+=i*this.timeScale)},update:function(){if(!(this.paused||this.complete)){var l,i=this.events,s=!1,r=this.systems,o;for(l=0;l<i.length;l++){var a=i[l];if(!a.complete&&a.time<=this.elapsed){if(a.complete=!0,this.totalComplete++,o=a.target?a.target:this,a.if&&!a.if.call(o,a))continue;if(a.once&&(s=!0),a.set&&a.target)for(var u in a.set)a.target[u]=a.set[u];this.iteration&&a.repeat++,a.loop&&a.repeat&&a.loop.call(o),a.tween&&(a.tweenInstance=r.tweens.add(a.tween)),a.sound&&(typeof a.sound=="string"?r.sound.play(a.sound):r.sound.play(a.sound.key,a.sound.config)),a.event&&this.emit(a.event,o),a.run&&a.run.call(o),a.stop&&this.stop()}}if(s)for(l=0;l<i.length;l++)i[l].complete&&i[l].once&&(i.splice(l,1),l--);var f=0;for(l=0;l<i.length;l++)i[l].complete||f++;f===0&&(i.length>0||this.totalComplete>0)&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(t.COMPLETE,this)}},play:function(l){return l===void 0&&(l=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,l&&this.reset(),this},pause:function(){this.paused=!0;for(var l=this.events,i=0;i<l.length;i++){var s=l[i];s.tweenInstance&&(s.tweenInstance.paused=!0)}return this},repeat:function(l){return(l===void 0||l===!0)&&(l=-1),l===!1&&(l=0),this.loop=l,this},resume:function(){this.paused=!1;for(var l=this.events,i=0;i<l.length;i++){var s=l[i];s.tweenInstance&&(s.tweenInstance.paused=!1)}return this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(l){l===void 0&&(l=!1),this.elapsed=0,l||(this.iteration=0);for(var i=this.events,s=0;s<i.length;s++){var r=i[s];r.complete=!1,l||(r.repeat=0),r.tweenInstance&&r.tweenInstance.stop()}return this.play(!1)},add:function(l){Array.isArray(l)||(l=[l]);var i=this.events,s=0;i.length>0&&(s=i[i.length-1].time);for(var r=0;r<l.length;r++){var o=l[r],a=h(o,"at",0),u=h(o,"in",null);u!==null&&(a=this.elapsed+u);var f=h(o,"from",null);f!==null&&(a=s+f),i.push({complete:!1,time:a,repeat:0,if:h(o,"if",null),run:h(o,"run",null),loop:h(o,"loop",null),event:h(o,"event",null),target:h(o,"target",null),set:h(o,"set",null),tween:h(o,"tween",null),sound:h(o,"sound",null),once:h(o,"once",!1),stop:h(o,"stop",!1)}),s=a}return this.complete=!1,this},clear:function(){for(var l=this.events,i=0;i<l.length;i++){var s=l[i];s.tweenInstance&&s.tweenInstance.stop()}return l=[],this.elapsed=0,this.paused=!0,this},isPlaying:function(){return!this.paused&&!this.complete},getProgress:function(){var l=Math.min(this.totalComplete,this.events.length);return l/this.events.length},destroy:function(){var l=this.systems.events;l.off(d.PRE_UPDATE,this.preUpdate,this),l.off(d.UPDATE,this.update,this),l.off(d.SHUTDOWN,this.destroy,this),this.clear(),this.scene=null,this.systems=null}});x.register("timeline",function(l){return new e(this.scene,l)}),E.exports=e},94880:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(95540),x=new m({initialize:function(d){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(d)},reset:function(h){if(this.delay=S(h,"delay",0),this.repeat=S(h,"repeat",0),this.loop=S(h,"loop",!1),this.callback=S(h,"callback",void 0),this.callbackScope=S(h,"callbackScope",this),this.args=S(h,"args",[]),this.timeScale=S(h,"timeScale",1),this.startAt=S(h,"startAt",0),this.paused=S(h,"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 h=this.delay+this.delay*this.repeat,d=this.elapsed+this.delay*(this.repeat-this.repeatCount);return d/h}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(h){h===void 0&&(h=!1),this.elapsed=this.delay,this.hasDispatched=!h,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});E.exports=x},35945:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="complete"},89809:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={COMPLETE:n(35945)}},90291:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Clock:n(33385),Events:n(89809),Timeline:n(96120),TimerEvent:n(94880)}},40382:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(72905),S=n(83419),x=n(43491),h=n(88032),d=n(37277),t=n(44594),e=n(93109),l=n(8462),i=n(8357),s=n(43960),r=n(26012),o=new S({initialize:function(u){this.scene=u,this.events=u.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(t.BOOT,this.boot,this),this.events.on(t.START,this.start,this)},boot:function(){this.events.once(t.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(t.UPDATE,this.update,this),this.events.once(t.SHUTDOWN,this.shutdown,this)},create:function(a){Array.isArray(a)||(a=[a]);for(var u=[],f=0;f<a.length;f++){var v=a[f];v instanceof l||v instanceof s?u.push(v):Array.isArray(v.tweens)?u.push(r(this,v)):u.push(i(this,v))}return u.length===1?u[0]:u},add:function(a){var u=a,f=this.tweens;return u instanceof l||u instanceof s||(Array.isArray(u.tweens)?u=r(this,u):u=i(this,u)),f.push(u.reset()),u},addMultiple:function(a){for(var u,f=[],v=this.tweens,c=0;c<a.length;c++)u=a[c],u instanceof l||u instanceof s||(Array.isArray(u.tweens)?u=r(this,u):u=i(this,u)),v.push(u.reset()),f.push(u);return f},chain:function(a){var u=r(this,a);return this.tweens.push(u.init()),u},getChainedTweens:function(a){return a.getChainedTweens()},has:function(a){return this.tweens.indexOf(a)>-1},existing:function(a){return this.has(a)||this.tweens.push(a.reset()),this},addCounter:function(a){var u=h(this,a);return this.tweens.push(u.reset()),u},stagger:function(a,u){return e(a,u)},setLagSmooth:function(a,u){return a===void 0&&(a=1/1e-8),u===void 0&&(u=0),this.maxLag=a,this.lagSkip=Math.min(u,this.maxLag),this},setFps:function(a){return a===void 0&&(a=240),this.gap=1e3/a,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(a){var u=Date.now()-this.prevTime;u>this.maxLag&&(this.startTime+=u-this.lagSkip),this.prevTime+=u;var f=this.prevTime-this.startTime,v=f-this.nextTime,c=f-this.time*1e3;return v>0||a?(f/=1e3,this.time=f,this.nextTime+=v+(v>=this.gap?4:this.gap-v)):c=0,c},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(a){a===void 0&&(a=!1);var u=this.getDelta(a);if(!(u<=0)){this.processing=!0;var f,v,c=[],g=this.tweens;for(f=0;f<g.length;f++)v=g[f],v.update(u)&&c.push(v);var p=c.length;if(p&&g.length>0){for(f=0;f<p;f++){v=c[f];var T=g.indexOf(v);T>-1&&(v.isPendingRemove()||v.isDestroyed())&&(g.splice(T,1),v.destroy())}c.length=0}this.processing=!1}},remove:function(a){return this.processing?a.setPendingRemoveState():(m(this.tweens,a),a.setRemovedState()),this},reset:function(a){return this.existing(a),a.seek(),a.setActiveState(),this},makeActive:function(a){return this.existing(a),a.setActiveState(),this},each:function(a,u){var f,v=[null];for(f=1;f<arguments.length;f++)v.push(arguments[f]);return this.tweens.forEach(function(c){v[0]=c,a.apply(u,v)}),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(a){var u=[],f=this.tweens;Array.isArray(a)?a=x(a):a=[a];for(var v=a.length,c=0;c<f.length;c++)for(var g=f[c],p=0;p<v;p++)!g.isDestroyed()&&g.hasTarget(a[p])&&u.push(g);return u},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(a){return this.timeScale=a,this},isTweening:function(a){for(var u=this.tweens,f,v=0;v<u.length;v++)if(f=u[v],f.isPlaying()&&f.hasTarget(a))return!0;return!1},killAll:function(){for(var a=this.processing?this.getTweens():this.tweens,u=0;u<a.length;u++)a[u].destroy();return this.processing||(a.length=0),this},killTweensOf:function(a){for(var u=this.getTweensOf(a),f=0;f<u.length;f++)u[f].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(t.UPDATE,this.update,this),this.events.off(t.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(t.START,this.start,this),this.scene=null,this.events=null}});d.register("TweenManager",o,"tweens"),E.exports=o},57355:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){return n&&n.hasOwnProperty(m)?n[m]:S};E.exports=y},6113:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(62640),S=n(35355),x=function(h,d){var t=m.Power0;if(typeof h=="string")if(m.hasOwnProperty(h))t=m[h];else{var e="";if(h.indexOf(".")){e=h.substring(h.indexOf(".")+1);var l=e.toLowerCase();l==="in"?e="easeIn":l==="out"?e="easeOut":l==="inout"&&(e="easeInOut")}h=S(h.substring(0,h.indexOf(".")+1)+e),m.hasOwnProperty(h)&&(t=m[h])}else typeof h=="function"&&(t=h);if(!d)return t;var i=d.slice(0);return i.unshift(0),function(s){return i[0]=s,t.apply(this,i)}};E.exports=x},91389:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(89318),S=n(77259),x=n(28392),h={bezier:m,catmull:S,catmullrom:S,linear:x},d=function(t){if(t===null)return null;var e=h.linear;return typeof t=="string"?h.hasOwnProperty(t)&&(e=h[t]):typeof t=="function"&&(e=t),e};E.exports=d},55292:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x;if(n.hasOwnProperty(m)){var h=typeof n[m];h==="function"?x=function(d,t,e,l,i,s){return n[m](d,t,e,l,i,s)}:x=function(){return n[m]}}else typeof S=="function"?x=S:x=function(){return S};return x};E.exports=y},82985:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(81076),S=function(x){var h,d=[];if(x.hasOwnProperty("props"))for(h in x.props)h.substring(0,1)!=="_"&&d.push({key:h,value:x.props[h]});else for(h in x)m.indexOf(h)===-1&&h.substring(0,1)!=="_"&&d.push({key:h,value:x[h]});return d};E.exports=S},62329:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35154),S=function(x){var h=m(x,"targets",null);return h===null||(typeof h=="function"&&(h=h.call()),Array.isArray(h)||(h=[h])),h};E.exports=S},17777:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(30976),S=n(99472);function x(l){return!!l.getActive&&typeof l.getActive=="function"}function h(l){return!!l.getStart&&typeof l.getStart=="function"}function d(l){return!!l.getEnd&&typeof l.getEnd=="function"}function t(l){return h(l)||d(l)||x(l)}var e=function(l,i){var s,r=function(O,B,I){return I},o=function(O,B,I){return I},a=null,u=typeof i;if(u==="number")r=function(){return i};else if(Array.isArray(i))o=function(){return i[0]},r=function(){return i[i.length-1]};else if(u==="string"){var f=i.toLowerCase(),v=f.substring(0,6)==="random",c=f.substring(0,3)==="int";if(v||c){var g=f.indexOf("("),p=f.indexOf(")"),T=f.indexOf(",");if(g&&p&&T){var C=parseFloat(f.substring(g+1,T)),M=parseFloat(f.substring(T+1,p));v?r=function(){return S(C,M)}:r=function(){return m(C,M)}}else throw new Error("invalid random() format")}else{f=f[0];var A=parseFloat(i.substr(2));switch(f){case"+":r=function(O,B,I){return I+A};break;case"-":r=function(O,B,I){return I-A};break;case"*":r=function(O,B,I){return I*A};break;case"/":r=function(O,B,I){return I/A};break;default:r=function(){return parseFloat(i)}}}}else if(u==="function")r=i;else if(u==="object")if(t(i))x(i)&&(a=i.getActive),d(i)&&(r=i.getEnd),h(i)&&(o=i.getStart);else if(i.hasOwnProperty("value"))s=e(l,i.value);else{var R=i.hasOwnProperty("to"),P=i.hasOwnProperty("from"),L=i.hasOwnProperty("start");if(R&&(P||L)){if(s=e(l,i.to),L){var F=e(l,i.start);s.getActive=F.getEnd}if(P){var w=e(l,i.from);s.getStart=w.getEnd}}}return s||(s={getActive:a,getEnd:r,getStart:o}),s};E.exports=e},88032:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70402),S=n(69902),x=n(23568),h=n(57355),d=n(6113),t=n(95540),e=n(55292),l=n(35154),i=n(17777),s=n(269),r=n(8462),o=function(a,u,f){if(u instanceof r)return u.parent=a,u;f===void 0?f=S:f=s(S,f);var v=t(u,"from",0),c=t(u,"to",1),g=[{value:v}],p=t(u,"delay",f.delay),T=t(u,"easeParams",f.easeParams),C=t(u,"ease",f.ease),M=i("value",c),A=new r(a,g),R=A.add(0,"value",M.getEnd,M.getStart,M.getActive,d(t(u,"ease",C),t(u,"easeParams",T)),e(u,"delay",p),t(u,"duration",f.duration),h(u,"yoyo",f.yoyo),t(u,"hold",f.hold),t(u,"repeat",f.repeat),t(u,"repeatDelay",f.repeatDelay),!1,!1);R.start=v,R.current=v,A.completeDelay=x(u,"completeDelay",0),A.loop=Math.round(x(u,"loop",0)),A.loopDelay=Math.round(x(u,"loopDelay",0)),A.paused=h(u,"paused",!1),A.persist=h(u,"persist",!1),A.isNumberTween=!0,A.callbackScope=l(u,"callbackScope",A);for(var P=m.TYPES,L=0;L<P.length;L++){var F=P[L],w=l(u,F,!1);if(w){var O=l(u,F+"Params",[]);A.setCallback(F,w,O)}}return A};E.exports=o},93109:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(6113),S=n(35154),x=n(36383),h=function(d,t){t===void 0&&(t={});var e,l=S(t,"start",0),i=S(t,"ease",null),s=S(t,"grid",null),r=S(t,"from",0),o=r==="first",a=r==="center",u=r==="last",f=typeof r=="number",v=Array.isArray(d),c=parseFloat(v?d[0]:d),g=v?parseFloat(d[1]):0,p=Math.max(c,g);if(v&&(l+=c),s){var T=s[0],C=s[1],M=0,A=0,R=0,P=0,L=[];u?(M=T-1,A=C-1):f?(M=r%T,A=Math.floor(r/T)):a&&(M=(T-1)/2,A=(C-1)/2);for(var F=x.MIN_SAFE_INTEGER,w=0;w<C;w++){L[w]=[];for(var O=0;O<T;O++){R=M-O,P=A-w;var B=Math.sqrt(R*R+P*P);B>F&&(F=B),L[w][O]=B}}}var I=i?m(i):null;return s?e=function(D,N,z,V){var U=0,G=V%T,b=Math.floor(V/T);G>=0&&G<T&&b>=0&&b<C&&(U=L[b][G]);var Y;if(v){var W=g-c;I?Y=U/F*W*I(U/F):Y=U/F*W}else I?Y=U*c*I(U/F):Y=U*c;return Y+l}:e=function(D,N,z,V,U){U--;var G;o?G=V:a?G=Math.abs(U/2-V):u?G=U-V:f&&(G=Math.abs(r-V));var b;if(v){var Y;a?Y=(g-c)/U*(G*2):Y=(g-c)/U*G,I?b=Y*I(G/U):b=Y}else I?b=U*p*I(G/U):b=G*c;return b+l},e};E.exports=h},8357:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70402),S=n(69902),x=n(23568),h=n(57355),d=n(6113),t=n(95540),e=n(91389),l=n(55292),i=n(82985),s=n(62329),r=n(35154),o=n(17777),a=n(269),u=n(8462),f=function(v,c,g){if(c instanceof u)return c.parent=v,c;g===void 0?g=S:g=a(S,g);var p=s(c);!p&&g.targets&&(p=g.targets);for(var T=i(c),C=t(c,"delay",g.delay),M=t(c,"duration",g.duration),A=t(c,"easeParams",g.easeParams),R=t(c,"ease",g.ease),P=t(c,"hold",g.hold),L=t(c,"repeat",g.repeat),F=t(c,"repeatDelay",g.repeatDelay),w=h(c,"yoyo",g.yoyo),O=h(c,"flipX",g.flipX),B=h(c,"flipY",g.flipY),I=t(c,"interpolation",g.interpolation),D=function(Z,Q,j,J){if(j==="texture"){var tt=J,k=void 0;Array.isArray(J)?(tt=J[0],k=J[1]):J.hasOwnProperty("value")?(tt=J.value,Array.isArray(J.value)?(tt=J.value[0],k=J.value[1]):typeof J.value=="string"&&(tt=J.value)):typeof J=="string"&&(tt=J),Z.addFrame(Q,tt,k,l(J,"delay",C),t(J,"duration",M),t(J,"hold",P),t(J,"repeat",L),t(J,"repeatDelay",F),h(J,"flipX",O),h(J,"flipY",B))}else{var q=o(j,J),_=e(t(J,"interpolation",I));Z.add(Q,j,q.getEnd,q.getStart,q.getActive,d(t(J,"ease",R),t(J,"easeParams",A)),l(J,"delay",C),t(J,"duration",M),h(J,"yoyo",w),t(J,"hold",P),t(J,"repeat",L),t(J,"repeatDelay",F),h(J,"flipX",O),h(J,"flipY",B),_,_?J:null)}},N=new u(v,p),z=0;z<T.length;z++)for(var V=T[z].key,U=T[z].value,G=0;G<p.length;G++){var b=p[G];b&&(V==="scale"&&!p[G].hasOwnProperty("scale")?(D(N,G,"scaleX",U),D(N,G,"scaleY",U)):D(N,G,V,U))}N.completeDelay=x(c,"completeDelay",0),N.loop=Math.round(x(c,"loop",0)),N.loopDelay=Math.round(x(c,"loopDelay",0)),N.paused=h(c,"paused",!1),N.persist=h(c,"persist",!1),N.callbackScope=t(c,"callbackScope",N);for(var Y=m.TYPES,W=0;W<Y.length;W++){var H=Y[W],X=r(c,H,!1);if(X){var K=r(c,H+"Params",[]);N.setCallback(H,X,K)}}return N};E.exports=f},26012:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70402),S=n(23568),x=n(57355),h=n(62329),d=n(35154),t=n(8357),e=n(43960),l=function(i,s){if(s instanceof e)return s.parent=i,s;var r=new e(i);r.startDelay=d(s,"delay",0),r.completeDelay=S(s,"completeDelay",0),r.loop=Math.round(S(s,"loop",d(s,"repeat",0))),r.loopDelay=Math.round(S(s,"loopDelay",d(s,"repeatDelay",0))),r.paused=x(s,"paused",!1),r.persist=x(s,"persist",!1),r.callbackScope=d(s,"callbackScope",r);var o,a=m.TYPES;for(o=0;o<a.length;o++){var u=a[o],f=d(s,u,!1);if(f){var v=d(s,u+"Params",[]);r.setCallback(u,f,v)}}var c=d(s,"tweens",null);if(Array.isArray(c)){var g=[],p=h(s),T=void 0;for(p&&(T={targets:p}),o=0;o<c.length;o++)g.push(t(r,c[o],T));r.add(g)}return r};E.exports=l},30231:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={GetBoolean:n(57355),GetEaseFunction:n(6113),GetInterpolationFunction:n(91389),GetNewValue:n(55292),GetProps:n(82985),GetTargets:n(62329),GetValueOp:n(17777),NumberTweenBuilder:n(88032),StaggerBuilder:n(93109),TweenBuilder:n(8357)}},73685:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="active"},98540:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="complete"},67233:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="loop"},2859:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="pause"},98336:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="repeat"},25764:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="resume"},32193:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="start"},84371:E=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="stop"},70766:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="update"},55659:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports="yoyo"},842:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={TWEEN_ACTIVE:n(73685),TWEEN_COMPLETE:n(98540),TWEEN_LOOP:n(67233),TWEEN_PAUSE:n(2859),TWEEN_RESUME:n(25764),TWEEN_REPEAT:n(98336),TWEEN_START:n(32193),TWEEN_STOP:n(84371),TWEEN_UPDATE:n(70766),TWEEN_YOYO:n(55659)}},43066:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m={States:n(86353),Builders:n(30231),Events:n(842),TweenManager:n(40382),Tween:n(8462),TweenData:n(48177),TweenFrameData:n(42220),BaseTween:n(70402),TweenChain:n(43960)};E.exports=m},70402:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(50792),x=n(842),h=n(86353),d=new m({Extends:S,initialize:function(e){S.call(this),this.parent=e,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=h.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(x.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(x.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(x.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(x.TWEEN_COMPLETE,"onComplete")},complete:function(t){return t===void 0&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return t===void 0&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(x.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(x.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(x.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,l){return l===void 0&&(l=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:l}),this},setPendingState:function(){this.state=h.PENDING},setActiveState:function(){this.state=h.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=h.LOOP_DELAY},setCompleteDelayState:function(){this.state=h.COMPLETE_DELAY},setStartDelayState:function(){this.state=h.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=h.PENDING_REMOVE},setRemovedState:function(){this.state=h.REMOVED},setFinishedState:function(){this.state=h.FINISHED},setDestroyedState:function(){this.state=h.DESTROYED},isPending:function(){return this.state===h.PENDING},isActive:function(){return this.state===h.ACTIVE},isLoopDelayed:function(){return this.state===h.LOOP_DELAY},isCompleteDelayed:function(){return this.state===h.COMPLETE_DELAY},isStartDelayed:function(){return this.state===h.START_DELAY},isPendingRemove:function(){return this.state===h.PENDING_REMOVE},isRemoved:function(){return this.state===h.REMOVED},isFinished:function(){return this.state===h.FINISHED},isDestroyed:function(){return this.state===h.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(t){t.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});d.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],E.exports=d},95042:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(83419),S=n(842),x=n(86353),h=new m({initialize:function(t,e,l,i,s,r,o,a,u,f){this.tween=t,this.targetIndex=e,this.duration=i<=0?.01:i,this.totalDuration=0,this.delay=0,this.getDelay=l,this.yoyo=s,this.hold=r,this.repeat=o,this.repeatDelay=a,this.repeatCounter=0,this.flipX=u,this.flipY=f,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(d){d===void 0&&(d=this.current),this.tween.targets[this.targetIndex][this.key]=d},setCreatedState:function(){this.state=x.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=x.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=x.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=x.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=x.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=x.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=x.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=x.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===x.CREATED},isDelayed:function(){return this.state===x.DELAY},isPendingRender:function(){return this.state===x.PENDING_RENDER},isPlayingForward:function(){return this.state===x.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===x.PLAYING_BACKWARD},isHolding:function(){return this.state===x.HOLD_DELAY},isRepeating:function(){return this.state===x.REPEAT_DELAY},isComplete:function(){return this.state===x.COMPLETE},setStateFromEnd:function(d){this.yoyo?this.onRepeat(d,!0,!0):this.repeatCounter>0?this.onRepeat(d,!0,!1):this.setCompleteState()},setStateFromStart:function(d){this.repeatCounter>0?this.onRepeat(d,!1):this.setCompleteState()},reset:function(){var d=this.tween,t=d.totalTargets,e=this.targetIndex,l=d.targets[e],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(l,i,0,e,t,d),this.repeatCounter=this.repeat===-1?x.MAX:this.repeat,this.setPendingRenderState();var s=this.duration+this.hold;this.yoyo&&(s+=this.duration);var r=s+this.repeatDelay;this.totalDuration=this.delay+s,this.repeat===-1?(this.totalDuration+=r*x.MAX,d.isInfinite=!0):this.repeat>0&&(this.totalDuration+=r*this.repeat),this.totalDuration>d.duration&&(d.duration=this.totalDuration),this.delay<d.startDelay&&(d.startDelay=this.delay),this.delay>0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(d,t,e){var l=this.tween,i=l.totalTargets,s=this.targetIndex,r=l.targets[s],o=this.key,a=o!=="texture";if(this.elapsed=d,this.progress=d/this.duration,this.flipX&&r.toggleFlipX(),this.flipY&&r.toggleFlipY(),a&&(t||e)&&(this.start=this.getStartValue(r,o,this.start,s,i,l)),e){this.setPlayingBackwardState(),this.dispatchEvent(S.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,a&&(this.end=this.getEndValue(r,o,this.start,s,i,l)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-d,a&&(this.current=this.start,r[o]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(S.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});E.exports=h},69902:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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};E.exports=y},81076:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.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"]},8462:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(70402),S=n(83419),x=n(842),h=n(44603),d=n(39429),t=n(36383),e=n(86353),l=n(48177),i=n(42220),s=new S({Extends:m,initialize:function(o,a){m.call(this,o),this.targets=a,this.totalTargets=a.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(r,o,a,u,f,v,c,g,p,T,C,M,A,R,P,L){var F=new l(this,r,o,a,u,f,v,c,g,p,T,C,M,A,R,P,L);return this.totalData=this.data.push(F),F},addFrame:function(r,o,a,u,f,v,c,g,p,T){var C=new i(this,r,o,a,u,f,v,c,g,p,T);return this.totalData=this.data.push(C),C},getValue:function(r){r===void 0&&(r=0);var o=null;return this.data&&(o=this.data[r].current),o},hasTarget:function(r){return this.targets&&this.targets.indexOf(r)!==-1},updateTo:function(r,o,a){if(a===void 0&&(a=!1),r!=="texture")for(var u=0;u<this.totalData;u++){var f=this.data[u];f.key===r&&(f.isPlayingForward()||f.isPlayingBackward())&&(f.end=o,a&&(f.start=f.current))}return this},restart:function(){switch(this.state){case e.REMOVED:case e.FINISHED:this.seek(),this.parent.makeActive(this);break;case e.PENDING:case e.PENDING_REMOVE:this.parent.reset(this);break;case e.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(x.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,m.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(r,o,a){if(r===void 0&&(r=0),o===void 0&&(o=16.6),a===void 0&&(a=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;a||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(x.TWEEN_ACTIVE,"onActive");var u=this.paused;if(this.paused=!1,r>0){for(var f=Math.floor(r/o),v=r-f*o,c=0;c<f;c++)this.update(o);v>0&&this.update(v)}return this.paused=u,this.isSeeking=!1,this},initTweenData:function(r){r===void 0&&(r=!1),this.duration=0,this.startDelay=t.MAX_SAFE_INTEGER;for(var o=this.data,a=0;a<this.totalData;a++)o[a].reset(r);this.duration=Math.max(this.duration,.01);var u=this.duration,f=this.completeDelay,v=this.loopCounter,c=this.loopDelay;v>0?this.totalDuration=u+f+(u+c)*v:this.totalDuration=u+f},reset:function(r){return r===void 0&&(r=!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=e.MAX),r||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(x.TWEEN_ACTIVE,"onActive")),this},update:function(r){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.paused||this.isFinished())return!1;if(r*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(r),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(r),!1;this.hasStarted||(this.startDelay-=r,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(x.TWEEN_START,"onStart"),r=0));var o=!1;if(this.isActive())for(var a=this.data,u=0;u<this.totalData;u++)a[u].update(r)&&(o=!0);this.elapsed+=r,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=r,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),o||this.nextState();var f=this.isPendingRemove();return f&&this.persist&&(this.setFinishedState(),f=!1),f},forward:function(r){return this.update(r),this},rewind:function(r){return this.update(-r),this},dispatchEvent:function(r,o){if(!this.isSeeking){if(this.emit(r,this,this.targets),!this.callbacks)return;var a=this.callbacks[o];a&&a.func.apply(this.callbackScope,[this,this.targets].concat(a.params))}},destroy:function(){m.prototype.destroy.call(this),this.targets=null}});d.register("tween",function(r){return this.scene.sys.tweens.add(r)}),h.register("tween",function(r){return this.scene.sys.tweens.create(r)}),E.exports=s},43960:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(72905),S=n(70402),x=n(83419),h=n(842),d=n(44603),t=n(39429),e=n(86353),l=new x({Extends:S,initialize:function(s){S.call(this,s),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?e.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(i){var s=this.parent.create(i);Array.isArray(s)||(s=[s]);for(var r=this.data,o=0;o<s.length;o++){var a=s[o];a.parent=this,r.push(a.reset())}return this.totalData=r.length,this},remove:function(i){return m(this.data,i),i.setRemovedState(),i===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(i){for(var s=this.data,r=0;r<this.totalData;r++)if(s[r].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(h.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,s=this.totalData,r=0;r<s;r++)i[r].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(h.TWEEN_START,"onStart"),i=0));var s=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(i)&&this.nextTween()&&this.nextState(),s=this.isPendingRemove(),s&&this.persist&&(this.setFinishedState(),s=!1)),s},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()},dispatchEvent:function(i,s){this.emit(i,this);var r=this.callbacks[s];r&&r.func.apply(this.callbackScope,[this].concat(r.params))},destroy:function(){S.prototype.destroy.call(this),this.currentTween=null}});t.register("tweenchain",function(i){return this.scene.sys.tweens.chain(i)}),d.register("tweenchain",function(i){return this.scene.sys.tweens.create(i)}),E.exports=l},48177:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95042),S=n(45319),x=n(83419),h=n(842),d=new x({Extends:m,initialize:function(e,l,i,s,r,o,a,u,f,v,c,g,p,T,C,M,A){m.call(this,e,l,u,f,v,c,g,p,T,C),this.key=i,this.getActiveValue=o,this.getEndValue=s,this.getStartValue=r,this.ease=a,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=M,this.interpolationData=A},reset:function(t){m.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],l=this.key;t&&(e[l]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[l]=this.getActiveValue(e,l,0))},update:function(t){var e=this.tween,l=e.totalTargets,i=this.targetIndex,s=e.targets[i],r=this.key;if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(h.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(s,r,s[r],i,l,e),this.end=this.getEndValue(s,r,this.start,i,l,e),this.current=this.start,s[r]=this.start,this.setPlayingForwardState(),!0;var o=this.isPlayingForward(),a=this.isPlayingBackward();if(o||a){var u=this.elapsed,f=this.duration,v=0,c=!1;u+=t,u>=f?(v=u-f,u=f,c=!0):u<0&&(u=0);var g=S(u/f,0,1);this.elapsed=u,this.progress=g,this.previous=this.current,o||(g=1-g);var p=this.ease(g);this.interpolation?this.current=this.interpolation(this.interpolationData,p):this.current=this.start+(this.end-this.start)*p,s[r]=this.current,c&&(o?(e.isNumberTween&&(this.current=this.end,s[r]=this.current),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(v)):(e.isNumberTween&&(this.current=this.start,s[r]=this.current),this.setStateFromStart(v))),this.dispatchEvent(h.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var l=this.tween;if(!l.isSeeking){var i=l.targets[this.targetIndex],s=this.key,r=this.current,o=this.previous;l.emit(t,l,s,i,r,o);var a=l.callbacks[e];a&&a.func.apply(l.callbackScope,[l,i,s,r,o].concat(a.params))}},destroy:function(){m.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});E.exports=d},42220:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(95042),S=n(45319),x=n(83419),h=n(842),d=new x({Extends:m,initialize:function(e,l,i,s,r,o,a,u,f,v,c){m.call(this,e,l,r,o,!1,a,u,f,v,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=s,this.yoyo=u!==0},reset:function(t){m.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,l=this.targetIndex,i=e.targets[l];if(!i)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(h.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&i.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var s=this.isPlayingForward(),r=this.isPlayingBackward();if(s||r){var o=this.elapsed,a=this.duration,u=0,f=!1;o+=t,o>=a?(u=o-a,o=a,f=!0):o<0&&(o=0);var v=S(o/a,0,1);this.elapsed=o,this.progress=v,f&&(s?(i.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(i.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(h.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var l=this.tween;if(!l.isSeeking){var i=l.targets[this.targetIndex],s=this.key;l.emit(t,l,s,i);var r=l.callbacks[e];r&&r.func.apply(l.callbackScope,[l,i,s].concat(r.params))}},destroy:function(){m.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});E.exports=d},86353:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y={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};E.exports=y},83419:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function y(d){return!!d.get&&typeof d.get=="function"||!!d.set&&typeof d.set=="function"}function n(d,t,e){var l=e?d[t]:Object.getOwnPropertyDescriptor(d,t);return!e&&l.value&&typeof l.value=="object"&&(l=l.value),l&&y(l)?(typeof l.enumerable>"u"&&(l.enumerable=!0),typeof l.configurable>"u"&&(l.configurable=!0),l):!1}function m(d,t){var e=Object.getOwnPropertyDescriptor(d,t);return e?(e.value&&typeof e.value=="object"&&(e=e.value),e.configurable===!1):!1}function S(d,t,e,l){for(var i in t)if(t.hasOwnProperty(i)){var s=n(t,i,e);if(s!==!1){var r=l||d;if(m(r.prototype,i)){if(h.ignoreFinals)continue;throw new Error("cannot override final property '"+i+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(d.prototype,i,s)}else d.prototype[i]=t[i]}}function x(d,t){if(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)S(d,t[e].prototype||t[e])}}function h(d){d||(d={});var t,e;if(d.initialize){if(typeof d.initialize!="function")throw new Error("initialize must be a function");t=d.initialize,delete d.initialize}else if(d.Extends){var l=d.Extends;t=function(){l.apply(this,arguments)}}else t=function(){};d.Extends?(t.prototype=Object.create(d.Extends.prototype),t.prototype.constructor=t,e=d.Extends,delete d.Extends):t.prototype.constructor=t;var i=null;return d.Mixins&&(i=d.Mixins,delete d.Mixins),x(t,i),S(t,d,!0,e),t}h.extend=S,h.mixin=x,h.ignoreFinals=!1,E.exports=h},29747:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(){};E.exports=y},20242:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(){return null};E.exports=y},71146:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h){if(h===void 0&&(h=n),S>0){var d=S-n.length;if(d<=0)return null}if(!Array.isArray(m))return n.indexOf(m)===-1?(n.push(m),x&&x.call(h,m),m):null;for(var t=m.length-1;t>=0;)n.indexOf(m[t])!==-1&&m.splice(t,1),t--;if(t=m.length,t===0)return null;S>0&&t>d&&(m.splice(d),t=d);for(var e=0;e<t;e++){var l=m[e];n.push(l),x&&x.call(h,l)}return m};E.exports=y},51067:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x,h,d){if(S===void 0&&(S=0),d===void 0&&(d=n),x>0){var t=x-n.length;if(t<=0)return null}if(!Array.isArray(m))return n.indexOf(m)===-1?(n.splice(S,0,m),h&&h.call(d,m),m):null;for(var e=m.length-1;e>=0;)n.indexOf(m[e])!==-1&&m.pop(),e--;if(e=m.length,e===0)return null;x>0&&e>t&&(m.splice(t),e=t);for(var l=e-1;l>=0;l--){var i=m[l];n.splice(S,0,i),h&&h.call(d,i)}return m};E.exports=y},66905:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.indexOf(m);return S!==-1&&S<n.length&&(n.splice(S,1),n.push(m)),m};E.exports=y},21612:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(82011),S=function(x,h,d,t,e){t===void 0&&(t=0),e===void 0&&(e=x.length);var l=0;if(m(x,t,e))for(var i=t;i<e;i++){var s=x[i];s[h]===d&&l++}return l};E.exports=S},95428:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x,h=[null];for(x=3;x<arguments.length;x++)h.push(arguments[x]);for(x=0;x<n.length;x++)h[0]=n[x],m.apply(S,h);return n};E.exports=y},36914:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(82011),S=function(x,h,d,t,e){if(t===void 0&&(t=0),e===void 0&&(e=x.length),m(x,t,e)){var l,i=[null];for(l=5;l<arguments.length;l++)i.push(arguments[l]);for(l=t;l<e;l++)i[0]=x[l],h.apply(d,i)}return x};E.exports=S},81957:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(m.length){if(m.length===1)return m[0]}else return NaN;var x=1,h,d;if(S){if(n<m[0][S])return m[0];for(;m[x][S]<n;)x++}else for(;m[x]<n;)x++;return x>m.length&&(x=m.length),S?(h=m[x-1][S],d=m[x][S],d-n<=n-h?m[x]:m[x-1]):(h=m[x-1],d=m[x],d-n<=n-h?d:h)};E.exports=y},43491:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=[]);for(var S=0;S<n.length;S++)Array.isArray(n[S])?y(n[S],m):m.push(n[S]);return m};E.exports=y},46710:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(82011),S=function(x,h,d,t,e){t===void 0&&(t=0),e===void 0&&(e=x.length);var l=[];if(m(x,t,e))for(var i=t;i<e;i++){var s=x[i];(!h||h&&d===void 0&&s.hasOwnProperty(h)||h&&d!==void 0&&s[h]===d)&&l.push(s)}return l};E.exports=S},58731:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(82011),S=function(x,h,d,t,e){t===void 0&&(t=0),e===void 0&&(e=x.length);var l,i;if(t!==-1){if(m(x,t,e)){for(l=t;l<e;l++)if(i=x[l],!h||h&&d===void 0&&i.hasOwnProperty(h)||h&&d!==void 0&&i[h]===d)return i}}else if(m(x,0,e)){for(l=e;l>=0;l--)if(i=x[l],!h||h&&d===void 0&&i.hasOwnProperty(h)||h&&d!==void 0&&i[h]===d)return i}return null};E.exports=S},26546:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){m===void 0&&(m=0),S===void 0&&(S=n.length);var x=m+Math.floor(Math.random()*S);return n[x]===void 0?null:n[x]};E.exports=y},85835:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(m===S)return n;var x=n.indexOf(m),h=n.indexOf(S);if(x<0||h<0)throw new Error("Supplied items must be elements of the same array");return x>h||(n.splice(x,1),h=n.indexOf(S),n.splice(h+1,0,m)),n};E.exports=y},83371:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(m===S)return n;var x=n.indexOf(m),h=n.indexOf(S);if(x<0||h<0)throw new Error("Supplied items must be elements of the same array");return x<h||(n.splice(x,1),h===0?n.unshift(m):n.splice(h,0,m)),n};E.exports=y},70864:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.indexOf(m);if(S>0){var x=n[S-1],h=n.indexOf(x);n[S]=x,n[h]=m}return n};E.exports=y},69693:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=n.indexOf(m);if(x===-1||S<0||S>=n.length)throw new Error("Supplied index out of bounds");return x!==S&&(n.splice(x,1),n.splice(S,0,m)),m};E.exports=y},40853:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.indexOf(m);if(S!==-1&&S<n.length-1){var x=n[S+1],h=n.indexOf(x);n[S]=x,n[h]=m}return n};E.exports=y},20283:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=[],d,t=!1;if((S||x)&&(t=!0,S||(S=""),x||(x="")),m<n)for(d=n;d>=m;d--)t?h.push(S+d.toString()+x):h.push(d);else for(d=n;d<=m;d++)t?h.push(S+d.toString()+x):h.push(d);return h};E.exports=y},593:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(2284),S=function(x,h,d){x===void 0&&(x=0),h===void 0&&(h=null),d===void 0&&(d=1),h===null&&(h=x,x=0);for(var t=[],e=Math.max(m((h-x)/(d||1)),0),l=0;l<e;l++)t.push(x),x+=d;return t};E.exports=S},43886:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function y(S,x,h){var d=S[x];S[x]=S[h],S[h]=d}function n(S,x){return S<x?-1:S>x?1:0}var m=function(S,x,h,d,t){for(h===void 0&&(h=0),d===void 0&&(d=S.length-1),t===void 0&&(t=n);d>h;){if(d-h>600){var e=d-h+1,l=x-h+1,i=Math.log(e),s=.5*Math.exp(2*i/3),r=.5*Math.sqrt(i*s*(e-s)/e)*(l-e/2<0?-1:1),o=Math.max(h,Math.floor(x-l*s/e+r)),a=Math.min(d,Math.floor(x+(e-l)*s/e+r));m(S,x,o,a,t)}var u=S[x],f=h,v=d;for(y(S,h,x),t(S[d],u)>0&&y(S,h,d);f<v;){for(y(S,f,v),f++,v--;t(S[f],u)<0;)f++;for(;t(S[v],u)>0;)v--}t(S[h],u)===0?y(S,h,v):(v++,y(S,v,d)),v<=x&&(h=v+1),x<=v&&(d=v-1)}};E.exports=m},88492:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35154),S=n(33680),x=function(d,t,e){for(var l=[],i=0;i<d.length;i++)for(var s=0;s<t.length;s++)for(var r=0;r<e;r++)l.push({a:d[i],b:t[s]});return l},h=function(d,t,e){var l=m(e,"max",0),i=m(e,"qty",1),s=m(e,"random",!1),r=m(e,"randomB",!1),o=m(e,"repeat",0),a=m(e,"yoyo",!1),u=[];if(r&&S(t),o===-1)if(l===0)o=0;else{var f=d.length*t.length*i;a&&(f*=2),o=Math.ceil(l/f)}for(var v=0;v<=o;v++){var c=x(d,t,i);s&&S(c),u=u.concat(c),a&&(c.reverse(),u=u.concat(c))}return l&&u.splice(l),u};E.exports=h},72905:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19133),S=function(x,h,d,t){t===void 0&&(t=x);var e;if(!Array.isArray(h))return e=x.indexOf(h),e!==-1?(m(x,e),d&&d.call(t,h),h):null;for(var l=h.length-1,i=[];l>=0;){var s=h[l];e=x.indexOf(s),e!==-1&&(m(x,e),i.push(s),d&&d.call(t,s)),l--}return i};E.exports=S},60248:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19133),S=function(x,h,d,t){if(t===void 0&&(t=x),h<0||h>x.length-1)throw new Error("Index out of bounds");var e=m(x,h);return d&&d.call(t,e),e};E.exports=S},81409:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(82011),S=function(x,h,d,t,e){if(h===void 0&&(h=0),d===void 0&&(d=x.length),e===void 0&&(e=x),m(x,h,d)){var l=d-h,i=x.splice(h,l);if(t)for(var s=0;s<i.length;s++){var r=i[s];t.call(e,r)}return i}else return[]};E.exports=S},31856:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(19133),S=function(x,h,d){h===void 0&&(h=0),d===void 0&&(d=x.length);var t=h+Math.floor(Math.random()*d);return m(x,t)};E.exports=S},42169:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=n.indexOf(m),h=n.indexOf(S);return x!==-1&&h===-1?(n[x]=S,!0):!1};E.exports=y},86003:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=1);for(var S=null,x=0;x<m;x++)S=n.shift(),n.push(S);return S};E.exports=y},49498:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){m===void 0&&(m=1);for(var S=null,x=0;x<m;x++)S=n.pop(),n.unshift(S);return S};E.exports=y},82011:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){var h=n.length;if(m<0||m>=h||m>=S||S>h){if(x)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};E.exports=y},89545:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){var S=n.indexOf(m);return S!==-1&&S>0&&(n.splice(S,1),n.unshift(m)),m};E.exports=y},17810:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(82011),S=function(x,h,d,t,e){if(t===void 0&&(t=0),e===void 0&&(e=x.length),m(x,t,e))for(var l=t;l<e;l++){var i=x[l];i.hasOwnProperty(h)&&(i[h]=d)}return x};E.exports=S},33680:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){for(var m=n.length-1;m>0;m--){var S=Math.floor(Math.random()*(m+1)),x=n[m];n[m]=n[S],n[S]=x}return n};E.exports=y},90126:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m=/\D/g;return n.sort(function(S,x){return parseInt(S.replace(m,""),10)-parseInt(x.replace(m,""),10)}),n};E.exports=y},19133:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){if(!(m>=n.length)){for(var S=n.length-1,x=n[m],h=m;h<S;h++)n[h]=n[h+1];return n.length=S,x}};E.exports=y},19186:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Angry Bytes (and contributors)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(82264);function S(t,e){return String(t).localeCompare(e)}function x(t,e){var l=t.length;if(l<=1)return t;for(var i=new Array(l),s=1;s<l;s*=2){h(t,e,s,i);var r=t;t=i,i=r}return t}function h(t,e,l,i){var s=t.length,r=0,o=l*2,a,u,f,v,c;for(a=0;a<s;a+=o)for(u=a+l,f=u+l,u>s&&(u=s),f>s&&(f=s),v=a,c=u;;)if(v<u&&c<f)e(t[v],t[c])<=0?i[r++]=t[v++]:i[r++]=t[c++];else if(v<u)i[r++]=t[v++];else if(c<f)i[r++]=t[c++];else break}var d=function(t,e){if(e===void 0&&(e=S),!t||t.length<2)return t;if(m.features.stableSort)return t.sort(e);var l=x(t,e);return l!==t&&h(l,null,t.length,t),t};E.exports=d},25630:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(m===S)return n;var x=n.indexOf(m),h=n.indexOf(S);if(x<0||h<0)throw new Error("Supplied items must be elements of the same array");return n[x]=S,n[h]=m,n};E.exports=y},37105:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Matrix:n(54915),Add:n(71146),AddAt:n(51067),BringToTop:n(66905),CountAllMatching:n(21612),Each:n(95428),EachInRange:n(36914),FindClosestInSorted:n(81957),Flatten:n(43491),GetAll:n(46710),GetFirst:n(58731),GetRandom:n(26546),MoveDown:n(70864),MoveTo:n(69693),MoveUp:n(40853),MoveAbove:n(85835),MoveBelow:n(83371),NumberArray:n(20283),NumberArrayStep:n(593),QuickSelect:n(43886),Range:n(88492),Remove:n(72905),RemoveAt:n(60248),RemoveBetween:n(81409),RemoveRandomElement:n(31856),Replace:n(42169),RotateLeft:n(86003),RotateRight:n(49498),SafeRange:n(82011),SendToBack:n(89545),SetAll:n(17810),Shuffle:n(33680),SortByDigits:n(90126),SpliceOne:n(19133),StableSort:n(19186),Swap:n(25630)}},86922:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){if(!Array.isArray(n)||!Array.isArray(n[0]))return!1;for(var m=n[0].length,S=1;S<n.length;S++)if(n[S].length!==m)return!1;return!0};E.exports=y},63362:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(41836),S=n(86922),x=function(h){var d="";if(!S(h))return d;for(var t=0;t<h.length;t++){for(var e=0;e<h[t].length;e++){var l=h[t][e].toString();l!=="undefined"?d+=m(l,2):d+="?",e<h[t].length-1&&(d+=" |")}if(t<h.length-1){d+=`
|
||
`;for(var i=0;i<h[t].length;i++)d+="---",i<h[t].length-1&&(d+="+");d+=`
|
||
`}}return d};E.exports=x},92598:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.reverse()};E.exports=y},21224:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){for(var m=0;m<n.length;m++)n[m].reverse();return n};E.exports=y},98717:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37829),S=function(x){return m(x,180)};E.exports=S},44657:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37829),S=function(x,h){h===void 0&&(h=1);for(var d=0;d<h;d++)x=m(x,90);return x};E.exports=S},37829:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(86922),S=n(2429),x=function(h,d){if(d===void 0&&(d=90),!m(h))return null;if(typeof d!="string"&&(d=(d%360+360)%360),d===90||d===-270||d==="rotateLeft")h=S(h),h.reverse();else if(d===-90||d===270||d==="rotateRight")h.reverse(),h=S(h);else if(Math.abs(d)===180||d==="rotate180"){for(var t=0;t<h.length;t++)h[t].reverse();h.reverse()}return h};E.exports=x},92632:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(37829),S=function(x,h){h===void 0&&(h=1);for(var d=0;d<h;d++)x=m(x,-90);return x};E.exports=S},69512:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(86003),S=n(49498),x=function(h,d,t){if(d===void 0&&(d=0),t===void 0&&(t=0),t!==0&&(t<0?m(h,Math.abs(t)):S(h,t)),d!==0)for(var e=0;e<h.length;e++){var l=h[e];d<0?m(l,Math.abs(d)):S(l,d)}return h};E.exports=x},2429:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){for(var m=n.length,S=n[0].length,x=new Array(S),h=0;h<S;h++){x[h]=new Array(m);for(var d=m-1;d>-1;d--)x[h][d]=n[d][h]}return x};E.exports=y},54915:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={CheckMatrix:n(86922),MatrixToString:n(63362),ReverseColumns:n(92598),ReverseRows:n(21224),Rotate180:n(98717),RotateLeft:n(44657),RotateMatrix:n(37829),RotateRight:n(92632),Translate:n(69512),TransposeMatrix:n(2429)}},71334:E=>{/**
|
||
* @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=function(m,S){for(var x=new Uint8Array(m),h=x.length,d=S?"data:"+S+";base64,":"",t=0;t<h;t+=3)d+=y[x[t]>>2],d+=y[(x[t]&3)<<4|x[t+1]>>4],d+=y[(x[t+1]&15)<<2|x[t+2]>>6],d+=y[x[t+2]&63];return h%3===2?d=d.substring(0,d.length-1)+"=":h%3===1&&(d=d.substring(0,d.length-2)+"=="),d};E.exports=n},53134:E=>{/**
|
||
* @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/for(var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),m=0;m<y.length;m++)n[y.charCodeAt(m)]=m;var S=function(x){x=x.substr(x.indexOf(",")+1);var h=x.length,d=h*.75,t=0,e,l,i,s;x[h-1]==="="&&(d--,x[h-2]==="="&&d--);for(var r=new ArrayBuffer(d),o=new Uint8Array(r),a=0;a<h;a+=4)e=n[x.charCodeAt(a)],l=n[x.charCodeAt(a+1)],i=n[x.charCodeAt(a+2)],s=n[x.charCodeAt(a+3)],o[t++]=e<<2|l>>4,o[t++]=(l&15)<<4|i>>2,o[t++]=(i&3)<<6|s&63;return r};E.exports=S},65839:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={ArrayBufferToBase64:n(71334),Base64ToArrayBuffer:n(53134)}},91799:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Array:n(37105),Base64:n(65839),Objects:n(1183),String:n(31749),NOOP:n(29747),NULL:n(20242)}},41786:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m={};for(var S in n)Array.isArray(n[S])?m[S]=n[S].slice(0):m[S]=n[S];return m};E.exports=y},62644:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){var m,S,x;if(typeof n!="object"||n===null)return n;m=Array.isArray(n)?[]:{};for(x in n)S=n[x],m[x]=y(S);return m};E.exports=y},79291:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(41212),S=function(){var x,h,d,t,e,l,i=arguments[0]||{},s=1,r=arguments.length,o=!1;for(typeof i=="boolean"&&(o=i,i=arguments[1]||{},s=2),r===s&&(i=this,--s);s<r;s++)if((x=arguments[s])!=null)for(h in x)d=i[h],t=x[h],i!==t&&(o&&t&&(m(t)||(e=Array.isArray(t)))?(e?(e=!1,l=d&&Array.isArray(d)?d:[]):l=d&&m(d)?d:{},i[h]=S(o,l,t)):t!==void 0&&(i[h]=t));return i};E.exports=S},23568:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(75508),S=n(35154),x=function(h,d,t){var e=S(h,d,null);if(e===null)return t;if(Array.isArray(e))return m.RND.pick(e);if(typeof e=="object"){if(e.hasOwnProperty("randInt"))return m.RND.integerInRange(e.randInt[0],e.randInt[1]);if(e.hasOwnProperty("randFloat"))return m.RND.realInRange(e.randFloat[0],e.randFloat[1])}else if(typeof e=="function")return e(d);return e};E.exports=x},95540:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){var x=typeof n;return!n||x==="number"||x==="string"?S:n.hasOwnProperty(m)&&n[m]!==void 0?n[m]:S};E.exports=y},82840:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(35154),S=n(45319),x=function(h,d,t,e,l){l===void 0&&(l=t);var i=m(h,d,l);return S(i,t,e)};E.exports=x},35154:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){if(!n&&!x||typeof n=="number")return S;if(n&&n.hasOwnProperty(m))return n[m];if(x&&x.hasOwnProperty(m))return x[m];if(m.indexOf(".")!==-1){for(var h=m.split("."),d=n,t=x,e=S,l=S,i=!0,s=!0,r=0;r<h.length;r++)d&&d.hasOwnProperty(h[r])?(e=d[h[r]],d=d[h[r]]):i=!1,t&&t.hasOwnProperty(h[r])?(l=t[h[r]],t=t[h[r]]):s=!1;return i?e:s?l:S}else return S};E.exports=y},69036:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){for(var S=0;S<m.length;S++)if(!n.hasOwnProperty(m[S]))return!1;return!0};E.exports=y},1985:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){for(var S=0;S<m.length;S++)if(n.hasOwnProperty(m[S]))return!0;return!1};E.exports=y},97022:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.hasOwnProperty(m)};E.exports=y},41212:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){if(!n||typeof n!="object"||n.nodeType||n===n.window)return!1;try{if(n.constructor&&!{}.hasOwnProperty.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};E.exports=y},46975:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(41786),S=function(x,h){var d=m(x);for(var t in h)d.hasOwnProperty(t)||(d[t]=h[t]);return d};E.exports=S},269:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(41786),S=function(x,h){var d=m(x);for(var t in h)d.hasOwnProperty(t)&&(d[t]=h[t]);return d};E.exports=S},18254:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var m=n(97022),S=function(x,h){for(var d={},t=0;t<h.length;t++){var e=h[t];m(x,e)&&(d[e]=x[e])}return d};E.exports=S},61622:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S){if(!n||typeof n=="number")return!1;if(n.hasOwnProperty(m))return n[m]=S,!0;if(m.indexOf(".")!==-1){for(var x=m.split("."),h=n,d=n,t=0;t<x.length;t++)if(h.hasOwnProperty(x[t]))d=h,h=h[x[t]];else return!1;return d[x[x.length-1]]=S,!0}return!1};E.exports=y},1183:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Clone:n(41786),DeepCopy:n(62644),Extend:n(79291),GetAdvancedValue:n(23568),GetFastValue:n(95540),GetMinMaxValue:n(82840),GetValue:n(35154),HasAll:n(69036),HasAny:n(1985),HasValue:n(97022),IsPlainObject:n(41212),Merge:n(46975),MergeRight:n(269),Pick:n(18254),SetValue:n(61622)}},27902:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return n.replace(/%([0-9]+)/g,function(S,x){return m[Number(x)-1]})};E.exports=y},41836:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m,S,x){m===void 0&&(m=0),S===void 0&&(S=" "),x===void 0&&(x=3),n=n.toString();var h=0;if(m+1>=n.length)switch(x){case 1:n=new Array(m+1-n.length).join(S)+n;break;case 3:var d=Math.ceil((h=m-n.length)/2),t=h-d;n=new Array(t+1).join(S)+n+new Array(d+1).join(S);break;default:n=n+new Array(m+1-n.length).join(S);break}return n};E.exports=y},33628:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n,m){return m===0?n.slice(1):n.slice(0,m)+n.slice(m+1)};E.exports=y},27671:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n.split("").reverse().join("")};E.exports=y},45650:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var m=Math.random()*16|0,S=n==="x"?m:m&3|8;return S.toString(16)})};E.exports=y},35355:E=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var y=function(n){return n&&n[0].toUpperCase()+n.slice(1)};E.exports=y},31749:(E,y,n)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/E.exports={Format:n(27902),Pad:n(41836),RemoveAt:n(33628),Reverse:n(27671),UppercaseFirst:n(35355),UUID:n(45650)}}},bi={};function Gt(E){var y=bi[E];if(y!==void 0)return y.exports;var n=bi[E]={exports:{}};return yn[E](n,n.exports,Gt),n.exports}Gt.d=(E,y)=>{for(var n in y)Gt.o(y,n)&&!Gt.o(E,n)&&Object.defineProperty(E,n,{enumerable:!0,get:y[n]})};Gt.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();Gt.o=(E,y)=>Object.prototype.hasOwnProperty.call(E,y);var Nt={};(()=>{Gt.d(Nt,{A4:()=>p,AB:()=>P,AQ:()=>c,Aq:()=>B,B_:()=>t,CB:()=>z,Cu:()=>s,D7:()=>L,Dh:()=>a,En:()=>y,FE:()=>T,Fu:()=>O,M3:()=>b,NS:()=>Y,O1:()=>F,PX:()=>H,Q8:()=>D,Qw:()=>n,SY:()=>U,Tm:()=>x,UP:()=>W,XT:()=>d,Z5:()=>M,Zt:()=>r,_k:()=>A,aH:()=>f,dv:()=>l,gX:()=>w,gd:()=>m,ho:()=>R,iJ:()=>h,j$:()=>N,l2:()=>S,nl:()=>e,pd:()=>u,qt:()=>V,ry:()=>g,sV:()=>i,x3:()=>G,xS:()=>o,xv:()=>I,zA:()=>C,zU:()=>v});/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/Gt(63595);var E=Gt(8054);const y=Gt(61061),n=Gt(60421),m=Gt(10312),S=Gt(83388),x=Gt(26638),h=Gt(42857),d=Gt(25410),t=Gt(44965),e=Gt(27460),l=Gt(84902),i=Gt(93055),s=Gt(11889),r=Gt(50127),o=Gt(77856),a=Gt(55738),u=Gt(14350),f=Gt(57777),v=Gt(75508),c=Gt(44563),g=Gt(18922),p=Gt(36909),T=Gt(93364),C=Gt(29795),M=Gt(97482),A=Gt(62194),R=Gt(41392),P=Gt(23717),L=Gt(27458),F=Gt(62501),w=Gt(90291),O=Gt(43066),B=Gt(91799),I=E.VERSION,D=E.AUTO,N=E.CANVAS,z=E.WEBGL,V=E.HEADLESS,U=E.FOREVER,G=E.NONE,b=E.LEFT,Y=E.RIGHT,W=E.UP,H=E.DOWN})();var Tn=Nt.Q8;Nt.En;Nt.Qw;Nt.gd;Nt.j$;Nt.l2;Nt.Tm;Nt.iJ;Nt.XT;Nt.dv;Nt.PX;Nt.B_;Nt.nl;Nt.sV;Nt.SY;Nt.Cu;var Sn=Nt.Zt;Nt.xS;Nt.Dh;Nt.qt;Nt.pd;Nt.M3;Nt.aH;var ai=Nt.zU;Nt.x3;Nt.AQ;Nt.ry;Nt.NS;Nt.A4;var Gi=Nt.FE;Nt.zA;var ce=Nt.Z5;Nt._k;Nt.AB;Nt.ho;Nt.D7;Nt.O1;Nt.gX;Nt.Fu;Nt.UP;Nt.Aq;Nt.xv;Nt.CB;class Cn extends ce{constructor(){super({key:"MenuScene"})}create(){const{width:y,height:n}=this.cameras.main,m=localStorage.getItem("bgmVolume");this.bgmVolume=m?parseFloat(m):.1,this.add.rectangle(y/2,n/2,y,n,1710638);const S=this.add.text(y/2,n*.15,"MINE BATTLE",{fontSize:"56px",fontStyle:"bold",color:"#00ff88",stroke:"#000",strokeThickness:6}).setOrigin(.5);this.add.text(y/2,n*.22,"多人竞技扫雷",{fontSize:"22px",color:"#a0aec0"}).setOrigin(.5),this.tweens.add({targets:S,scale:{from:1,to:1.08},duration:1200,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"});const x=this.add.rectangle(y/2,n*.35,280,55,52479).setInteractive({useHandCursor:!0}).setStrokeStyle(3,39372);this.add.text(y/2,n*.35,"🌐 联机对战",{fontSize:"26px",fontStyle:"bold",color:"#1a1a2e"}).setOrigin(.5),x.on("pointerover",()=>{x.setFillStyle(3399167),x.setScale(1.05)}),x.on("pointerout",()=>{x.setFillStyle(52479),x.setScale(1)}),x.on("pointerdown",()=>{localStorage.setItem("bgmVolume",this.bgmVolume.toString()),this.scene.start("LobbyScene",{mode:"minesweeper"})});const h=this.add.rectangle(y/2,n*.46,280,55,65416).setInteractive({useHandCursor:!0}).setStrokeStyle(3,52330);this.add.text(y/2,n*.46,"🤖 人机对战",{fontSize:"26px",fontStyle:"bold",color:"#1a1a2e"}).setOrigin(.5),h.on("pointerover",()=>{h.setFillStyle(65433),h.setScale(1.05)}),h.on("pointerout",()=>{h.setFillStyle(65416),h.setScale(1)}),h.on("pointerdown",()=>{localStorage.setItem("bgmVolume",this.bgmVolume.toString()),this.scene.start("RoomScene")});const d=this.add.rectangle(y/2,n*.57,200,50,10181046).setInteractive({useHandCursor:!0}).setStrokeStyle(3,9323693);this.add.text(y/2,n*.57,"📖 游戏说明",{fontSize:"22px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),d.on("pointerover",()=>{d.setFillStyle(11037641),d.setScale(1.05)}),d.on("pointerout",()=>{d.setFillStyle(10181046),d.setScale(1)}),d.on("pointerdown",()=>{this.scene.start("HelpScene")}),this.createVolumeControl(y,n),this.add.text(y/2,n*.72,"多人对战:回合制策略扫雷",{fontSize:"14px",color:"#888888"}).setOrigin(.5);const t=this.add.text(y/2,n*.88,"🦆 没有套路的真盲盒 🦆",{fontSize:"18px",fontStyle:"bold",color:"#ffcc00",stroke:"#000",strokeThickness:2}).setOrigin(.5);this.add.text(y/2,n*.94,"© 2025-2026 柯大鸭 版权所有",{fontSize:"18px",color:"#888888"}).setOrigin(.5),this.tweens.add({targets:t,alpha:{from:1,to:.6},duration:1e3,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"})}createVolumeControl(y,n){const m=n*.8,S=y/2,x=200,h=10;this.add.text(S,m-25,"🎵 BGM音量",{fontSize:"18px",fontStyle:"bold",color:"#00ff88"}).setOrigin(.5);const d=this.add.rectangle(S,m,x,h,2963272).setStrokeStyle(2,4871528),t=x*this.bgmVolume;this.volumeFill=this.add.rectangle(S-x/2+t/2,m,t,h,65416).setOrigin(.5,.5),this.volumeKnob=this.add.circle(S-x/2+t,m,15,65416).setStrokeStyle(2,52330).setInteractive({useHandCursor:!0,draggable:!0}),this.volumeText=this.add.text(S,m+25,`${Math.round(this.bgmVolume*100)}%`,{fontSize:"16px",color:"#ffffff",fontStyle:"bold"}).setOrigin(.5),this.volumeKnob.on("pointerover",()=>{this.volumeKnob.setStrokeStyle(3,65433),this.volumeKnob.setScale(1.2)}),this.volumeKnob.on("pointerout",()=>{this.volumeKnob.setStrokeStyle(2,52330),this.volumeKnob.setScale(1)}),this.volumeKnob.on("pointerdown",()=>{this.volumeKnob.setData("isDragging",!0)}),this.input.on("pointermove",e=>{this.volumeKnob.getData("isDragging")&&this.updateVolume(e.x,S,x)}),this.input.on("pointerup",()=>{this.volumeKnob.getData("isDragging")&&(this.volumeKnob.setData("isDragging",!1),localStorage.setItem("bgmVolume",this.bgmVolume.toString()))}),d.setInteractive(),d.on("pointerdown",e=>{this.updateVolume(e.x,S,x),this.volumeKnob.setData("isDragging",!0)})}updateVolume(y,n,m){const S=n-m/2,x=n+m/2;let h=ai.Clamp(y,S,x);this.bgmVolume=(h-S)/m,this.bgmVolume=ai.Clamp(this.bgmVolume,0,1),this.volumeKnob.x=h;const d=m*this.bgmVolume;this.volumeFill.x=n-m/2+d/2,this.volumeFill.width=d,this.volumeText.setText(`${Math.round(this.bgmVolume*100)}%`),this.bgmVolume===0&&this.volumeText.setText("🔇 0%")}showToast(y){const{width:n,height:m}=this.cameras.main,S=this.add.container(n/2,m*.4).setDepth(99999),x=this.add.rectangle(0,0,300,50,2963272,.9).setStrokeStyle(2,65416),h=this.add.text(0,0,y,{fontSize:"16px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);S.add([x,h]),S.alpha=0,this.tweens.add({targets:S,alpha:1,duration:200,ease:"Power2"}),this.time.delayedCall(2e3,()=>{this.tweens.add({targets:S,alpha:0,duration:200,ease:"Power2",onComplete:()=>{S.destroy()}})})}}const bt={ELEPHANT:"elephant",CAT:"cat",DOG:"dog",MONKEY:"monkey",CHICKEN:"chicken",SLOTH:"sloth",HIPPO:"hippopotamus",TIGER:"tiger"},Ge={[bt.ELEPHANT]:"elephant.jpg",[bt.CAT]:"cat.jpg",[bt.DOG]:"doggy.jpg",[bt.MONKEY]:"monkey.jpg",[bt.CHICKEN]:"chicken.jpg",[bt.SLOTH]:"sloth.jpg",[bt.HIPPO]:"hippopotamus.jpg",[bt.TIGER]:"tiger.jpg"},En={[bt.ELEPHANT]:{id:bt.ELEPHANT,name:"大象",maxHP:5,description:"血厚5点,但不能用医疗包/复活甲/好人卡",passive:"no_heal_items",avatar:Ge[bt.ELEPHANT]},[bt.CAT]:{id:bt.CAT,name:"猫",maxHP:3,description:"灵动:单次受害强制为1",passive:"damage_reduction",avatar:Ge[bt.CAT]},[bt.DOG]:{id:bt.DOG,name:"狗",maxHP:3,description:"嗅觉:回合数是4的倍数时,获得一个格子的提示信息",passive:"sniff",avatar:Ge[bt.DOG]},[bt.MONKEY]:{id:bt.MONKEY,name:"猴子",maxHP:4,description:"采摘:每回合8%有概率回1血(限2次)",passive:"gather",avatar:Ge[bt.MONKEY]},[bt.CHICKEN]:{id:bt.CHICKEN,name:"鸡",maxHP:4,description:"应激:受创时有8%概率得防御道具(限2次)",passive:"stress",avatar:Ge[bt.CHICKEN]},[bt.SLOTH]:{id:bt.SLOTH,name:"树懒",maxHP:3,description:"慵懒:免疫中毒,炸弹伤害减半",passive:"poison_immune_bomb_halved",avatar:Ge[bt.SLOTH]},[bt.HIPPO]:{id:bt.HIPPO,name:"河马",maxHP:4,description:"顽强:存活时不能捡道具,死亡时33%概率复活",passive:"revive_chance",avatar:Ge[bt.HIPPO]},[bt.TIGER]:{id:bt.TIGER,name:"老虎",maxHP:4,description:"猛击:飞刀伤害+1并变为群体",passive:"dagger_boost",avatar:Ge[bt.TIGER]}};class be{constructor(y){this.id=y.id,this.name=y.name,this.maxHP=y.maxHP,this.description=y.description,this.passive=y.passive,this.avatar=y.avatar}onDamage(y,n){return y}canUseItem(y){return!0}onTurnStart(y){}onTurnEnd(y){}onKill(y,n){}onGameStart(y){}}class An extends be{onDamage(y,n){const m=y>1?1:y,S=m>0;return{damage:m,agilityReaction:S}}}class Mn extends be{canUseItem(y){return!["medkit","resurrection","good_card"].includes(y)}}class Rn extends be{onTurnStart(y){return y.turnCount=(y.turnCount||0)+1,y.turnCount%4===0?{type:"sniff",turnCount:y.turnCount}:null}}class Pn extends be{constructor(y){super(y),this.healCount=0}onTurnStart(y){return this.healCount<2&&Math.random()<.08&&y.hp<this.maxHP?(this.healCount++,y.hp++,{type:"heal",amount:1}):null}}class Ln extends be{constructor(y){super(y),this.stressCount=0}onDamage(y,n){if(this.stressCount<2&&Math.random()<.08){this.stressCount++;const m=["shield","good_card"],S=m[Math.floor(Math.random()*m.length)];return n.inventory.push(S),console.log(`[鸡应激] 获得道具: ${S}`),{damage:y,bonusItem:S,stressReaction:!0}}return y}}class Fn extends be{onDamage(y,n,m){return m==="bomb"?{damage:Math.ceil(y/2),slothBombResist:!0}:m==="poison"?{damage:0,slothPoisonImmune:!0}:y}onTurnStart(y){return y.poisoned>0?(y.poisoned=0,{type:"poison_cleared",slothAbility:!0}):null}}class On extends be{onGameStart(y){return y.canPickItems=!1,null}onDeath(y){return Math.random()<.33?(y.isDead=!1,y.hp=2,{type:"revive"}):null}}class wn extends be{}class Se{static create(y){const n=En[y];if(!n)throw new Error(`Unknown character type: ${y}`);switch(y){case bt.ELEPHANT:return new Mn(n);case bt.CAT:return new An(n);case bt.DOG:return new Rn(n);case bt.MONKEY:return new Pn(n);case bt.CHICKEN:return new Ln(n);case bt.SLOTH:return new Fn(n);case bt.HIPPO:return new On(n);case bt.TIGER:return new wn(n);default:return new be(n)}}}const Ht={MEDKIT:"medkit",TIME_BOMB:"time_bomb",POISON:"poison",SHIELD:"shield",GOOD_CARD:"good_card",MAGNIFIER:"magnifier",DAGGER:"dagger",RESURRECTION:"resurrection",LIGHTNING:"lightning",CHEST:"chest",CURSE:"curse"},Xe={[Ht.MEDKIT]:{id:Ht.MEDKIT,name:"医疗包",icon:"icon_medkit.png",description:"恢复1点血量,并且移除中毒状态",rarity:"common",weight:10},[Ht.TIME_BOMB]:{id:Ht.TIME_BOMB,name:"定时炸弹",icon:"icon_time_bomb.png",description:"玩家行动3次后爆炸,并且波及临近的玩家",rarity:"rare",weight:10},[Ht.POISON]:{id:Ht.POISON,name:"剧毒",icon:"icon_poison.png",description:"中毒后玩家每行动2次扣1点血量",rarity:"uncommon",weight:15},[Ht.SHIELD]:{id:Ht.SHIELD,name:"护盾",icon:"icon_shield.png",description:"抵挡一次伤害",rarity:"uncommon",weight:10},[Ht.GOOD_CARD]:{id:Ht.GOOD_CARD,name:"好人卡",icon:"icon_good_card.png",description:"跳过本轮",rarity:"rare",weight:10},[Ht.MAGNIFIER]:{id:Ht.MAGNIFIER,name:"放大镜",icon:"icon_magnifier.png",description:"透视一格的内容,优先告知有道具的格子",rarity:"common",weight:10},[Ht.DAGGER]:{id:Ht.DAGGER,name:"飞刀",icon:"icon_dagger.png",description:"对一名对手造成1点伤害,老虎在场时变成2点并群体",rarity:"uncommon",weight:10},[Ht.RESURRECTION]:{id:Ht.RESURRECTION,name:"复活甲",icon:"icon_resurrection.png",description:"死亡时原地复活1血",rarity:"legendary",weight:5},[Ht.LIGHTNING]:{id:Ht.LIGHTNING,name:"雷击",icon:"icon_lightning.png",description:"对所有玩家造成1点伤害",rarity:"rare",weight:10},[Ht.CHEST]:{id:Ht.CHEST,name:"宝箱",icon:"icon_chest.png",description:"获得指定优惠券",rarity:"epic",weight:10},[Ht.CURSE]:{id:Ht.CURSE,name:"诅咒",icon:"icon_curse.png",description:"下次受到伤害翻倍",rarity:"rare",weight:10}};class gi{static apply(y,n,m=null,S={}){const x={success:!1,message:"",effects:[]};switch(y){case Ht.MEDKIT:if(console.log(`医疗包使用前 - hp: ${n.hp}, maxHP: ${n.maxHP}, poisoned: ${n.poisoned}`),n.hp<n.maxHP||n.poisoned>0){const p=n.hp;n.hp=Math.min(n.maxHP,n.hp+1);const T=n.poisoned>0;n.poisoned=0,n.poisonActionCount=0;const C=n.hp-p;x.success=!0;let M=[`${n.name} 使用了医疗包`];C>0&&M.push(`回复${C}点生命`),T&&M.push("移除了中毒状态"),x.message=M.join(","),x.effects.push({type:"heal",amount:C,target:n.id}),x.effects.push({type:"cure_poison",target:n.id}),console.log(`医疗包使用后 - hp: ${n.hp}, healAmount: ${C}`)}else x.message="生命值已满且未中毒,无法使用医疗包",console.log("医疗包无法使用:生命值已满且未中毒");break;case Ht.TIME_BOMB:const d=(S.players||[]).filter(p=>!p.isDead);if(d.length>0){const p=d[Math.floor(Math.random()*d.length)];p.timeBombRounds=3,x.success=!0,p.id===n.id?x.message=`${n.name} 使用定时炸弹,不幸安装到了自己身上,3次行动后爆炸`:x.message=`${n.name} 使用定时炸弹,安装到了 ${p.name} 身上,3次行动后爆炸`,x.effects.push({type:"time_bomb",rounds:3,target:p.id})}else x.message="没有有效的目标可以安装定时炸弹";break;case Ht.POISON:const e=(S.players||[]).filter(p=>!p.isDead);if(e.length>0){const p=e[Math.floor(Math.random()*e.length)];p.poisoned=4,p.poisonActionCount=0,x.success=!0,p.id===n.id?x.message=`${n.name} 给自己下毒了`:x.message=`${n.name} 给 ${p.name} 下毒了`,x.effects.push({type:"poison",rounds:4,target:p.id}),x.effects.push({type:"poison_animation",target:p.id})}else x.message="没有有效的目标可以下毒";break;case Ht.SHIELD:n.shield?x.message="已有护盾":(n.shield=!0,x.success=!0,x.message=`${n.name} 获得了护盾`,x.effects.push({type:"shield",target:n.id}));break;case Ht.GOOD_CARD:n.skipNextTurn=!0,x.success=!0,x.message=`${n.name} 使用了好人卡,下回合将被跳过`,x.effects.push({type:"skip_turn",target:n.id}),x.effects.push({type:"good_card_animation",target:n.id});break;case Ht.MAGNIFIER:const l=S.board||[],i=[];for(let p=0;p<l.length;p++)for(let T=0;T<l[p].length;T++){const C=l[p][T];C.revealed||i.push({x:T,y:p,type:C.type,itemType:C.itemType})}if(i.length===0){x.message="没有可透视的格子";break}let s=i.find(p=>p.type==="item");s||(s=i.find(p=>p.type==="empty")),s||(s=i[Math.floor(Math.random()*i.length)]),x.success=!0,x.message=`${n.name} 使用了放大镜`,x.effects.push({type:"magnifier",userId:n.id,targetCell:{x:s.x,y:s.y,cellType:s.type}});break;case Ht.DAGGER:const r=S.players||[],o=r.filter(p=>!p.isDead&&p.id!==n.id);if(m){let p=1,T=!1,C=null;const M=r.find(R=>!R.isDead&&R.characterType==="tiger");M&&(p=2,T=!0,C=M);const A=[];T?(r.forEach(R=>{!R.isDead&&R.id!==n.id&&A.push({target:R.id,damage:p,weapon:"dagger"})}),x.success=!0,x.message=`【老虎】特性触发,飞刀变成群体伤害,对所有敌人造成${p}点伤害!`,x.effects.push({type:"tiger_ability",player:C.id})):(x.success=!0,x.message=`${n.name} 对 ${m.name} 使用飞刀,造成1点伤害`,A.push({target:m.id,damage:p,weapon:"dagger"})),x.effects.push({type:"damage",amount:p,isAOE:T,damages:A})}else if(o.length>0){let p=1,T=!1,C=null;const M=r.find(P=>!P.isDead&&P.characterType==="tiger");M&&(p=2,T=!0,C=M);const A=[],R=o[Math.floor(Math.random()*o.length)];T?(r.forEach(P=>{!P.isDead&&P.id!==n.id&&A.push({target:P.id,damage:p,weapon:"dagger"})}),x.success=!0,x.message=`【老虎】特性触发,飞刀变成群体伤害,对所有敌人造成${p}点伤害!`,x.effects.push({type:"tiger_ability",player:C.id})):(x.success=!0,x.message=`${n.name} 对 ${R.name} 使用飞刀,造成1点伤害`,A.push({target:R.id,damage:p,weapon:"dagger"})),x.effects.push({type:"damage",amount:p,isAOE:T,damages:A})}else x.message="没有有效的目标可以使用飞刀";break;case Ht.RESURRECTION:n.resurrectionCard=!0,x.success=!0,x.message=`${n.name} 获得了复活甲`,x.effects.push({type:"resurrection",target:n.id});break;case Ht.LIGHTNING:const a=S.players||[],u=[];a.forEach(p=>{!p.isDead&&p.id!==n.id&&u.push({target:p.id,damage:1})}),x.success=!0,x.message=`${n.name} 使用了雷击,对所有玩家造成1点伤害!`,x.effects.push({type:"damage",amount:1,isAOE:!0,damageType:"lightning",damages:u});break;case Ht.CHEST:const v=this.generateChestReward().items[0];if(v){const p=this.apply(v,n,m,S);x.success=p.success,x.message=`${n.name} 开启了宝箱,获得了 ${Xe[v]?.name||v},${p.message||""}`,x.effects.push(...p.effects||[]),x.effects.push({type:"chest",items:[v]})}else x.message="宝箱是空的";break;case Ht.CURSE:const g=(S.players||[]).filter(p=>!p.isDead);if(g.length>0){const p=g[Math.floor(Math.random()*g.length)];p.cursed=1,x.success=!0,p.id===n.id?x.message=`${n.name} 诅咒了自己,下次受到的伤害翻倍`:x.message=`${n.name} 诅咒了 ${p.name},下次受到的伤害翻倍`,x.effects.push({type:"curse",rounds:1,target:p.id})}else x.message="没有有效的目标可以诅咒";break}return x}static generateChestReward(){const y=[],n=[];for(const[m,S]of Object.entries(Xe)){const x=S.weight||10;for(let h=0;h<x;h++)n.push(m)}if(n.length>0){const m=Math.floor(Math.random()*n.length);y.push(n[m])}return{items:y}}static generateRandomItems(y){const n=[],m=[];for(const[S,x]of Object.entries(Xe)){const h=x.weight||10;for(let d=0;d<h;d++)m.push(S)}for(let S=0;S<y;S++)if(m.length>0){const x=Math.floor(Math.random()*m.length);n.push(m[x])}return n}static canCraft(y,n){const m=y.replace("_fragment","");return n>=4&&Xe[m]}static craft(y,n){const m=y.replace("_fragment","");if(!this.canCraft(y,4))return{success:!1,message:"碎片不足"};let S=0;return n.fragments=n.fragments.filter(x=>x===y&&S<4?(S++,!1):!0),n.inventory.push(m),{success:!0,message:`成功合成 ${Xe[m].name}`,item:m}}}const se={EASY:"easy",MEDIUM:"medium",HARD:"hard"};class Dn{constructor(y,n,m=se.MEDIUM){this.id=y,this.name=n,this.difficulty=m,this.thinkingTime=1e3}chooseCell(y,n,m,S,x=30,h=null){const d=[];for(let t=0;t<y.length;t++)for(let e=0;e<y[t].length;e++)y[t][e].revealed||d.push({x:e,y:t});if(d.length===0)return null;if(h&&h.itemCells&&h.itemCells.length>0){const t=h.itemCells.filter(e=>d.some(l=>l.x===e.x&&l.y===e.y));if(t.length>0)return console.log(`[AI] 发现 ${t.length} 个道具提示格子,优先点击`),t[Math.floor(Math.random()*t.length)]}if(h&&h.safeCells&&h.safeCells.length>0){const t=h.safeCells.filter(e=>d.some(l=>l.x===e.x&&l.y===e.y)&&e.type!=="bomb");if(t.length>0)return console.log(`[AI] 发现 ${t.length} 个安全提示格子,优先点击`),t[Math.floor(Math.random()*t.length)]}switch(this.difficulty){case se.EASY:return this.randomChoice(d);case se.MEDIUM:return this.mediumStrategy(d,y,n,x);case se.HARD:return this.hardStrategy(d,y,n,m,S,x);default:return this.randomChoice(d)}}randomChoice(y){const n=Math.floor(Math.random()*y.length);return y[n]}mediumStrategy(y,n,m,S){const x=this.findDefinitelySafeCells(n);if(x.length>0&&Math.random()<.8)return x[Math.floor(Math.random()*x.length)];if(Math.random()<.5){const d=y.filter(t=>t.x===0||t.x===n[0].length-1||t.y===0||t.y===n.length-1);if(d.length>0){const t=Math.floor(Math.random()*d.length);return d[t]}}const h=Math.floor(Math.random()*y.length);return y[h]}hardStrategy(y,n,m,S,x,h=30){const d=this.findDefinitelySafeCells(n);if(d.length>0)return console.log(`[AI] 找到 ${d.length} 个确定性安全格子`),d[Math.floor(Math.random()*d.length)];const t=this.calculateBombProbability(n,h),e=this.findDefiniteBombCells(n),l=new Set(e.map(r=>`${r.x},${r.y}`));let i=y.filter(r=>!l.has(`${r.x},${r.y}`));i.length===0&&(console.log("[AI] 所有格子都是炸弹,随机选择"),i=y);const s=this.chooseLowestProbabilityCell(i,t);if(s){const r=t.get(`${s.x},${s.y}`);return console.log(`[AI] 选择概率最低的格子 (${s.x},${s.y}), 概率: ${(r*100).toFixed(1)}%`),s}return console.log("[AI] 概率计算失败,使用后备策略"),this.fallbackStrategy(y,n)}fallbackStrategy(y,n){const m=y.filter(h=>h.x===0||h.x===n[0].length-1||h.y===0||h.y===n.length-1),S=y.filter(h=>!this.getNeighbors(h.x,h.y,n).some(t=>t.revealed&&t.type==="bomb")),x=y.filter(h=>this.getNeighbors(h.x,h.y,n).some(t=>t.revealed&&t.type==="empty"));if(S.length>0&&x.length>0){const h=S.filter(d=>x.some(t=>t.x===d.x&&t.y===d.y));if(h.length>0)return h[Math.floor(Math.random()*h.length)]}return S.length>0?S[Math.floor(Math.random()*S.length)]:m.length>0?m[Math.floor(Math.random()*m.length)]:y[Math.floor(Math.random()*y.length)]}getNeighborCoords(y,n,m){const S=[];for(let x=-1;x<=1;x++)for(let h=-1;h<=1;h++){if(h===0&&x===0)continue;const d=y+h,t=n+x;t>=0&&t<m.length&&d>=0&&d<m[0].length&&S.push({x:d,y:t,cell:m[t][d]})}return S}getNeighbors(y,n,m){const S=[];for(let x=-1;x<=1;x++)for(let h=-1;h<=1;h++){if(h===0&&x===0)continue;const d=y+h,t=n+x;t>=0&&t<m.length&&d>=0&&d<m[0].length&&S.push(m[t][d])}return S}findDefinitelySafeCells(y){const n=[],m=new Set;for(let S=0;S<y.length;S++)for(let x=0;x<y[S].length;x++){const h=y[S][x];if(!h.revealed||h.bombCount===void 0||h.bombCount===0)continue;const d=this.getNeighborCoords(x,S,y),t=d.filter(s=>!s.cell.revealed&&!s.cell.flagged),e=d.filter(s=>s.cell.flagged).length,l=d.filter(s=>s.cell.revealed&&s.cell.type==="bomb").length;if(e+l>=h.bombCount&&t.length>0)for(const s of t){const r=`${s.x},${s.y}`;m.has(r)||(m.add(r),n.push({x:s.x,y:s.y}))}}return n}findDefiniteBombCells(y){const n=[],m=new Set;for(let S=0;S<y.length;S++)for(let x=0;x<y[S].length;x++){const h=y[S][x];if(!h.revealed||h.bombCount===void 0||h.bombCount===0)continue;const d=this.getNeighborCoords(x,S,y),t=d.filter(s=>!s.cell.revealed&&!s.cell.flagged),e=d.filter(s=>s.cell.flagged).length,l=d.filter(s=>s.cell.revealed&&s.cell.type==="bomb").length,i=e+l;if(t.length+i===h.bombCount&&t.length>0)for(const s of t){const r=`${s.x},${s.y}`;m.has(r)||(m.add(r),n.push({x:s.x,y:s.y}))}}return n}calculateBombProbability(y,n){const m=new Map,S=[];let x=0;for(let t=0;t<y.length;t++)for(let e=0;e<y[t].length;e++){const l=y[t][e];l.revealed&&l.type==="bomb"&&x++,!l.revealed&&!l.flagged&&S.push({x:e,y:t,cell:l})}if(S.length===0)return m;const d=(n-x)/S.length;for(const t of S)m.set(`${t.x},${t.y}`,d);for(const t of S){const l=this.getNeighborCoords(t.x,t.y,y).filter(r=>r.cell.revealed&&r.cell.bombCount!==void 0&&r.cell.bombCount>0);if(l.length===0)continue;let i=0,s=0;for(const r of l){const o=this.getNeighborCoords(r.x,r.y,y),a=o.filter(c=>!c.cell.revealed&&!c.cell.flagged),u=o.filter(c=>c.cell.flagged).length,f=o.filter(c=>c.cell.revealed&&c.cell.type==="bomb").length,v=r.cell.bombCount-u-f;if(a.length>0&&v>=0){const c=v/a.length;i+=c,s++}}if(s>0){const r=i/s,o=d*.3+r*.7;m.set(`${t.x},${t.y}`,Math.min(1,Math.max(0,o)))}}return m}chooseLowestProbabilityCell(y,n){if(y.length===0)return null;const m=y.map(x=>({...x,prob:n.get(`${x.x},${x.y}`)||.5})).sort((x,h)=>x.prob-h.prob),S=m.slice(0,Math.min(3,m.length));return S[Math.floor(Math.random()*S.length)]}shouldUseItem(y,n,m){if(this.difficulty===se.EASY)return null;const S=y.inventory;if(S.length===0)return null;const x=this.difficulty===se.HARD?.6:.3;if(Math.random()>x)return null;for(const h of S){const d=this.evaluateItemUse(h,y,n,m);if(d.shouldUse)return{itemId:h,targetId:d.targetId}}return null}evaluateItemUse(y,n,m,S){const x=m.filter(h=>!h.isDead&&h.id!==n.id);switch(y){case"medkit":if(n.hp<n.maxHP*.5)return{shouldUse:!0,targetId:null};break;case"shield":if(!n.shield&&n.hp<n.maxHP*.7)return{shouldUse:!0,targetId:null};break;case"dagger":if(x.length>0)return{shouldUse:!0,targetId:x.reduce((d,t)=>t.hp<d.hp?t:d).id};break;case"poison":case"curse":case"time_bomb":if(x.length>0)return{shouldUse:!0,targetId:x.reduce((d,t)=>t.hp>d.hp?t:d).id};break;case"magnifier":if(this.difficulty===se.HARD)return{shouldUse:!0,targetId:null};break}return{shouldUse:!1,targetId:null}}async think(){const y=this.thinkingTime+Math.random()*500;await new Promise(n=>setTimeout(n,y))}}class Bn{constructor(){this.aiPlayers=[]}createAI(y,n,m=se.MEDIUM){const S=new Dn(y,n,m);return this.aiPlayers.push(S),S}assignRandomCharacter(y,n){const m=Object.values(bt),S=m[Math.floor(Math.random()*m.length)];n.characterType=S;const x=Se.create(S);return n.maxHP=x.maxHP,n.hp=x.maxHP,x}async executeAITurn(y,n,m,S=null){await y.think();const x=y.shouldUseItem(n,m.players,m);x&&(m.useItem(x.itemId,x.targetId),await y.think());const h=m.board,d=h.flat().filter(e=>e.revealed),t=y.chooseCell(h,d,m.players,m.currentPlayerIndex,m.totalBombs,S);t&&m.processClick(t.x,t.y)}createAIPool(y,n=se.MEDIUM){const m=["AI-阿尔法","AI-贝塔","AI-伽马","AI-德尔塔","AI-欧米伽"],S=[];for(let x=0;x<y&&x<m.length;x++){const h=this.createAI(`ai_${x+1}`,m[x],n);S.push(h)}return S}clear(){this.aiPlayers=[]}}const jt=class jt{static getViewportHeight(){return(window.visualViewport?window.visualViewport.height:null)||window.innerHeight||screen.height}static getViewportWidth(){return(window.visualViewport?window.visualViewport.width:null)||window.innerWidth||screen.width}static getViewportScale(){return jt.getViewportHeight()/jt.designHeight}static isCompactLayout(){return jt.getViewportScale()<jt.compactThreshold}static viewportToGame(y){const n=jt.getViewportScale();return y/n}static gameToViewport(y){const n=jt.getViewportScale();return y*n}static getButtonReservedHeight(y=40){const n=jt.getViewportScale(),m=jt.safeAreaBottom+y;return Math.ceil(m/n)}static getAvailableContentArea(y,n,m=40){const S=jt.getButtonReservedHeight(m),x=n-S;return{start:y,end:x,height:x-y}}static calculatePanelHeight(y,n,m=6,S=45){const x=(n-1)*m;return Math.max(S,Math.floor((y-x)/n))}static getFontSize(y,n){const m=jt.getViewportScale(),S=parseInt(y),x=parseInt(n),h=Math.round(S/m);return`${Math.max(x,Math.min(S*1.5,h))}px`}static getSize(y,n){const m=jt.getViewportScale(),S=Math.round(y/m);return Math.max(n,Math.min(y*1.5,S))}static getY(y,n){return jt.isCompactLayout()?n:y}static logLayoutInfo(){const y=jt.getViewportHeight(),n=jt.getViewportScale(),m=jt.isCompactLayout();console.log(`[ResponsiveLayout] 视口高度: ${y}, 设计高度: ${jt.designHeight}, 缩放比例: ${n.toFixed(2)}, 使用${m?"紧凑":"正常"}布局`)}};$(jt,"designWidth",750),$(jt,"designHeight",1334),$(jt,"compactThreshold",.75),$(jt,"safeAreaBottom",80);let vt=jt;class In extends ce{constructor(){super({key:"RoomScene"}),this.totalPlayers=4,this.aiCount=3,this.aiDifficulty=se.MEDIUM,this.isReady=!1,this.isCompactLayout=!1}create(){const{width:y,height:n}=this.cameras.main;this.isCompactLayout=vt.isCompactLayout(),vt.logLayoutInfo(),this.add.rectangle(y/2,n/2,y,n,1712172);const m=vt.getFontSize("48px","28px"),S=vt.getY(40,25);this.add.text(y/2,S,"准备房间",{fontSize:m,fontStyle:"bold",color:"#00ff88",stroke:"#000",strokeThickness:4}).setOrigin(.5);const x=vt.getY(80,55),h=vt.getFontSize("18px","12px");this.add.text(y/2,x,"游戏开始后随机分配角色",{fontSize:h,color:"#a0aec0"}).setOrigin(.5),this.isCompactLayout?this.createCompactLayout(y,n):(this.createGameSettings(y,n),this.createAISettings(y,n),this.createControlButtons(y,n),this.createPlayerPreview(y,n))}createCompactLayout(y,n){const m=vt.getY(120,75),S=vt.getAvailableContentArea(m,n,36),x=vt.calculatePanelHeight(S.height,3,5,45);console.log(`紧凑布局: 可用高度=${S.height}, 面板高度=${x}`);let h=m;const d=5;this.createCompactGameSettingsDynamic(y,h,x),h+=x+d,this.createCompactAISettingsDynamic(y,h,x),h+=x+d;const t=Math.min(x,S.end-h);this.createCompactPlayerPreviewDynamic(y,h,Math.max(45,t));const e=vt.getButtonReservedHeight(36);this.createCompactControlButtons(y,n,e)}createGameSettings(y,n){this.add.rectangle(50+340/2,120+180/2,340,180,2963272,.9).setStrokeStyle(2,4871528),this.add.text(50+340/2,140,"游戏设置",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.add.text(80,180,"玩家总数:",{fontSize:"18px",color:"#e2e8f0"});const d=this.add.circle(230,190,20,15023678).setInteractive({useHandCursor:!0});this.add.text(230,190,"-",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.playerCountText=this.add.text(280,190,`${this.totalPlayers}人`,{fontSize:"20px",fontStyle:"bold",color:"#00ff88"}).setOrigin(.5);const t=this.add.circle(330,190,20,4766584).setInteractive({useHandCursor:!0});this.add.text(330,190,"+",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),d.on("pointerdown",()=>{this.totalPlayers>2&&(this.totalPlayers--,this.aiCount=this.totalPlayers-1,this.playerCountText.setText(`${this.totalPlayers}人`),this.aiCountText.setText(`${this.aiCount}个AI`),this.updatePlayerPreview())}),t.on("pointerdown",()=>{this.totalPlayers<6&&(this.totalPlayers++,this.aiCount=this.totalPlayers-1,this.playerCountText.setText(`${this.totalPlayers}人`),this.aiCountText.setText(`${this.aiCount}个AI`),this.updatePlayerPreview())}),this.add.text(50+340/2,250,"单机模式:你 vs 电脑AI",{fontSize:"16px",color:"#a0aec0",align:"center"}).setOrigin(.5)}createAISettings(y,n){this.add.rectangle(410+340/2,120+180/2,340,180,2963272,.9).setStrokeStyle(2,4871528),this.add.text(410+340/2,140,"AI 设置",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.add.text(440,180,"AI 对手:",{fontSize:"18px",color:"#e2e8f0"}),this.aiCountText=this.add.text(640,180,`${this.aiCount}个AI`,{fontSize:"20px",fontStyle:"bold",color:"#00ff88"}).setOrigin(.5),this.add.text(440,220,"AI 难度:",{fontSize:"18px",color:"#e2e8f0"});const d=[{name:"简单",value:se.EASY,color:4766584},{name:"中等",value:se.MEDIUM,color:16763904},{name:"困难",value:se.HARD,color:15023678}];d.forEach((t,e)=>{const l=490+e*100,i=this.add.rectangle(l,250,80,35,t.color).setStrokeStyle(2,7438486).setInteractive({useHandCursor:!0});this.add.text(l,250,t.name,{fontSize:"16px",fontStyle:"bold",color:"#1a202c"}).setOrigin(.5),this.aiDifficulty===t.value&&i.setStrokeStyle(3,65416),i.on("pointerover",()=>{i.setScale(1.05)}),i.on("pointerout",()=>{i.setScale(1)}),i.on("pointerdown",()=>{this.aiDifficulty=t.value,d.forEach((s,r)=>{const o=this.children.getByName(`diff_btn_${r}`);o&&o.setStrokeStyle(2,7438486)}),i.setStrokeStyle(3,65416)}),i.setName(`diff_btn_${e}`)})}createPlayerPreview(y,n){this.add.rectangle(50+700/2,320+150/2,700,150,2963272,.9).setStrokeStyle(2,4871528),this.add.text(50+700/2,340,"对局预览",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.playerSlots=[],this.playerSlotElements=[];const d=100,t=100,e=80,l=370;for(let i=0;i<6;i++){const s=e+i*(d+15),r=l,o=this.add.rectangle(s+d/2,r+t/2,d,t,i<this.totalPlayers?4871528:2963272,i<this.totalPlayers?1:.5).setStrokeStyle(2,7438486),a={bg:o,x:s,y:r,slotWidth:d,slotHeight:t,elements:[]};this.playerSlotElements.push(a),this.playerSlots.push({bg:o,index:i})}this.updatePlayerPreview()}updatePlayerPreview(){const y=this.isCompactLayout,n=vt.getFontSize("30px","20px"),m=vt.getFontSize("16px","12px"),S=vt.getFontSize("12px","10px"),x=vt.getFontSize("16px","12px");for(let h=0;h<6;h++){const d=this.playerSlotElements[h];d.elements.forEach(u=>u.destroy()),d.elements=[];const t=d.x,e=d.y,l=d.slotWidth,i=d.slotHeight;h<this.totalPlayers?d.bg.setFillStyle(4871528,1):d.bg.setFillStyle(2963272,.5);const s=e+i*.3,r=e+i*.55,o=e+i*.8,a=e+i*.5;if(h===0){const u=this.add.text(t+l/2,s,"👤",{fontSize:n}).setOrigin(.5),f=this.add.text(t+l/2,r,"你",{fontSize:m,fontStyle:"bold",color:"#00ff88"}).setOrigin(.5),v=this.add.text(t+l/2,o,"角色??",{fontSize:S,color:"#a0aec0"}).setOrigin(.5);d.elements.push(u,f,v)}else if(h<this.totalPlayers){const u=this.add.text(t+l/2,s,"🤖",{fontSize:n}).setOrigin(.5),f=this.add.text(t+l/2,r,`AI-${h}`,{fontSize:m,fontStyle:"bold",color:"#ffcc00"}).setOrigin(.5),v=this.add.text(t+l/2,o,"角色??",{fontSize:S,color:"#a0aec0"}).setOrigin(.5);d.elements.push(u,f,v)}else{const u=this.add.text(t+l/2,a,"空",{fontSize:x,color:"#718096"}).setOrigin(.5);d.elements.push(u)}}}createControlButtons(y,n){const m=n-80,S=this.add.rectangle(y/2-150,m,200,50,15023678).setStrokeStyle(3,12922928).setInteractive({useHandCursor:!0});this.add.text(y/2-150,m,"返回",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),S.on("pointerover",()=>{S.setFillStyle(16548225),S.setScale(1.05)}),S.on("pointerout",()=>{S.setFillStyle(15023678),S.setScale(1)}),S.on("pointerdown",()=>{this.scene.start("MenuScene")});const x=this.add.rectangle(y/2+150,m,200,50,65416).setStrokeStyle(3,52330).setInteractive({useHandCursor:!0});this.add.text(y/2+150,m,"开始游戏",{fontSize:"24px",fontStyle:"bold",color:"#1a202c"}).setOrigin(.5),x.on("pointerover",()=>{x.setFillStyle(65433),x.setScale(1.05)}),x.on("pointerout",()=>{x.setFillStyle(65416),x.setScale(1)}),x.on("pointerdown",()=>{this.startGame()})}startGame(){const y=[];y.push({id:"player",name:"你",characterType:null,isAI:!1});for(let n=1;n<this.totalPlayers;n++)y.push({id:`ai_${n}`,name:`AI-${n}`,characterType:null,isAI:!0,aiDifficulty:this.aiDifficulty});this.scene.start("AIBattleScene",{players:y,aiDifficulty:this.aiDifficulty})}createCompactGameSettingsDynamic(y,n,m){const x=y-30;this.add.rectangle(15+x/2,n+m/2,x,m,2963272,.9).setStrokeStyle(2,4871528);const h=vt.getFontSize("16px","12px"),d=vt.getFontSize("18px","14px"),t=vt.getFontSize("14px","10px"),e=vt.getSize(15,12),l=n+m*.3,i=n+m*.75;this.add.text(25,l,"玩家数量:",{fontSize:h,color:"#e2e8f0"}).setOrigin(0,.5);const s=this.add.circle(160,l,e,15023678).setInteractive({useHandCursor:!0});this.add.text(160,l,"-",{fontSize:d,fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.playerCountText=this.add.text(200,l,`${this.totalPlayers}人`,{fontSize:h,fontStyle:"bold",color:"#00ff88"}).setOrigin(.5);const r=this.add.circle(240,l,e,4766584).setInteractive({useHandCursor:!0});this.add.text(240,l,"+",{fontSize:d,fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.add.text(15+x/2,i,"单机模式:你 vs 电脑AI",{fontSize:t,color:"#718096",align:"center"}).setOrigin(.5),s.on("pointerdown",()=>{this.totalPlayers>2&&(this.totalPlayers--,this.aiCount=this.totalPlayers-1,this.playerCountText.setText(`${this.totalPlayers}人`),this.aiCountText&&this.aiCountText.setText(`${this.aiCount}个AI`),this.updatePlayerPreview&&this.updatePlayerPreview())}),r.on("pointerdown",()=>{this.totalPlayers<6&&(this.totalPlayers++,this.aiCount=this.totalPlayers-1,this.playerCountText.setText(`${this.totalPlayers}人`),this.aiCountText&&this.aiCountText.setText(`${this.aiCount}个AI`),this.updatePlayerPreview&&this.updatePlayerPreview())})}createCompactAISettingsDynamic(y,n,m){const x=y-30;this.add.rectangle(15+x/2,n+m/2,x,m,2963272,.9).setStrokeStyle(2,4871528);const h=vt.getFontSize("16px","12px"),d=vt.getFontSize("14px","10px"),t=vt.getFontSize("14px","10px"),e=n+m*.3,l=n+m*.75;this.add.text(25,e,"AI对手:",{fontSize:h,color:"#e2e8f0"}).setOrigin(0,.5),this.aiCountText=this.add.text(130,e,`${this.aiCount}个`,{fontSize:h,fontStyle:"bold",color:"#00ff88"}).setOrigin(0,.5),this.add.text(25,l,"难度:",{fontSize:d,color:"#e2e8f0"}).setOrigin(0,.5);const i=[{name:"简单",value:se.EASY,color:4766584},{name:"中等",value:se.MEDIUM,color:16763904},{name:"困难",value:se.HARD,color:15023678}],s=vt.getSize(55,45),r=vt.getSize(25,20),o=5,a=65;i.forEach((u,f)=>{const v=a+f*(s+o),c=this.add.rectangle(v,l,s,r,u.color).setStrokeStyle(2,this.aiDifficulty===u.value?65416:7438486).setInteractive({useHandCursor:!0});this.add.text(v,l,u.name,{fontSize:t,fontStyle:"bold",color:"#1a202c"}).setOrigin(.5),c.on("pointerdown",()=>{this.aiDifficulty=u.value,i.forEach((g,p)=>{const T=`compact_diff_btn_${p}`,C=this.children.getByName(T);C&&C.setStrokeStyle(2,g.value===this.aiDifficulty?65416:7438486)})}),c.setName(`compact_diff_btn_${f}`)})}createCompactPlayerPreviewDynamic(y,n,m){const x=y-30;this.add.rectangle(15+x/2,n+m/2,x,m,2963272,.9).setStrokeStyle(2,4871528);const h=vt.getFontSize("18px","12px"),d=n+12;this.add.text(15+x/2,d,"对局预览",{fontSize:h,fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.playerSlots=[],this.playerSlotElements=[];const t=n+25,e=m-30,l=6,i=4,s=(l-1)*i,r=Math.floor((x-20-s)/l),o=e,a=25;for(let u=0;u<6;u++){const f=a+u*(r+i),v=t,c=this.add.rectangle(f+r/2,v+o/2,r,o,u<this.totalPlayers?4871528:2963272,u<this.totalPlayers?1:.5).setStrokeStyle(1,7438486),g={bg:c,x:f,y:v,slotWidth:r,slotHeight:o,elements:[]};this.playerSlotElements.push(g),this.playerSlots.push({bg:c,index:u})}this.updatePlayerPreview()}createCompactControlButtons(y,n,m){const S=vt.viewportToGame(36),x=n-m/2,h=Math.min(vt.viewportToGame(100),(y-vt.viewportToGame(40))/2),d=vt.viewportToGame(15),t=vt.getFontSize("18px","12px");console.log(`按钮位置: buttonY=${x}, buttonHeight=${S}, 屏幕高度=${n}, 预留高度=${m}`);const e=m;this.add.rectangle(y/2,n-e/2,y,e,1712172).setDepth(100);const l=y/2-d/2-h/2,i=this.add.rectangle(l,x,h,S,15023678).setStrokeStyle(2,12922928).setInteractive({useHandCursor:!0}).setDepth(101);this.add.text(l,x,"返回",{fontSize:t,fontStyle:"bold",color:"#ffffff"}).setOrigin(.5).setDepth(101),i.on("pointerover",()=>{i.setFillStyle(16548225),i.setScale(1.05)}),i.on("pointerout",()=>{i.setFillStyle(15023678),i.setScale(1)}),i.on("pointerdown",()=>{this.scene.start("MenuScene")});const s=y/2+d/2+h/2,r=this.add.rectangle(s,x,h,S,65416).setStrokeStyle(2,52330).setInteractive({useHandCursor:!0}).setDepth(101);this.add.text(s,x,"开始",{fontSize:t,fontStyle:"bold",color:"#1a202c"}).setOrigin(.5).setDepth(101),r.on("pointerover",()=>{r.setFillStyle(65433),r.setScale(1.05)}),r.on("pointerout",()=>{r.setFillStyle(65416),r.setScale(1)}),r.on("pointerdown",()=>{this.startGame()})}createCompactGameSettings(y,n){const x=y-50,h=70;this.add.rectangle(25+x/2,110+h/2,x,h,2963272,.9).setStrokeStyle(2,4871528),this.add.text(35,120,"玩家数量:",{fontSize:"16px",color:"#e2e8f0"});const d=this.add.circle(145,145,15,15023678).setInteractive({useHandCursor:!0});this.add.text(145,145,"-",{fontSize:"18px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.playerCountText=this.add.text(185,145,`${this.totalPlayers}人`,{fontSize:"18px",fontStyle:"bold",color:"#00ff88"}).setOrigin(.5);const t=this.add.circle(235,145,15,4766584).setInteractive({useHandCursor:!0});this.add.text(235,145,"+",{fontSize:"18px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),d.on("pointerdown",()=>{this.totalPlayers>2&&(this.totalPlayers--,this.aiCount=this.totalPlayers-1,this.playerCountText.setText(`${this.totalPlayers}人`),this.aiCountText&&this.aiCountText.setText(`${this.aiCount}个AI`),this.updatePlayerPreview&&this.updatePlayerPreview())}),t.on("pointerdown",()=>{this.totalPlayers<6&&(this.totalPlayers++,this.aiCount=this.totalPlayers-1,this.playerCountText.setText(`${this.totalPlayers}人`),this.aiCountText&&this.aiCountText.setText(`${this.aiCount}个AI`),this.updatePlayerPreview&&this.updatePlayerPreview())})}createCompactAISettings(y,n){const x=y-50,h=70;this.add.rectangle(25+x/2,190+h/2,x,h,2963272,.9).setStrokeStyle(2,4871528),this.add.text(35,200,"AI 对手:",{fontSize:"16px",color:"#e2e8f0"}),this.aiCountText=this.add.text(155,200,`${this.aiCount}个AI`,{fontSize:"16px",fontStyle:"bold",color:"#00ff88"}),this.add.text(35,230,"难度:",{fontSize:"14px",color:"#e2e8f0"});const d=[{name:"简单",value:se.EASY,color:4766584},{name:"中等",value:se.MEDIUM,color:16763904},{name:"困难",value:se.HARD,color:15023678}];d.forEach((t,e)=>{const l=95+e*70,i=this.add.rectangle(l,240,60,25,t.color).setStrokeStyle(2,this.aiDifficulty===t.value?65416:7438486).setInteractive({useHandCursor:!0});this.add.text(l,240,t.name,{fontSize:"14px",fontStyle:"bold",color:"#1a202c"}).setOrigin(.5),i.on("pointerdown",()=>{this.aiDifficulty=t.value,d.forEach((s,r)=>{const o=`compact_diff_btn_${r}`,a=this.children.getByName(o);a&&a.setStrokeStyle(2,s.value===this.aiDifficulty?65416:7438486)})}),i.setName(`compact_diff_btn_${e}`)})}createCompactPlayerPreview(y,n){const x=y-50,h=100;this.add.rectangle(25+x/2,270+h/2,x,h,2963272,.9).setStrokeStyle(2,4871528),this.add.text(25+x/2,282,"对局预览",{fontSize:"16px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.playerSlots=[],this.playerSlotElements=[];const d=65,t=65,e=40,l=300;for(let i=0;i<6;i++){const s=e+i*(d+5),r=l,o=this.add.rectangle(s+d/2,r+t/2,d,t,i<this.totalPlayers?4871528:2963272,i<this.totalPlayers?1:.5).setStrokeStyle(1,7438486),a={bg:o,x:s,y:r,slotWidth:d,slotHeight:t,elements:[]};this.playerSlotElements.push(a),this.playerSlots.push({bg:o,index:i})}this.updatePlayerPreview()}}class Nn{constructor(y,n,m,S=null){this.id=y,this.name=n,this.playerId=S,this.characterType=m,this.maxHP=5,this.hp=5,this.shield=!1,this.poisoned=0,this.poisonActionCount=0,this.cursed=0,this.timeBombRounds=0,this.isDead=!1,this.deathTime=null,this.resurrectionUsed=!1,this.isAI=!1,this.inventory=[],this.fragments=[],this.resurrectionCard=!1,this.canPickItems=!0,this.skipNextTurn=!1,this.turnCount=0,this.clicksMade=0,this.bombsFound=0,this.itemsFound=0,this.playersKilled=0}takeDamage(y,n,m=null,S=null,x=null){let h=y,d={};if(console.log(`[伤害计算] 玩家: ${this.name}, 初始伤害: ${y}, 诅咒状态: ${this.cursed}, 伤害来源: ${S}, 武器: ${x}`),n&&n.onDamage){const t=n.onDamage(h,this,S,x);console.log("[伤害计算] 角色特性返回:",t),typeof t=="object"&&t!==null?(h=t.damage,d=t):h=t,console.log(`[伤害计算] 角色特性后伤害: ${h}`)}if(this.cursed>0&&(h*=2,this.cursed--,console.log(`[伤害计算] 诅咒翻倍后伤害: ${h}`)),this.shield&&h>0)return this.shield=!1,S==="time_bomb"&&(this.timeBombRounds=0),{damage:0,shieldBroken:!0,survived:!0,...d};if(this.hp-=h,this.hp<=0){if(n&&n.onDeath){const t=n.onDeath(this);if(t&&t.type==="revive")return{damage:h,revived:!0,survived:!0}}return this.resurrectionCard&&!this.resurrectionUsed?(this.resurrectionUsed=!0,this.resurrectionCard=!1,this.hp=1,{damage:h,resurrected:!0,survived:!0}):(this.isDead=!0,this.deathTime=Date.now(),this.hp=0,{damage:h,died:!0,survived:!1,attackerId:m})}return{damage:h,survived:!0,...d}}onTurnStart(y){const n=[];if(this.turnCount++,this.skipNextTurn)return this.skipNextTurn=!1,[{type:"skip_turn",message:`${this.name} 使用好人卡,跳过本轮`}];if(y&&y.onTurnStart){const m=y.onTurnStart(this);m&&n.push(m)}if(this.poisoned>0&&(this.poisonActionCount++,this.poisonActionCount%2===0)){const S=this.takeDamage(1,y,null,"poison",null);n.push({type:"poison_damage",damage:S.damage,shieldBroken:S.shieldBroken}),S.survived}if(this.timeBombRounds>0&&(this.timeBombRounds--,this.timeBombRounds===0)){const S=this.takeDamage(2,y,null,"time_bomb",null);n.push({type:"time_bomb_explode",damage:S.damage,shieldBroken:S.shieldBroken}),S.survived}return n}onTurnEnd(y){return y&&y.onTurnEnd?y.onTurnEnd(this):null}canUseItem(y,n){return this.inventory.includes(y)?n&&!n.canUseItem(y)?{canUse:!1,reason:"当前角色无法使用此道具"}:{canUse:!0}:{canUse:!1,reason:"道具不在背包中"}}useItem(y,n=null,m={},S=!0){if(S){const x=this.inventory.indexOf(y);x>-1&&this.inventory.splice(x,1)}return m.itemEffect.apply(y,this,n,m)}addItem(y){this.inventory.push(y),this.itemsFound++}addFragment(y){this.fragments.push(y)}craftItem(y,n){return n.craft(y,this)}resurrect(){this.isDead=!1,this.hp=2,this.shield=!1,this.poisoned=0,this.cursed=0,this.timeBombRounds=0}getStatus(){return{id:this.id,name:this.name,hp:this.hp,maxHP:this.maxHP,shield:this.shield,poisoned:this.poisoned,poisonActionCount:this.poisonActionCount,cursed:this.cursed,timeBombRounds:this.timeBombRounds,isDead:this.isDead,deathTime:this.deathTime,inventory:this.inventory,fragments:this.fragments,characterType:this.characterType,resurrectionCard:this.resurrectionCard,resurrectionUsed:this.resurrectionUsed}}}const $t={EMPTY:"empty",BOMB:"bomb",ITEM:"item"},Fe={WAITING:"waiting",PLAYING:"playing",ENDED:"ended"};class ns{constructor(y={}){this.rows=y.rows||10,this.cols=y.cols||10,this.totalBombs=y.totalBombs||30,this.totalItems=y.totalItems||7,this.phase=Fe.WAITING,this.board=[],this.players=[],this.currentPlayerIndex=0,this.turnOrder=[],this.totalTurnCount=0,this.onCellRevealed=null,this.onPlayerDamaged=null,this.onPlayerDied=null,this.onTurnChanged=null,this.onGameEnded=null,this.onItemUsed=null,this.onLogMessage=null,this.onTimeBombExplode=null,this.onShieldActivated=null,this.onMedkitUsed=null,this.onPlayerPoisoned=null,this.onTimeBombInstalled=null,this.onDogAbilityTriggered=null,this.onMonkeyAbilityTriggered=null,this.onGoodCardUsed=null,this.onTigerAbilityTriggered=null,this.onResurrectionUsed=null,this.onHippoRevived=null,this.onThunderUsed=null,this.onMagnifierUsed=null,this.initializeBoard()}initializeBoard(){this.board=[];for(let y=0;y<this.rows;y++){this.board[y]=[];for(let n=0;n<this.cols;n++)this.board[y][n]={x:n,y,type:$t.EMPTY,itemType:null,revealed:!1,flagged:!1}}}generateContent(){const y=[];for(let S=0;S<this.rows;S++)for(let x=0;x<this.cols;x++)y.push({x,y:S});for(let S=0;S<this.totalBombs&&y.length!==0;S++){const x=Math.floor(Math.random()*y.length),h=y.splice(x,1)[0];this.board[h.y][h.x].type=$t.BOMB}const n=gi.generateRandomItems(this.totalItems);console.log("=".repeat(60)),console.log(`生成了 ${n.length} 个道具:`),console.log("=".repeat(60));for(let S=0;S<n.length&&y.length!==0;S++){const x=Math.floor(Math.random()*y.length),h=y.splice(x,1)[0];this.board[h.y][h.x].type=$t.ITEM,this.board[h.y][h.x].itemType=n[S];const d=this.getItemName(n[S]);console.log(`${S+1}. 【${d}】(${n[S]}) - 位置: (${h.x}, ${h.y})`)}const m={};n.forEach(S=>{m[S]=(m[S]||0)+1}),console.log("-".repeat(60)),console.log("道具分布统计:"),Object.entries(m).sort((S,x)=>x[1]-S[1]).forEach(([S,x])=>{const h=this.getItemName(S);console.log(` ${h}: ${x}个 (${(x/n.length*100).toFixed(1)}%)`)}),console.log("=".repeat(60))}addPlayer(y){const n=Se.create(y.characterType),m=new Nn(y.id,y.name,y.characterType,y.playerId);return m.maxHP=n.maxHP,m.hp=n.maxHP,this.players.push(m),this.turnOrder.push(m.id),n.onGameStart&&n.onGameStart(m)&&this.onLogMessage&&this.onLogMessage(`${m.name} 的【${n.name}】特性触发`),m}startGame(){if(this.players.length<2)throw new Error("至少需要2名玩家才能开始游戏");this.phase=Fe.PLAYING,this.generateContent(),this.shuffleTurnOrder(),this.currentPlayerIndex=0,this.onLogMessage&&this.onLogMessage("游戏开始!"),this.onTurnChanged&&this.onTurnChanged(this.getCurrentPlayer())}shuffleTurnOrder(){for(let n=this.turnOrder.length-1;n>0;n--){const m=Math.floor(Math.random()*(n+1));[this.turnOrder[n],this.turnOrder[m]]=[this.turnOrder[m],this.turnOrder[n]]}const y=[];for(const n of this.turnOrder){const m=this.players.find(S=>S.id===n);m&&y.push(m)}if(this.players=y,this.onLogMessage){const n=this.players.map(m=>m.name).join(" → ");this.onLogMessage(`行动顺序: ${n}`)}}getCurrentPlayer(){return this.players[this.currentPlayerIndex]}async processClick(y,n){if(this.phase!==Fe.PLAYING)return{success:!1,message:"游戏未进行中"};const m=this.getCurrentPlayer();if(m.isDead)return{success:!1,message:"你已死亡,无法操作"};const S=this.board[n][y];if(S.revealed)return{success:!1,message:"格子已被翻开"};S.revealed=!0,m.clicksMade++,S.type===$t.EMPTY&&(S.bombCount=this.countNearbyBombs(S.x,S.y)),this.onCellRevealed&&this.onCellRevealed(S);let x={success:!0,cell:S};switch(S.type){case $t.BOMB:x=await this.handleBombClick(S,m);break;case $t.ITEM:x=await this.handleItemClick(S,m);break;case $t.EMPTY:x=await this.handleEmptyClick(S,m);break}return this.checkGameOver(),this.phase===Fe.PLAYING&&this.nextTurn(),x}async handleBombClick(y,n){const m=Se.create(n.characterType),S=n.takeDamage(2,m,null,"bomb",null);return this.onLogMessage&&(S.shieldBroken?this.onLogMessage(`${n.name} 踩到炸弹,但护盾抵挡了伤害!`):S.died?this.onLogMessage(`${n.name} 踩到炸弹,受到 ${S.damage} 点伤害,淘汰!`):S.revived?(this.onLogMessage(`${n.name} 踩到炸弹受到伤害,但【河马】特性触发,成功复活!`),this.onHippoRevived&&this.onHippoRevived(n)):S.resurrected?(this.onLogMessage(`${n.name} 的【复活甲】触发,成功复活!`),this.onResurrectionUsed&&this.onResurrectionUsed(n)):this.onLogMessage(`${n.name} 踩到炸弹,受到 ${S.damage} 点伤害`)),this.onPlayerDamaged&&this.onPlayerDamaged(n,S),S.died&&this.onPlayerDied&&(this.onPlayerDied(n,S.attackerId),this.checkGameOver()),{success:!0,type:"bomb",damage:S.damage,died:S.died}}async handleItemClick(y,n){let m=y.itemType;const S=Se.create(n.characterType);if(!n.canPickItems)return this.onLogMessage&&this.onLogMessage(`${n.name} 的【河马】特性生效,无法使用道具`),{success:!0,type:"item",itemType:m,skipped:!0,reason:"hippo_cannot_pick"};if(!S.canUseItem(m)){const d=["shield","magnifier","dagger","poison","time_bomb","good_card","chest","curse","lightning","resurrection"].filter(t=>S.canUseItem(t));d.length>0?(m=d[Math.floor(Math.random()*d.length)],this.onLogMessage&&this.onLogMessage(`${n.name} 的【${S.name}】特性生效,道具已替换`)):(m="shield",this.onLogMessage&&this.onLogMessage(`${n.name} 的【${S.name}】特性生效,获得护盾`))}if(n.characterType==="elephant"){if(this.onLogMessage){const d=this.getItemName(m);this.onLogMessage(`${n.name} 的【大象】特性生效,丢弃了【${d}】`)}return this.onElephantAbilityTriggered&&this.onElephantAbilityTriggered(n),this.onItemUsed&&this.onItemUsed(n,m,{success:!0,message:`${n.name} 丢弃了道具`,discarded:!0}),{success:!0,type:"item",itemType:m,discarded:!0,reason:"elephant_discard"}}if(m==="good_card")return n.skipNextTurn=!0,this.onLogMessage&&this.onLogMessage(`${n.name} 翻开了【好人卡】!下回合将跳过`),this.onGoodCardUsed&&this.onGoodCardUsed(n),this.onItemUsed&&this.onItemUsed(n,m,{success:!0,message:`${n.name} 翻开了【好人卡】`}),{success:!0,type:"item",itemType:m,effect:{skipNextTurn:!0}};const x={board:this.board,itemEffect:gi,players:this.players},h=n.useItem(m,null,x,!1);if(this.onLogMessage){const d=this.getItemName(m);h.success?this.onLogMessage(h.message||`${n.name} 使用了【${d}】`):this.onLogMessage(`${n.name} 翻开了【${d}】:${h.message}`)}if(this.onItemUsed&&this.onItemUsed(n,m,h),h.success&&h.effects&&this.onShieldActivated&&h.effects.find(t=>t.type==="shield")&&this.onShieldActivated(n),h.success&&h.effects&&this.onMedkitUsed&&h.effects.find(t=>t.type==="heal")&&this.onMedkitUsed(n),m==="time_bomb"&&h.success&&h.effects){const d=h.effects.find(t=>t.type==="time_bomb");if(d&&d.target&&this.onTimeBombInstalled){const t=this.getPlayerById(d.target);t&&this.onTimeBombInstalled(t)}}if(m==="curse"&&h.success&&h.effects){const d=h.effects.find(t=>t.type==="curse");if(d&&d.target&&this.onCurseUsed){const t=this.getPlayerById(d.target);t&&this.onCurseUsed(t)}}if(h.effects)for(const d of h.effects){if(d.type==="poison_animation"){const t=this.getPlayerById(d.target);t&&this.onPlayerPoisoned&&this.onPlayerPoisoned(t)}if(d.type==="tiger_ability"){const t=this.getPlayerById(d.player);t&&this.onTigerAbilityTriggered&&this.onTigerAbilityTriggered(t)}if(d.type==="good_card_animation"){const t=this.getPlayerById(d.target);t&&this.onGoodCardUsed&&this.onGoodCardUsed(t)}if(d.type==="magnifier"){const t=this.getPlayerById(d.userId);t&&this.onMagnifierUsed&&this.onMagnifierUsed(t,d.targetCell)}if(d.type==="chest"&&this.onChestOpened&&this.onChestOpened(n),d.type==="damage"&&d.damages){d.damageType==="lightning"&&this.onThunderUsed&&this.onThunderUsed(n);const t=d.damageType==="lightning"?"lightning":"dagger";d.damages.forEach(e=>{const l=this.getPlayerById(e.target);if(l){if(e.shield){this.onLogMessage&&this.onLogMessage(`${l.name} 的护盾抵挡了伤害!`),this.onPlayerDamaged&&this.onPlayerDamaged(l,{shieldBroken:!0});return}const i=Se.create(l.characterType),s=l.takeDamage(e.damage,i,n.id,t,e.weapon);s.shieldBroken?(this.onLogMessage&&this.onLogMessage(`${l.name} 的护盾抵挡了伤害!`),this.onPlayerDamaged&&this.onPlayerDamaged(l,{shieldBroken:!0,damageSource:t})):s.damage>0&&(this.onLogMessage&&(s.died?this.onLogMessage(`${l.name} 受到${s.damage}点伤害,淘汰!`):this.onLogMessage(`${l.name} 受到${s.damage}点伤害`)),this.onPlayerDamaged&&this.onPlayerDamaged(l,{damage:s.damage,damageSource:t})),s.agilityReaction&&this.onCatAgility&&this.onCatAgility(l),s.died&&this.onPlayerDied&&(this.onPlayerDied(l,n.id),S.onKill&&S.onKill(n,l)&&this.onLogMessage&&this.onLogMessage(`${n.name} 的【${S.name}】特性触发!`),this.checkGameOver())}})}}return{success:!0,type:"item",itemType:m,effect:h}}getItemName(y){return{medkit:"医疗包",shield:"护盾",poison:"剧毒",dagger:"飞刀",magnifier:"放大镜",time_bomb:"定时炸弹",good_card:"好人卡",chest:"宝箱",curse:"诅咒",lightning:"雷击",resurrection:"复活甲"}[y]||y}async handleEmptyClick(y,n){const m=this.countNearbyBombs(y.x,y.y);this.onLogMessage&&this.onLogMessage(`${n.name} 翻开了格子`);const S=[y];return m===0&&this.revealAdjacentEmptyCells(y.x,y.y,S),{success:!0,type:"empty",bombCount:m,revealedCells:S}}revealAdjacentEmptyCells(y,n,m){const S=[{dx:-1,dy:-1},{dx:0,dy:-1},{dx:1,dy:-1},{dx:-1,dy:0},{dx:1,dy:0},{dx:-1,dy:1},{dx:0,dy:1},{dx:1,dy:1}];for(const x of S){const h=y+x.dx,d=n+x.dy;if(h>=0&&h<this.cols&&d>=0&&d<this.rows){const t=this.board[d][h];!t.revealed&&t.type===$t.EMPTY&&(t.revealed=!0,t.bombCount=this.countNearbyBombs(h,d),m.push(t),this.onCellRevealed&&this.onCellRevealed(t),t.bombCount===0&&this.revealAdjacentEmptyCells(h,d,m))}}}countNearbyBombs(y,n){let m=0;for(let S=-1;S<=1;S++)for(let x=-1;x<=1;x++){if(x===0&&S===0)continue;const h=y+x,d=n+S;d>=0&&d<this.rows&&h>=0&&h<this.cols&&this.board[d][h].type===$t.BOMB&&m++}return m}useItem(y,n=null){const m=this.getCurrentPlayer();if(m.isDead)return{success:!1,message:"你已死亡,无法使用道具"};const S=Se.create(m.characterType),x=m.canUseItem(y,S);if(!x.canUse)return{success:!1,message:x.reason};const h=n?this.getPlayerById(n):null,d={board:this.board.flat().filter(e=>!e.revealed),itemEffect:gi,players:this.players},t=m.useItem(y,h,d);if(t.success){if(this.onLogMessage&&this.onLogMessage(t.message),this.onItemUsed&&this.onItemUsed(m,y,t),t.effects&&this.onShieldActivated&&t.effects.find(l=>l.type==="shield")&&this.onShieldActivated(m),t.effects&&this.onMedkitUsed&&t.effects.find(l=>l.type==="heal")&&this.onMedkitUsed(m),y==="poison"&&t.effects){const e=t.effects.find(l=>l.type==="poison_animation");if(e&&e.target&&this.onPlayerPoisoned){const l=this.getPlayerById(e.target);l&&this.onPlayerPoisoned(l)}}if(y==="time_bomb"&&t.effects){const e=t.effects.find(l=>l.type==="time_bomb");if(e&&e.target&&this.onTimeBombInstalled){const l=this.getPlayerById(e.target);l&&this.onTimeBombInstalled(l)}}if(y==="curse"&&t.effects){const e=t.effects.find(l=>l.type==="curse");if(e&&e.target&&this.onCurseUsed){const l=this.getPlayerById(e.target);l&&this.onCurseUsed(l)}}if(h&&t.effects)for(const e of t.effects)(e.type==="damage"||e.type==="poison")&&h.hp<=0&&this.onPlayerDied&&(this.onPlayerDied(h,m.id),S.onKill&&S.onKill(m,h)&&this.onLogMessage&&this.onLogMessage(`${m.name} 的【${S.name}】特性触发!`),this.checkGameOver());if(t.effects)for(const e of t.effects)e.type==="damage"&&e.isAOE&&e.damages&&e.damages.forEach(l=>{const i=this.getPlayerById(l.target);i&&(l.shield?(this.onLogMessage&&this.onLogMessage(`${i.name} 的护盾抵挡了伤害!`),this.onPlayerDamaged&&this.onPlayerDamaged(i,{shieldBroken:!0})):l.damage>0&&(this.onLogMessage&&(i.hp<=0?this.onLogMessage(`${i.name} 受到${l.damage}点伤害,淘汰!`):this.onLogMessage(`${i.name} 受到${l.damage}点伤害`)),this.onPlayerDamaged&&this.onPlayerDamaged(i,{damage:l.damage}),i.hp<=0&&!i.isDead&&this.onPlayerDied&&(i.isDead=!0,i.deathTime=Date.now(),this.onPlayerDied(i,m.id),S.onKill&&S.onKill(m,i)&&this.onLogMessage&&this.onLogMessage(`${m.name} 的【${S.name}】特性触发!`),this.checkGameOver())))})}return t}nextTurn(){const y=this.getCurrentPlayer(),n=Se.create(y.characterType);n.onTurnEnd&&n.onTurnEnd(y),this.totalTurnCount++;let m=(this.currentPlayerIndex+1)%this.players.length,S=0,x=[];for(;this.players[m].isDead&&S<this.players.length;)x.push(this.players[m].name),m=(m+1)%this.players.length,S++;if(S>=this.players.length){this.phase=Fe.ENDED;let l=null,i=-1;for(const s of this.players)s.deathTime>i&&(i=s.deathTime,l=s);this.onGameEnded&&this.onGameEnded(l,null);return}this.currentPlayerIndex=m;const h=this.players[m],d=Se.create(h.characterType),t=h.onTurnStart(d);if(h.skipNextTurn){h.skipNextTurn=!1,this.onLogMessage&&this.onLogMessage(`${h.name} 受【好人卡】效果影响,跳过本回合`),this.nextTurn();return}const e=t&&t.find(l=>l.type==="skip_turn");if(e){this.onLogMessage&&this.onLogMessage(e.message),this.onPlayerDamaged&&this.onPlayerDamaged(h,{}),this.nextTurn();return}if(t&&t.length>0&&t.forEach(l=>{if(this.onLogMessage)switch(l.type){case"heal":this.onLogMessage(`${h.name} 的【${d.name}】特性:回复1点生命`),this.onMonkeyAbilityTriggered&&h.characterType==="monkey"&&this.onMonkeyAbilityTriggered(h);break;case"poison_damage":this.onLogMessage(`${h.name} 受到剧毒伤害,失去1点生命`),h.isDead&&this.onPlayerDied&&(this.onPlayerDied(h,null),this.checkGameOver());break;case"time_bomb_explode":this.onLogMessage(`${h.name} 的定时炸弹爆炸,受到${l.damage}点伤害`),this.onTimeBombExplode&&this.onTimeBombExplode(h),this.players.forEach((s,r)=>{if(s.id!==h.id&&!s.isDead){const o=this.players.findIndex(f=>f.id===h.id),a=this.players.findIndex(f=>f.id===s.id);if(Math.abs(o-a)===1){const f=Se.create(s.characterType),v=s.takeDamage(1,f,h.id,"bomb");this.onLogMessage&&(v.shieldBroken?this.onLogMessage(`${s.name} 被波及但护盾抵挡了伤害!`):v.died?this.onLogMessage(`${s.name} 被波及,受到1点伤害,淘汰!`):v.revived?(this.onLogMessage(`${s.name} 被波及受到伤害,但【河马】特性触发,成功复活!`),this.onHippoRevived&&this.onHippoRevived(s)):this.onLogMessage(`${s.name} 被波及,受到1点伤害`)),this.onPlayerDamaged&&this.onPlayerDamaged(s,v),v.died&&this.onPlayerDied&&(this.onPlayerDied(s,h.id),this.checkGameOver())}}}),h.isDead&&this.onPlayerDied&&(this.onPlayerDied(h,null),this.checkGameOver());break;case"poison_cleared":this.onLogMessage(`${h.name} 的【树懒】特性触发,清除了中毒状态`),this.onSlothAbilityTriggered&&this.onSlothAbilityTriggered(h);break;case"sniff":this.onLogMessage(`${h.name} 的【狗】特性触发,嗅觉生效!`);const i=this.findSniffTarget();this.onDogAbilityTriggered&&this.onDogAbilityTriggered(h,i);break}this.onPlayerDamaged&&this.onPlayerDamaged(h,l)}),h.isDead){this.nextTurn();return}this.onTurnChanged&&this.onTurnChanged(h)}checkGameOver(){const y=this.players.filter(n=>!n.isDead);if(y.length<=1){this.phase=Fe.ENDED;let n=null;if(y.length===1)n=y[0];else{let m=null,S=-1;for(const x of this.players)x.deathTime>S&&(S=x.deathTime,m=x);n=m}return this.onGameEnded&&this.onGameEnded(n,null),this.onLogMessage&&this.onLogMessage(`🎉 ${n.name} 获得胜利!`),!0}return!1}getPlayerById(y){return this.players.find(n=>n.id===y)}findSniffTarget(){const y=[];for(let m=0;m<this.rows;m++)for(let S=0;S<this.cols;S++){const x=this.board[m][S];x.revealed||y.push({x:S,y:m,type:x.type,itemType:x.itemType})}if(y.length===0)return null;let n=y.find(m=>m.type==="item");return n||(n=y.find(m=>m.type==="empty")),n||(n=y[Math.floor(Math.random()*y.length)]),{x:n.x,y:n.y,cellType:n.type}}getGameState(){return{phase:this.phase,board:this.board,players:this.players.map(y=>y.getStatus()),currentPlayerIndex:this.currentPlayerIndex,currentPlayerId:this.getCurrentPlayer()?.id}}}class bn extends ce{constructor(){super({key:"BattleScene"})}init(y){this.players=y.players||[],this.battleLogic=new ns({rows:10,cols:10,totalBombs:30,totalItems:7}),this.tileSize=45,this.boardOffsetX=150,this.boardOffsetY=100,this.setupBattleCallbacks()}create(){const{width:y,height:n}=this.cameras.main;this.add.rectangle(y/2,n/2,y,n,1712172),this.createBattleUI(y,n),this.players.forEach(m=>{this.battleLogic.addPlayer(m)}),this.createBoard(),this.updateAllPlayerInfo(),this.battleLogic.startGame(),this.setupInput()}setupBattleCallbacks(){this.battleLogic.onCellRevealed=y=>{this.onCellRevealed(y)},this.battleLogic.onPlayerDamaged=(y,n)=>{this.onPlayerDamaged(y,n)},this.battleLogic.onPlayerDied=(y,n)=>{this.onPlayerDied(y,n)},this.battleLogic.onTurnChanged=y=>{this.onTurnChanged(y)},this.battleLogic.onGameEnded=y=>{this.onGameEnded(y)},this.battleLogic.onItemUsed=(y,n,m)=>{this.onItemUsed(y,n,m)},this.battleLogic.onLogMessage=y=>{this.addLogMessage(y)}}createBattleUI(y,n){this.turnIndicator=this.add.rectangle(y/2,30,400,50,2963272).setStrokeStyle(2,4871528),this.turnText=this.add.text(y/2,30,"等待开始...",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.createPlayerInfoPanel(30,100),this.createActionLog(y-220,100),this.createItemBar(y/2,n-50)}createPlayerInfoPanel(y,n){this.add.rectangle(y+100/2,n+450/2,100,450,2963272,.9).setStrokeStyle(2,4871528),this.playerInfoContainers=[],this.players.forEach((x,h)=>{const d=n+30+h*120,t=this.add.rectangle(y+100/2,d+50,90,110,4871528).setStrokeStyle(1,7438486),e=this.add.circle(y+100/2,d+25,20,65416),l=this.add.text(y+100/2,d+50,x.name,{fontSize:"14px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),i="❤️".repeat(x.hp),s="🖤".repeat(x.maxHP-x.hp),r=this.add.text(y+100/2,d+68,`${i}${s}`,{fontSize:"12px",color:"#ff6b6b"}).setOrigin(.5),o=this.add.text(y+100/2,d+85,"",{fontSize:"14px"}).setOrigin(.5);this.playerInfoContainers.push({bg:t,avatar:e,name:l,hpText:r,statusIcons:o})})}createActionLog(y,n){this.add.rectangle(y+200/2,n+450/2,200,450,2963272,.9).setStrokeStyle(2,4871528),this.add.text(y+200/2,n+15,"操作日志",{fontSize:"18px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.logMessages=[],this.maxLogMessages=15}addLogMessage(y){this.logMessages.push(y),this.logMessages.length>this.maxLogMessages&&this.logMessages.shift(),this.updateActionLogDisplay()}updateActionLogDisplay(){this.logTextObjects&&this.logTextObjects.forEach(S=>S.destroy()),this.logTextObjects=[];const y=630,n=140,m=25;this.logMessages.forEach((S,x)=>{const h=this.add.text(y,n+x*m,S,{fontSize:"13px",color:"#e2e8f0",wordWrap:{width:180}}).setOrigin(0,0);this.logTextObjects.push(h)})}createItemBar(y,n){this.add.rectangle(y,n,600,80,2963272,.9).setStrokeStyle(2,4871528),this.add.text(y-600/2+20,n-80/2+10,"道具栏",{fontSize:"16px",fontStyle:"bold",color:"#ffffff"}),this.itemContainer=this.add.container(y-600/2+20,n),this.itemButtons=[]}createBoard(){this.boardContainer=this.add.container(this.boardOffsetX,this.boardOffsetY);for(let y=0;y<this.battleLogic.rows;y++)for(let n=0;n<this.battleLogic.cols;n++){const m=n*this.tileSize,S=y*this.tileSize,x=this.add.rectangle(m+this.tileSize/2,S+this.tileSize/2,this.tileSize-2,this.tileSize-2,4871528).setStrokeStyle(2,2963272).setInteractive().setData("gridX",n).setData("gridY",y);this.boardContainer.add(x)}}setupInput(){this.input.on("gameobjectdown",(y,n)=>{if(this.battleLogic.phase!==Fe.PLAYING)return;const m=n.getData("gridX"),S=n.getData("gridY");m!==void 0&&S!==void 0&&this.battleLogic.processClick(m,S)})}onCellRevealed(y){const n=y.x*this.tileSize,m=y.y*this.tileSize,S=this.boardContainer.getMatching("gridX",y.x,"gridY",y.y);if(S)switch(S.setStrokeStyle(2,1712172),y.type){case $t.BOMB:S.setFillStyle(16729156),this.add.text(n+this.tileSize/2,m+this.tileSize/2,"💣",{fontSize:"20px"}).setOrigin(.5).setDepth(1);break;case $t.ITEM:S.setFillStyle(16763904),this.add.text(n+this.tileSize/2,m+this.tileSize/2,"🎁",{fontSize:"20px"}).setOrigin(.5).setDepth(1);break;case $t.EMPTY:S.setFillStyle(7438486);break}}onPlayerDamaged(y,n){this.updatePlayerInfo(y)}onPlayerDied(y,n){this.updatePlayerInfo(y);const m=this.playerInfoContainers.find(S=>S.name.text===y.name);m&&m.avatar.setFillStyle(16729156)}onTurnChanged(y){this.turnText.setText(`${y.name} 的回合`),this.playerInfoContainers.forEach((n,m)=>{this.battleLogic.players[m].id===y.id?n.bg.setStrokeStyle(3,65416):n.bg.setStrokeStyle(1,7438486)}),this.updateItemBar(y)}onGameEnded(y,n){this.turnText.setText(`🎉 ${y.name} 获胜!`),this.time.delayedCall(3e3,()=>{this.scene.start("ResultScene",{winner:y,loser:n})})}onItemUsed(y,n,m){this.updatePlayerInfo(y)}updatePlayerInfo(y){const n=this.battleLogic.players.findIndex(S=>S.id===y.id),m=this.playerInfoContainers[n];if(m){const S=y.getStatus(),x="❤️".repeat(S.hp),h="🖤".repeat(S.maxHP-S.hp);m.hpText.setText(`${x}${h}`);let d="";S.shield&&(d+="🛡️"),S.poisoned>0&&(d+="☠️"),S.cursed>0&&(d+="💀"),S.timeBombRounds>0&&(d+="💣"),m.statusIcons.setText(d)}}updateAllPlayerInfo(){this.battleLogic.players.forEach(y=>{this.updatePlayerInfo(y)})}updateItemBar(y){this.itemButtons.forEach(h=>h.destroy()),this.itemButtons=[];const n=y.getStatus(),m=-280,S=60,x=10;n.inventory.forEach((h,d)=>{const t=Xe[h],e=m+d*(S+x),l=this.add.rectangle(e+S/2,0,S,50,4871528).setStrokeStyle(2,7438486).setInteractive({useHandCursor:!0}).setData("itemId",h),i=this.add.text(e+S/2,-5,"🎮",{fontSize:"20px"}).setOrigin(.5),s=this.add.text(e+S/2,12,t.name,{fontSize:"10px",color:"#ffffff"}).setOrigin(.5);this.itemContainer.add([l,i,s]),this.itemButtons.push(l),l.on("pointerover",()=>{l.setFillStyle(5924216)}),l.on("pointerout",()=>{l.setFillStyle(4871528)}),l.on("pointerdown",()=>{this.useItem(h)})})}useItem(y){this.battleLogic.getCurrentPlayer();const n=this.battleLogic.useItem(y);n.success?this.addLogMessage(n.message):this.addLogMessage(n.message)}}class Gn extends ce{constructor(){super({key:"LogScene"})}init(y){this.logMessages=y.logMessages||[],this.fromScene=y.fromScene||"AIBattleScene"}create(){const{width:y,height:n}=this.cameras.main;this.createBackground(y,n),this.createVirtualList(y,n),this.createHeaderMask(y),this.createFooterMask(y,n)}createBackground(y,n){this.add.rectangle(y/2,n/2,y,n,986906);const m=this.add.graphics();m.lineStyle(1,1710638,.3);for(let S=0;S<y;S+=50)m.lineBetween(S,0,S,n);for(let S=0;S<n;S+=50)m.lineBetween(0,S,y,S)}createVirtualList(y,n){const h=n-130-100,d=60,t=Math.ceil(h/d)+2;this.listAreaY=130,this.listAreaHeight=h,this.itemHeight=d,this.scrollOffset=0,this.maxScrollOffset=Math.max(0,this.logMessages.length*d-h),this.add.rectangle(y/2,130+h/2,y-40,h,1710638,.5).setStrokeStyle(1,2963272),this.listContainer=this.add.container(20,130),this.itemPool=[];for(let l=0;l<t;l++){const i=this.createListItem(y-80,d);this.itemPool.push(i),this.listContainer.add(i.container)}this.updateVirtualList(),this.createScrollIndicator(y,130,h),this.input.on("pointerdown",l=>{l.y>130&&l.y<130+h&&(this.isDragging=!0,this.lastDragY=l.y)}),this.input.on("pointermove",l=>{if(this.isDragging){const i=l.y-this.lastDragY;this.lastDragY=l.y,this.scrollOffset=ai.Clamp(this.scrollOffset-i,0,this.maxScrollOffset),this.updateVirtualList(),this.updateScrollIndicatorPosition()}}),this.input.on("pointerup",()=>{this.isDragging=!1}),this.input.on("wheel",(l,i,s,r)=>{l.y>130&&l.y<130+h&&(this.scrollOffset=ai.Clamp(this.scrollOffset+r*.5,0,this.maxScrollOffset),this.updateVirtualList(),this.updateScrollIndicatorPosition())})}createHeaderMask(y){this.add.rectangle(y/2,65,y,130,986906),this.add.rectangle(y/2,60,y,110,1710638).setStrokeStyle(2,65416),this.add.text(y/2,30,"操作日志",{fontSize:"60px",fontStyle:"bold",color:"#00ff88",shadow:{offsetX:2,offsetY:2,color:"#000",blur:4,fill:!0}}).setOrigin(.5),this.add.text(y/2,70,`共 ${this.logMessages.length} 条记录`,{fontSize:"27px",color:"#718096"}).setOrigin(.5),this.createButton(60,60,"← 返回",4871528,5924215,()=>{this.scene.stop(),this.scene.resume(this.fromScene)})}createFooterMask(y,n){this.add.rectangle(y/2,n-100/2,y,100,986906);const S=n-55;this.createButton(y/2-90,S,"主菜单",4886754,5939186,()=>{this.scene.stop(this.fromScene),this.scene.start("MenuScene")},140,50),this.createButton(y/2+90,S,"再来一局",65416,65433,()=>{this.scene.stop(this.fromScene),this.scene.start("RoomScene")},140,50),this.add.text(y/2,n-15,"拖拽或滚轮滚动查看更多",{fontSize:"21px",color:"#4a5568"}).setOrigin(.5)}createButton(y,n,m,S,x,h,d=100,t=40){const e=this.add.rectangle(y,n,d,t,S).setStrokeStyle(2,x).setInteractive({useHandCursor:!0}),l=this.add.text(y,n,m,{fontSize:"27px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);return e.on("pointerover",()=>{e.setFillStyle(x),e.setScale(1.05)}),e.on("pointerout",()=>{e.setFillStyle(S),e.setScale(1)}),e.on("pointerdown",h),{button:e,buttonText:l}}createListItem(y,n){const m=this.add.container(0,0),S=this.add.rectangle(y/2,n/2,y,n-4,2963272).setInteractive({useHandCursor:!0}),x=this.add.rectangle(30,n/2,50,n-8,65416,.2),h=this.add.text(30,n/2,"1",{fontSize:"27px",fontStyle:"bold",color:"#00ff88"}).setOrigin(.5),d=this.add.text(70,n/2,"",{fontSize:"24px",color:"#e2e8f0",wordWrap:{width:y-100}}).setOrigin(0,.5);return m.add([S,x,h,d]),S.on("pointerover",()=>{S.setFillStyle(4016732)}),S.on("pointerout",()=>{S.setFillStyle(2963272)}),{container:m,bg:S,numberText:h,messageText:d,index:-1}}updateVirtualList(){const y=Math.floor(this.scrollOffset/this.itemHeight),n=Math.max(0,y-1);for(let m=0;m<this.itemPool.length;m++){const S=this.itemPool[m],x=n+m;if(x<this.logMessages.length&&x>=0){const h=this.logMessages[x],d=x*this.itemHeight-this.scrollOffset;S.container.setPosition(0,d),S.container.setVisible(!0),S.index=x,S.numberText.setText(`${x+1}`),S.messageText.setText(h.message||h),x%2===0?S.bg.setFillStyle(2963272):S.bg.setFillStyle(2436410)}else S.container.setVisible(!1)}}createScrollIndicator(y,n,m){const x=this.logMessages.length*this.itemHeight,h=Math.max(50,m/x*m),d=y-25;this.scrollIndicatorBg=this.add.rectangle(d,n+m/2,12,m,1710638),this.scrollIndicatorBg.setStrokeStyle(1,2963272),this.scrollIndicator=this.add.rectangle(d,n+h/2,8,h,65416,.6),this.scrollIndicatorHeight=h}updateScrollIndicatorPosition(){if(this.maxScrollOffset<=0){this.scrollIndicator.setVisible(!1);return}this.scrollIndicator.setVisible(!0);const y=this.scrollOffset/this.maxScrollOffset,n=this.listAreaY+this.listAreaHeight-this.scrollIndicatorHeight,m=this.listAreaY+y*(n-this.listAreaY)+this.scrollIndicatorHeight/2;this.scrollIndicator.setY(m)}}const Un="modulepreload",zn=function(E){return"/"+E},Ui={},Qt=function(y,n,m){let S=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),d=h?.nonce||h?.getAttribute("nonce");S=Promise.allSettled(n.map(t=>{if(t=zn(t),t in Ui)return;Ui[t]=!0;const e=t.endsWith(".css"),l=e?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${t}"]${l}`))return;const i=document.createElement("link");if(i.rel=e?"stylesheet":Un,e||(i.as="script"),i.crossOrigin="",i.href=t,d&&i.setAttribute("nonce",d),document.head.appendChild(i),e)return new Promise((s,r)=>{i.addEventListener("load",s),i.addEventListener("error",()=>r(new Error(`Unable to preload CSS for ${t}`)))})}))}function x(h){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=h,window.dispatchEvent(d),!d.defaultPrevented)throw h}return S.then(h=>{for(const d of h||[])d.status==="rejected"&&x(d.reason);return y().catch(x)})},Yn=Object.assign({"/public/assets/bgm/vespidaze-upbeat-rpg-battle-460971.mp3":()=>Qt(()=>import("./vespidaze-upbeat-rpg-battle-460971-aTWgbIUk.js"),[]),"/public/assets/bgm/williamhector-cinematic-action-jungle-drums-loop-125bpm-345139.mp3":()=>Qt(()=>import("./williamhector-cinematic-action-jungle-drums-loop-125bpm-345139-CbmcBUE5.js"),[])}),Vn=Object.assign({"/public/assets/sfx/cat.mp3":()=>Qt(()=>import("./cat-DX-s73ik.js"),[]),"/public/assets/sfx/chestOpen.mp3":()=>Qt(()=>import("./chestOpen-But9ZQZ6.js"),[]),"/public/assets/sfx/curse.mp3":()=>Qt(()=>import("./curse-CvtomDV0.js"),[]),"/public/assets/sfx/dogbark.mp3":()=>Qt(()=>import("./dogbark-Cd9-eN5p.js"),[]),"/public/assets/sfx/doghowling.mp3":()=>Qt(()=>import("./doghowling-DiPAqmhW.js"),[]),"/public/assets/sfx/elephant.mp3":()=>Qt(()=>import("./elephant-CZlZnjTw.js"),[]),"/public/assets/sfx/goodperson.mp3":()=>Qt(()=>import("./goodperson-BTK7x34a.js"),[]),"/public/assets/sfx/heal.mp3":()=>Qt(()=>import("./heal-BaF7csk7.js"),[]),"/public/assets/sfx/hippos.mp3":()=>Qt(()=>import("./hippos-CL_x8hh_.js"),[]),"/public/assets/sfx/itemFound.mp3":()=>Qt(()=>import("./itemFound-CDhUYgtx.js"),[]),"/public/assets/sfx/knife.mp3":()=>Qt(()=>import("./knife-UlpTJXlb.js"),[]),"/public/assets/sfx/monkey.mp3":()=>Qt(()=>import("./monkey-BDYc37GU.js"),[]),"/public/assets/sfx/poison.mp3":()=>Qt(()=>import("./poison-KUpuQ1Wg.js"),[]),"/public/assets/sfx/rebirth.mp3":()=>Qt(()=>import("./rebirth-DGtvp6KC.js"),[]),"/public/assets/sfx/shield.mp3":()=>Qt(()=>import("./shield-DlPl0ATk.js"),[]),"/public/assets/sfx/sloth.mp3":()=>Qt(()=>import("./sloth-adPYVPFb.js"),[]),"/public/assets/sfx/smallBomb.mp3":()=>Qt(()=>import("./smallBomb-ZXy88HsJ.js"),[]),"/public/assets/sfx/thunder.mp3":()=>Qt(()=>import("./thunder-QOzrZ8Vv.js"),[]),"/public/assets/sfx/tick.mp3":()=>Qt(()=>import("./tick-CDYmeR_D.js"),[]),"/public/assets/sfx/tigerroar.mp3":()=>Qt(()=>import("./tigerroar-ufow2Qol.js"),[]),"/public/assets/sfx/timerBomb.mp3":()=>Qt(()=>import("./timerBomb-DKU3ITm0.js"),[]),"/public/assets/sfx/warning.mp3":()=>Qt(()=>import("./warning-gkNUKt6F.js"),[]),"/public/assets/sfx/youLose.mp3":()=>Qt(()=>import("./youLose-B5UPTJuM.js"),[])}),Xn=Object.assign({"/public/assets/game/未翻开格子.jpg":()=>Qt(()=>import("./未翻开格子-lG4zYdoo.js"),[]),"/public/assets/game/炸弹.png":()=>Qt(()=>import("./炸弹-iWGAaqsG.js"),[]),"/public/assets/game/背景.jpg":()=>Qt(()=>import("./背景-CnU7wERJ.js"),[])}),Wn=Object.assign({}),Hn=[],Kn={"vespidaze-upbeat-rpg-battle-460971":"battleBGM","williamhector-cinematic-action-jungle-drums-loop-125bpm-345139":"intenseBGM"},Zn={dogbark:"dogBarkSFX",doghowling:"dogHowlingSFX",elephant:"elephantSFX",cat:"catSFX",chestOpen:"chestOpenSFX",curse:"curseSFX",goodperson:"goodPersonSFX",heal:"healSFX",hippos:"hippoSFX",itemFound:"itemFoundSFX",knife:"knifeSFX",monkey:"monkeySFX",poison:"poisonSFX",rebirth:"rebirthSFX",shield:"shieldSFX",sloth:"slothSFX",smallBomb:"smallBombSFX",thunder:"thunderSFX",tick:"tickSFX",tigerroar:"tigerRoarSFX",timerBomb:"timerBombSFX",warning:"warningSFX",youLose:"youLoseSFX"},$n={未翻开格子:"tile",炸弹:"bomb",背景:"background",failed:"failed",prizecup:"prizecup"},Qn={cat:"avatar_cat",chicken:"avatar_chicken",doggy:"avatar_doggy",elephant:"avatar_elephant",Hippopotamus:"avatar_hippopotamus",monkey:"avatar_monkey",sloth:"avatar_sloth",tiger:"avatar_tiger"},li={timerBomb:{folder:"timerBomb",key:"timerBomb",textures:["skeleton.webp"],scale:3,displayName:"定时炸弹",soundKey:"timerBombSFX"},curse:{folder:"curse",key:"curse",textures:["skeleton.webp"],scale:3,displayName:"诅咒",soundKey:"curseSFX"},shield:{folder:"shield",key:"shield",textures:["skeleton.avif"],scale:1,displayName:"护盾",soundKey:"shieldSFX"},poison:{folder:"poison",key:"poison",textures:["skeleton.webp"],scale:3,displayName:"毒药",soundKey:"poisonSFX"},medkit:{folder:"medikit",key:"medkit",textures:["skeleton.webp"],scale:3,displayName:"医疗包",soundKey:"healSFX"},knife:{folder:"knife",key:"knife",textures:["skeleton.webp"],scale:1,displayName:"飞刀",soundKey:"knifeSFX"},goodPerson:{folder:"goodperson",key:"goodPerson",textures:["skeleton.webp"],scale:3,displayName:"好人卡",soundKey:"goodPersonSFX"},rebirth:{folder:"rebirth",key:"rebirth",textures:["skeleton.webp"],scale:1,displayName:"复活甲",soundKey:null},thunder:{folder:"thunder",key:"thunder",textures:["skeleton.webp"],scale:3,displayName:"闪电",soundKey:"thunderSFX"},magnifier:{folder:"magnifier",key:"magnifier",textures:["skeleton.webp"],scale:3,displayName:"放大镜",soundKey:"itemFoundSFX"},dog:{folder:"dog",key:"dog",textures:["skeleton.webp"],scale:3,displayName:"狗",soundKey:"dogBarkSFX"},sloth:{folder:"sloth",key:"sloth",textures:["skeleton.webp","skeleton2.webp","skeleton3.webp","skeleton4.webp"],scale:1,displayName:"树懒",soundKey:"slothSFX"},chest:{folder:"chest",key:"chest",textures:["skeleton.webp"],scale:3,displayName:"宝箱",soundKey:"chestOpenSFX"},chicken:{folder:"chicken",key:"chicken",textures:["skeleton.webp"],scale:3,displayName:"鸡",soundKey:null},monkey:{folder:"monkey",key:"monkey",textures:["skeleton.webp"],scale:3,displayName:"猴子",soundKey:"monkeySFX"},cat:{folder:"cat",key:"cat",textures:["skeleton.webp"],scale:3,displayName:"猫",soundKey:"catSFX"},elephant:{folder:"elephant",key:"elephant",textures:["skeleton.webp"],scale:3,displayName:"大象",soundKey:"elephantSFX"},tiger:{folder:"tiger",key:"tiger",textures:["skeleton.webp"],scale:3,displayName:"老虎",soundKey:"tigerRoarSFX"},hippo:{folder:"hippo",key:"hippo",textures:["skeleton.webp"],scale:3,displayName:"河马",soundKey:"hippoSFX"}};function Jn(){return Object.entries(li).map(([E,y])=>({name:E,displayName:y.displayName||E,jsonKey:`${y.key}Json`,atlasKey:`${y.key}Atlas`,scale:y.scale||1}))}function qt(E){const y=li[E];return y?{name:E,displayName:y.displayName||E,jsonKey:`${y.key}Json`,atlasKey:`${y.key}Atlas`,scale:y.scale||1,soundKey:y.soundKey||null}:null}function ui(E){return E.split("/").pop().split(".")[0]}function fi(E){return E.replace("/public","")}function jn(){const E={};for(const y of Object.keys(Yn)){const n=ui(y),m=Kn[n]||n;E[m]=fi(y)}return E}function rs(){const E={};for(const y of Object.keys(Vn)){const n=ui(y),m=Zn[n]||n;E[m]=fi(y)}return E}function kn(){const E={},y=Object.keys(Xn).sort((m,S)=>{const x=m.split(".").pop().toLowerCase(),h=S.split(".").pop().toLowerCase(),d={png:3,webp:2,jpg:1};return(d[h]||0)-(d[x]||0)}),n=`?v=${Date.now()}`;for(const m of y){const S=ui(m),x=$n[S]||S;E[x]||(E[x]=fi(m)+n,console.log(`[ImageLoader] ${x} => ${E[x]}`))}return E}function qn(){const E={};for(const y of Object.keys(Wn)){const n=ui(y),m=Qn[n]||`avatar_${n.toLowerCase()}`;E[m]=fi(y)}return E}function as(){const E=[];for(const[y,n]of Object.entries(li))Hn.includes(n.folder)||E.push({name:y,jsonKey:`${n.key}Json`,atlasKey:`${n.key}Atlas`,jsonPath:`assets/spine/${n.folder}/skeleton.json`,atlasPath:`assets/spine/${n.folder}/skeleton.atlas`,scale:n.scale||1,textures:n.textures.map(m=>({key:`${n.key}Atlas!${m}`,path:`assets/spine/${n.folder}/${m}`}))});return E}const te={CELL_CLICK:"cell_click",ITEM_USE:"item_use",TURN_CHANGE:"turn_change",PLAYER_DAMAGE:"player_damage",PLAYER_DEATH:"player_death",PLAYER_REVIVE:"player_revive",GAME_START:"game_start",GAME_END:"game_end"};class _n{constructor(){this.actions=[],this.gameState=null,this.isRecording=!1}startRecording(y){this.actions=[],this.isRecording=!0,this.gameState={board:this.deepCopyBoard(y.board),players:this.deepCopyPlayers(y.players),config:{rows:y.rows,cols:y.cols,totalBombs:y.totalBombs,totalItems:y.totalItems},timestamp:Date.now()},this.recordAction({type:te.GAME_START,data:{players:y.players.map(n=>({id:n.id,name:n.name,characterType:n.characterType,hp:n.hp,maxHP:n.maxHP}))}}),console.log("[ReplayManager] 开始记录回放")}stopRecording(){this.isRecording=!1,console.log(`[ReplayManager] 停止记录,共 ${this.actions.length} 个操作`)}recordAction(y){this.isRecording&&this.actions.push({...y,timestamp:Date.now(),index:this.actions.length})}recordCellClick(y,n,m,S){this.recordAction({type:te.CELL_CLICK,playerId:y,data:{x:n,y:m,cellType:S.type,itemType:S.itemType,bombCount:S.bombCount}})}recordItemUse(y,n,m,S){this.recordAction({type:te.ITEM_USE,playerId:y,data:{itemId:n,targetId:m,success:S?.success,effects:S?.effects}})}recordTurnChange(y,n){this.recordAction({type:te.TURN_CHANGE,playerId:y,data:{turnCount:n}})}recordPlayerDamage(y,n,m){this.recordAction({type:te.PLAYER_DAMAGE,playerId:y,data:{damage:n,damageSource:m}})}recordPlayerDeath(y,n){this.recordAction({type:te.PLAYER_DEATH,playerId:y,data:{killerId:n}})}recordPlayerRevive(y){this.recordAction({type:te.PLAYER_REVIVE,playerId:y})}recordGameEnd(y){this.recordAction({type:te.GAME_END,data:{winnerId:y}}),this.stopRecording()}getReplayData(){return{gameState:this.gameState,actions:this.actions}}loadReplayData(y){this.gameState=y.gameState,this.actions=y.actions,this.isRecording=!1}saveToLocalStorage(){const y=this.getReplayData(),n=JSON.stringify(y),m=5;let S=JSON.parse(localStorage.getItem("gameReplays")||"[]");S.unshift({id:Date.now(),data:n,winner:this.actions.find(x=>x.type===te.GAME_END)?.data?.winnerId,timestamp:this.gameState?.timestamp}),S.length>m&&(S=S.slice(0,m)),localStorage.setItem("gameReplays",JSON.stringify(S)),localStorage.setItem("lastReplay",n),console.log("[ReplayManager] 回放已保存到本地存储")}loadFromLocalStorage(){const y=localStorage.getItem("lastReplay");if(y){const n=JSON.parse(y);return this.loadReplayData(n),!0}return!1}deepCopyBoard(y){return y.map(n=>n.map(m=>({...m})))}deepCopyPlayers(y){return y.map(n=>({id:n.id,name:n.name,hp:n.hp,maxHP:n.maxHP,characterType:n.characterType,isAI:n.isAI,isDead:n.isDead,inventory:[...n.inventory||[]],shield:n.shield,poisoned:n.poisoned,timeBombRounds:n.timeBombRounds}))}clear(){this.actions=[],this.gameState=null,this.isRecording=!1}}const Ue=new _n,zi={medkit:"💊",time_bomb:"💣",poison:"☠️",shield:"🛡️",good_card:"🃏",magnifier:"🔍",dagger:"🗡️",resurrection:"👼",lightning:"⚡",chest:"🎁",curse:"👻"};class tr extends ce{constructor(){super({key:"AIBattleScene"})}preload(){}create(){const{width:y,height:n}=this.cameras.main;this.logMessages=[],this.flaggedCells=new Set,this.initializeBGM(),this.playersConfig=this.scene.settings.data?.players||[{id:"player_1",name:"玩家",isAI:!1,aiDifficulty:"medium"},{id:"ai_1",name:"AI-1",isAI:!0,aiDifficulty:"medium"},{id:"ai_2",name:"AI-2",isAI:!0,aiDifficulty:"medium"},{id:"ai_3",name:"AI-3",isAI:!0,aiDifficulty:"medium"}],this.battleLogic=new ns({rows:10,cols:10,totalBombs:30,totalItems:10}),this.aiManager=new Bn,this.tileSize=70,this.boardOffsetX=(y-this.battleLogic.cols*this.tileSize)/2,this.boardOffsetY=220,this.setupBattleCallbacks(),this.add.rectangle(y/2,n/2,y,n,1712172),this.createBattleUI(y,n),this.initializePlayers(),this.createBoard(),this.battleLogic.startGame(),Ue.startRecording({board:this.battleLogic.board,players:this.battleLogic.players,rows:this.battleLogic.rows,cols:this.battleLogic.cols,totalBombs:this.battleLogic.totalBombs,totalItems:this.battleLogic.totalItems}),this.createPlayerInfoPanel(20,110,y),this.setupInput()}setupBattleCallbacks(){this.battleLogic.onCellRevealed=y=>{this.onCellRevealed(y)},this.battleLogic.onPlayerDamaged=(y,n)=>{this.onPlayerDamaged(y,n)},this.battleLogic.onPlayerDied=(y,n)=>{this.onPlayerDied(y,n)},this.battleLogic.onTurnChanged=y=>{this.onTurnChanged(y)},this.battleLogic.onGameEnded=y=>{this.onGameEnded(y)},this.battleLogic.onItemUsed=(y,n,m)=>{this.onItemUsed(y,n,m)},this.battleLogic.onLogMessage=y=>{this.addLogMessage(y)},this.battleLogic.onTimeBombExplode=y=>{this.playTimeBombExplosionAnimation(y)},this.battleLogic.onShieldActivated=y=>{this.playShieldAnimation(y)},this.battleLogic.onMedkitUsed=y=>{this.playMedkitAnimation(y)},this.battleLogic.onPlayerPoisoned=y=>{this.playPoisonAnimation(y)},this.battleLogic.onDogAbilityTriggered=(y,n)=>{y.characterType==="dog"&&this.cache.audio.exists("dogBarkSFX")&&this.sound.play("dogBarkSFX",{volume:.5}),this.playDogAnimation(y),n&&this.showDogSniffHint(y,n)},this.battleLogic.onMonkeyAbilityTriggered=y=>{this.playMonkeyAnimation(y),this.cache.audio.exists("monkeySFX")&&this.sound.play("monkeySFX",{volume:.5})},this.battleLogic.onElephantAbilityTriggered=y=>{this.playElephantAnimation(y)},this.battleLogic.onGoodCardUsed=y=>{this.playGoodPersonAnimation(y)},this.battleLogic.onCurseUsed=y=>{this.playCurseAnimation(y)},this.battleLogic.onSlothAbilityTriggered=y=>{this.playSlothAnimation(y)},this.battleLogic.onChestOpened=y=>{this.playChestAnimation(y)},this.battleLogic.onTigerAbilityTriggered=y=>{this.playTigerAnimation(y)},this.battleLogic.onResurrectionUsed=y=>{this.playRebirthAnimation(y)},this.battleLogic.onHippoRevived=y=>{this.playHippoAnimation(y)},this.battleLogic.onThunderUsed=y=>{this.playThunderAnimation(y)},this.battleLogic.onMagnifierUsed=(y,n)=>{this.playMagnifierAnimation(y),n&&this.showMagnifierHint(y,n)}}showMagnifierHint(y,n){const{x:m,y:S,cellType:x}=n,h=!y.name.startsWith("AI-");this.magnifierHints||(this.magnifierHints={});const d=`${m}-${S}`;if(this.magnifierHints[d]&&this.magnifierHints[d].destroy(),h){const t=this.boardOffsetX+m*this.tileSize+this.tileSize/2,e=this.boardOffsetY+S*this.tileSize+this.tileSize/2,l=this.add.text(t,e,"?",{fontSize:"32px",fontStyle:"bold",color:"#FFD700",stroke:"#000000",strokeThickness:3}).setOrigin(.5).setDepth(100);this.tweens.add({targets:l,alpha:.3,duration:500,yoyo:!0,repeat:-1}),l.setData("cellType",x),l.setData("playerId",y.id),this.magnifierHints[d]=l;const s={item:"道具",empty:"安全",bomb:"炸弹"}[x]||"未知";this.addLogMessage(`放大镜提示:位置 (${m+1}, ${S+1}) 是【${s}】格子`)}else{const t=this.add.text(0,0,"",{});t.setData("cellType",x),t.setData("playerId",y.id),this.magnifierHints[d]=t}}showDogSniffHint(y,n){const{x:m,y:S,cellType:x}=n,h=!y.name.startsWith("AI-");this.dogSniffHints||(this.dogSniffHints={});const d=`${m}-${S}`;if(this.dogSniffHints[d]&&this.dogSniffHints[d].destroy(),h){const t=this.boardOffsetX+m*this.tileSize+this.tileSize/2,e=this.boardOffsetY+S*this.tileSize+this.tileSize/2,l=this.add.text(t,e,"⭐️",{fontSize:"28px"}).setOrigin(.5).setDepth(100);this.tweens.add({targets:l,alpha:.3,duration:500,yoyo:!0,repeat:-1}),l.setData("cellType",x),l.setData("playerId",y.id),this.dogSniffHints[d]=l;const s={item:"道具",empty:"安全",bomb:"炸弹"}[x]||"未知";this.addLogMessage(`狗嗅觉提示:位置 (${m+1}, ${S+1}) 是【${s}】格子`)}else{const t=this.add.text(0,0,"",{});t.setData("cellType",x),t.setData("playerId",y.id),this.dogSniffHints[d]=t}}getCharacterEmoji(y){return{cat:"🐱",chicken:"🐔",dog:"🐕",elephant:"🐘",hippopotamus:"🦛",monkey:"🐵",sloth:"🦥",tiger:"🐯"}[y]||"🐱"}updatePlayerAvatars(){this.playerInfoContainers&&this.battleLogic.players.forEach((y,n)=>{const m=this.playerInfoContainers[n];if(m){if(m.avatar){const S=this.getCharacterEmoji(y.characterType);m.avatar.setText(S)}m.name&&m.name.setText(y.name)}})}initializePlayers(){const y=Object.values(bt),n=[...y],m=this.playersConfig.length>y.length;this.playersConfig.forEach((S,x)=>{let h;if(m)h=y[Math.floor(Math.random()*y.length)];else{const e=Math.floor(Math.random()*n.length);h=n.splice(e,1)[0]}const d=this.battleLogic.addPlayer({id:S.id,name:S.name,characterType:h});if(S.isAI){const e=this.aiManager.createAI(S.id,S.name,S.aiDifficulty);d.ai=e,d.isAI=!0}else d.isAI=!1;const t=Se.create(h);this.addLogMessage(`${d.name} 获得角色:【${t.name}】`)})}createBattleUI(y,n){this.turnIndicator=this.add.rectangle(y/2,40,y-120,60,2963272).setStrokeStyle(2,4871528),this.turnText=this.add.text(y/2,40,"等待开始...",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.createLogButton(50,40),this.createBGMButton(y-50,40)}createBGMButton(y,n){const m=this.add.container(y,n),S=this.add.circle(0,0,20,2963272).setStrokeStyle(2,4871528).setInteractive({useHandCursor:!0}),x=this.add.text(0,0,"🎵",{fontSize:"20px"}).setOrigin(.5);m.add([S,x]),S.on("pointerover",()=>{S.setFillStyle(4871528),S.setScale(1.1)}),S.on("pointerout",()=>{S.setFillStyle(2963272),S.setScale(1)}),S.on("pointerdown",()=>{this.toggleBGM()})}createPlayerInfoPanel(y,n,m){const S=m,x=90;this.add.rectangle(y+S/2,n+x/2,S,x,2963272,.9).setStrokeStyle(2,4871528),this.playerInfoContainers=[];const h=Math.min(4,this.battleLogic.players.length),d=this.battleLogic.players.length-h,t=S/4;for(let e=0;e<h;e++){const l=this.battleLogic.players[e],i=y+e*t+t/2,s=n+x/2,r=t-2,o=x-8,a=this.add.rectangle(i,s,r,o,4871528).setStrokeStyle(1,7438486),u=this.getCharacterEmoji(l.characterType),f=s+8,v=this.add.text(i,f,u,{fontSize:`${Math.floor(o*.5)}px`}).setOrigin(.5),c=this.add.text(i,n+12,l.name,{fontSize:"20px",fontStyle:"bold",color:"#ffffff",backgroundColor:"#000000",backgroundAlpha:.6,padding:{x:4,y:2}}).setOrigin(.5),g=l.getStatus(),p=Math.max(0,g.hp),T="❤️".repeat(p),C="🖤".repeat(g.maxHP-p),M=this.add.text(i-r/2+38,n+x-15,`${T}${C}`,{fontSize:"12px",color:"#ff6b6b",fontStyle:"bold",backgroundColor:"#000000",backgroundAlpha:.7,padding:{x:4,y:2}}).setOrigin(.5),A=this.add.text(i+r/2-38,n+x-15,"",{fontSize:"16px",backgroundColor:"#000000",backgroundAlpha:.7,padding:{x:4,y:2}}).setOrigin(.5);this.playerInfoContainers.push({bg:a,avatar:v,name:c,hpText:M,statusIcons:A})}d>0&&this.createBottomPlayerPanel(d,h)}createBottomPlayerPanel(y,n){const{width:m,height:S}=this.cameras.main,x=this.boardOffsetY+this.battleLogic.rows*this.tileSize,h=90,d=x+10,t=m-40,e=20;this.add.rectangle(e+t/2,d+h/2,t,h,2963272,.9).setStrokeStyle(2,4871528);const l=t/4;for(let i=0;i<y;i++){const s=this.battleLogic.players[n+i],r=e+i*l+l/2,o=d+h/2,a=l-2,u=h-8,f=this.add.rectangle(r,o,a,u,4871528).setStrokeStyle(1,7438486),v=this.getCharacterEmoji(s.characterType),c=o+8,g=this.add.text(r,c,v,{fontSize:`${Math.floor(u*.5)}px`}).setOrigin(.5),p=this.add.text(r,d+12,s.name,{fontSize:"20px",fontStyle:"bold",color:"#ffffff",backgroundColor:"#000000",backgroundAlpha:.6,padding:{x:4,y:2}}).setOrigin(.5),T=s.getStatus(),C=Math.max(0,T.hp),M="❤️".repeat(C),A="🖤".repeat(T.maxHP-C),R=this.add.text(r-a/2+38,d+h-15,`${M}${A}`,{fontSize:"12px",color:"#ff6b6b",fontStyle:"bold",backgroundColor:"#000000",backgroundAlpha:.7,padding:{x:4,y:2}}).setOrigin(.5),P=this.add.text(r+a/2-38,d+h-15,"",{fontSize:"16px",backgroundColor:"#000000",backgroundAlpha:.7,padding:{x:4,y:2}}).setOrigin(.5);this.playerInfoContainers.push({bg:f,avatar:g,name:p,hpText:R,statusIcons:P})}}createBGMButton(y,n){const m=this.add.container(y,n),S=this.add.circle(0,0,28,2963272).setStrokeStyle(3,4871528).setInteractive({useHandCursor:!0}),x=this.add.text(0,0,"🎵",{fontSize:"28px"}).setOrigin(.5);m.add([S,x]),S.on("pointerover",()=>{S.setFillStyle(4871528),S.setScale(1.1)}),S.on("pointerout",()=>{S.setFillStyle(2963272),S.setScale(1)}),S.on("pointerdown",()=>{this.toggleBGM()}),this.bgmButton={bg:S,icon:x}}createLogButton(y,n){const m=this.add.container(y,n),S=this.add.circle(0,0,28,2963272).setStrokeStyle(3,4871528).setInteractive({useHandCursor:!0}),x=this.add.text(0,0,"📚",{fontSize:"28px"}).setOrigin(.5);m.add([S,x]),S.on("pointerover",()=>{S.setFillStyle(4871528),S.setScale(1.1)}),S.on("pointerout",()=>{S.setFillStyle(2963272),S.setScale(1)}),S.on("pointerdown",()=>{this.openLogScene()}),this.logButton={bg:S,icon:x}}openLogScene(){this.scene.pause(),this.scene.launch("LogScene",{logMessages:this.logMessages,fromScene:"AIBattleScene"})}createActionLog(y,n,m){this.logPanelBg=this.add.rectangle(y+m/2,n+240/2,m,240,2963272,.9).setStrokeStyle(2,4871528).setInteractive({useHandCursor:!0}),this.logPanelBg.on("pointerdown",()=>{this.showFullLogScene()}),this.logPanelBg.on("pointerover",()=>{this.logPanelBg.setStrokeStyle(3,65416)}),this.logPanelBg.on("pointerout",()=>{this.logPanelBg.setStrokeStyle(2,4871528)}),this.add.text(y+m/2,n+15,"操作日志 (点击查看完整记录)",{fontSize:"18px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.logMessages=[],this.maxLogMessages=10}addLogMessage(y){this.logMessages.push(y),y.endsWith("翻开了格子")||this.showToast(y,2e3)}updateActionLogDisplay(){this.logTextObjects&&this.logTextObjects.forEach(x=>x.destroy()),this.logTextObjects=[];const y=40,n=1090,m=22;this.logMessages.slice(-this.maxLogMessages).forEach((x,h)=>{const d=this.add.text(y,n+15+h*m,x,{fontSize:"15px",color:"#e2e8f0",wordWrap:{width:670}}).setOrigin(0,0);this.logTextObjects.push(d)})}createBoard(){this.add.image(this.boardOffsetX+this.battleLogic.cols*this.tileSize/2,this.boardOffsetY+this.battleLogic.rows*this.tileSize/2,"background").setDisplaySize(this.battleLogic.cols*this.tileSize,this.battleLogic.rows*this.tileSize),this.boardContainer=this.add.container(this.boardOffsetX,this.boardOffsetY);for(let y=0;y<this.battleLogic.rows;y++)for(let n=0;n<this.battleLogic.cols;n++){const m=n*this.tileSize,S=y*this.tileSize,x=this.add.image(m+this.tileSize/2,S+this.tileSize/2,"tile").setDisplaySize(this.tileSize-2,this.tileSize-2).setInteractive().setData("gridX",n).setData("gridY",y);this.boardContainer.add(x)}}setupInput(){this.input.on("gameobjectdown",(y,n)=>{if(this.battleLogic.phase!==Fe.PLAYING)return;const m=this.battleLogic.getCurrentPlayer();if(!m)return;const S=n.getData("gridX"),x=n.getData("gridY");if(S!==void 0&&x!==void 0){const h=this.battleLogic.board[x][S];if(m.isAI||m.isDead){h&&!h.revealed&&this.toggleFlag(S,x);return}this.turnTimerEvent&&(this.turnTimerEvent.remove(),this.turnTimerEvent=null),this.boardContainer.each(d=>{d.disableInteractive()}),this.battleLogic.processClick(S,x)}})}toggleFlag(y,n){const m=`${y}-${n}`;this.flaggedCells.has(m)?(this.flaggedCells.delete(m),this.addLogMessage(`移除了 (${y+1}, ${n+1}) 的旗子`)):(this.flaggedCells.add(m),this.addLogMessage(`在 (${y+1}, ${n+1}) 插了旗 🚩`)),this.updateBoardFlags()}updateBoardFlags(){this.flagContainer&&this.flagContainer.destroy(),this.flagContainer=this.add.container(this.boardOffsetX,this.boardOffsetY),this.flaggedCells.forEach(y=>{const[n,m]=y.split("-").map(Number),S=n*this.tileSize+this.tileSize/2,x=m*this.tileSize+this.tileSize/2,h=this.add.text(S,x,"🚩",{fontSize:`${Math.floor(this.tileSize*.6)}px`}).setOrigin(.5);this.flagContainer.add(h)})}checkAITurn(){if(this.battleLogic.phase!==Fe.PLAYING)return;const y=this.battleLogic.getCurrentPlayer();if(y){if(console.log(`[checkAITurn] 玩家: ${y.name}, isAI: ${y.isAI}, isDead: ${y.isDead}`),y.isAI&&y.isDead){this.battleLogic.nextTurn();return}y.isAI&&!y.isDead&&this.executeAITurn(y)}}async executeAITurn(y){const n=y.ai;if(!n){this.battleLogic.nextTurn();return}const m=this.collectHintsForAI(y);await this.aiManager.executeAITurn(n,y,this.battleLogic,m)}collectHintsForAI(y){const n={itemCells:[],safeCells:[]};if(this.magnifierHints)for(const m of Object.keys(this.magnifierHints)){const[S,x]=m.split("-").map(Number),h=this.magnifierHints[m],d=h.getData("cellType"),t=h.getData("playerId");d&&t===y.id&&(d==="item"?n.itemCells.push({x:S,y:x,type:d}):d!=="bomb"&&n.safeCells.push({x:S,y:x,type:d}))}if(this.dogSniffHints)for(const m of Object.keys(this.dogSniffHints)){const[S,x]=m.split("-").map(Number),h=this.dogSniffHints[m],d=h.getData("cellType"),t=h.getData("playerId");d&&t===y.id&&(d==="item"?n.itemCells.some(e=>e.x===S&&e.y===x)||n.itemCells.push({x:S,y:x,type:d}):d!=="bomb"&&(n.safeCells.some(e=>e.x===S&&e.y===x)||n.safeCells.push({x:S,y:x,type:d})))}return n}onCellRevealed(y){const n=this.battleLogic.getCurrentPlayer();n&&Ue.recordCellClick(n.id,y.x,y.y,y);const m=`${y.x}-${y.y}`;if(this.flaggedCells.has(m)&&(this.flaggedCells.delete(m),this.updateBoardFlags()),this.magnifierHints){const d=`${y.x}-${y.y}`;this.magnifierHints[d]&&(this.magnifierHints[d].destroy(),delete this.magnifierHints[d])}if(this.dogSniffHints){const d=`${y.x}-${y.y}`;this.dogSniffHints[d]&&(this.dogSniffHints[d].destroy(),delete this.dogSniffHints[d])}const S=this.boardOffsetX+y.x*this.tileSize,x=this.boardOffsetY+y.y*this.tileSize,h=this.boardContainer.list.find(d=>d.getData("gridX")===y.x&&d.getData("gridY")===y.y);if(h)switch(h.disableInteractive(),y.type){case $t.BOMB:h.setTexture("bomb"),h.setDisplaySize(this.tileSize-4,this.tileSize-4);break;case $t.ITEM:h.setTexture("tile");const d=zi[y.itemType]||"🎁";this.add.text(S+this.tileSize/2,x+this.tileSize/2,d,{fontSize:"32px"}).setOrigin(.5).setDepth(1);break;case $t.EMPTY:if(h.setTexture("tile"),h.setTint(7438486),y.bombCount>0){const e={1:"#3b82f6",2:"#22c55e",3:"#ef4444",4:"#8b5cf6",5:"#a16207",6:"#06b6d4",7:"#000000",8:"#6b7280"}[y.bombCount]||"#000000";this.add.text(S+this.tileSize/2,x+this.tileSize/2,y.bombCount.toString(),{fontSize:"48px",fontStyle:"bold",color:e}).setOrigin(.5).setDepth(1)}break}}onPlayerDamaged(y,n){this.updatePlayerInfo(y),this.checkAndSwitchBGM(),n.stressReaction&&this.playChickenAnimation(y),n.agilityReaction&&this.playCatAnimation(y),(n.slothBombResist||n.slothPoisonImmune)&&this.playSlothAnimation(y),n.damageSource==="lightning"&&this.addSmokeEffect(y);try{this.cache.audio.exists("smallBombSFX")&&this.sound.play("smallBombSFX",{volume:.5})}catch(S){console.error("播放炸弹音效失败:",S)}!y.isAI?(this.cameras.main.shake(200,.01),this.flashScreenRed()):this.flashAvatarRed(y)}addSmokeEffect(y){const n=this.battleLogic.players.findIndex(d=>d.id===y.id),m=this.playerInfoContainers[n];if(!m)return;const S=m.avatar.x,x=m.avatar.y,h=[];for(let d=0;d<5;d++){const t=(Math.random()-.5)*40,e=(Math.random()-.5)*40,l=this.add.text(S+t,x+e,"💨",{fontSize:`${20+Math.random()*20}px`}).setOrigin(.5).setDepth(50).setAlpha(.8);h.push(l)}h.forEach((d,t)=>{this.tweens.add({targets:d,y:d.y-60-Math.random()*30,alpha:0,scale:1.5+Math.random()*.5,duration:1500+Math.random()*500,delay:t*100,ease:"Power2",onComplete:()=>d.destroy()})})}flashAvatarRed(y){const n=this.battleLogic.players.findIndex(S=>S.id===y.id),m=this.playerInfoContainers[n];if(m&&m.avatar){const S=m.avatar;S.tintTopLeft,S.setTint(16711680),this.tweens.add({targets:S,duration:100,yoyo:!0,repeat:2,onYoyo:()=>{S.setTint(16711680)},onYoyoBack:()=>{S.clearTint()},onComplete:()=>{S.clearTint()}})}}flashScreenRed(){const{width:y,height:n}=this.cameras.main,m=20,S=this.add.graphics();S.lineStyle(m,16711680,.8),S.lineBetween(0,0,y,0),S.lineBetween(0,n,y,n),S.lineBetween(0,0,0,n),S.lineBetween(y,0,y,n),S.setDepth(9999),this.tweens.add({targets:S,alpha:0,duration:300,ease:"Power2",onComplete:()=>{S.destroy()}})}onPlayerDied(y,n){Ue.recordPlayerDeath(y.id,n),this.updatePlayerInfo(y),!y.isAI&&this.cache.audio.exists("youLoseSFX")&&this.sound.play("youLoseSFX",{volume:.5}),y.characterType==="dog"&&this.cache.audio.exists("dogHowlingSFX")&&this.sound.play("dogHowlingSFX",{volume:.5});const m=this.playerInfoContainers.find(S=>S.name.text===y.name);if(m){m.avatar&&m.avatar.setTint(16729156);const S=m.bg.width,x=m.bg.height,h=m.bg.x,d=m.bg.y,t=Math.min(S,x)*1.2,e=this.add.text(h,d,"🚫",{fontSize:`${t}px`,color:"#ffffff"}).setOrigin(.5).setDepth(10);m.forbiddenSign=e}}onTurnChanged(y){Ue.recordTurnChange(y.id,this.battleLogic.totalTurnCount),this.turnTimerEvent&&(this.turnTimerEvent.remove(),this.turnTimerEvent=null),this.aiDelayTimer&&(this.aiDelayTimer.remove(),this.aiDelayTimer=null);const n=this.battleLogic.totalTurnCount+1;this.turnText.setText(`第${n}回合 - ${y.name}`),this.playerInfoContainers&&this.playerInfoContainers.forEach((m,S)=>{this.battleLogic.players[S].id===y.id?m.bg.setStrokeStyle(3,65416):m.bg.setStrokeStyle(1,7438486)}),console.log(`[onTurnChanged] 玩家: ${y.name}, isAI: ${y.isAI}, isDead: ${y.isDead}`),y.isAI?(this.boardContainer.each(m=>{const S=m.getData("gridX"),x=m.getData("gridY");if(S!==void 0&&x!==void 0){const h=this.battleLogic.board[x][S];h&&!h.revealed?m.setInteractive():m.disableInteractive()}}),this.aiDelayTimer=this.time.delayedCall(1e3,()=>{this.aiDelayTimer=null,this.checkAITurn()})):(this.boardContainer.each(m=>{const S=m.getData("gridX"),x=m.getData("gridY");if(S!==void 0&&x!==void 0){const h=this.battleLogic.board[x][S];h&&!h.revealed?m.setInteractive():m.disableInteractive()}}),this.turnTimeLeft=10,this.updateTimerDisplay(),this.turnTimerEvent=this.time.addEvent({delay:1e3,callback:this.onTurnTimerTick,callbackScope:this,loop:!0}))}onTurnTimerTick(){this.turnTimeLeft--,this.updateTimerDisplay(),this.turnTimeLeft<=0&&(this.addLogMessage("时间到!强制结束回合"),this.turnTimerEvent.remove(),this.turnTimerEvent=null,this.autoClickRandomCell())}updateTimerDisplay(){this.turnTimeLeft<=5&&this.turnTimeLeft>0&&this.cache.audio.exists("warningSFX")&&this.sound.play("warningSFX",{volume:.3});const y=this.battleLogic.totalTurnCount+1,n=this.battleLogic.getCurrentPlayer();this.turnTimeLeft<=3?(this.turnText.setColor("#ff4444"),this.turnText.setText(`第${y}回合 - ${n?.name||""} (${this.turnTimeLeft}s)`)):(this.turnText.setColor("#ffffff"),this.turnText.setText(`第${y}回合 - ${n?.name||""} (${this.turnTimeLeft}s)`))}autoClickRandomCell(){const y=this.battleLogic.getCurrentPlayer();if(!y||y.isAI)return;const n=[];for(let m=0;m<this.battleLogic.rows;m++)for(let S=0;S<this.battleLogic.cols;S++)this.battleLogic.board[m][S].revealed||n.push({x:S,y:m});if(n.length>0){const m=n[Math.floor(Math.random()*n.length)];this.battleLogic.processClick(m.x,m.y)}}onGameEnded(y,n){Ue.recordGameEnd(y.id),Ue.saveToLocalStorage(),this.boardContainer.each(m=>{m.disableInteractive()}),this.revealAllCells(),this.turnText.setText(`🎉 ${y.name} 获胜!`),this.time.delayedCall(1e3,()=>{this.scene.pause("AIBattleScene"),this.scene.launch("ResultScene",{winner:y,loser:n,logMessages:this.logMessages})})}revealAllCells(){for(let y=0;y<this.battleLogic.rows;y++)for(let n=0;n<this.battleLogic.cols;n++){const m=this.battleLogic.board[y][n];if(!m.revealed){const S=this.boardOffsetX+n*this.tileSize,x=this.boardOffsetY+y*this.tileSize,h=this.boardContainer.list.find(d=>d.getData("gridX")===n&&d.getData("gridY")===y);if(h)switch(h.disableInteractive(),m.type){case $t.BOMB:h.setTexture("bomb"),h.setDisplaySize(this.tileSize-4,this.tileSize-4);break;case $t.ITEM:h.setTexture("tile"),h.setTint(7438486);const d=zi[m.itemType]||"🎁";this.add.text(S+this.tileSize/2,x+this.tileSize/2,d,{fontSize:"32px"}).setOrigin(.5).setDepth(1);break;case $t.EMPTY:if(h.setTexture("tile"),h.setTint(7438486),m.bombCount>0){const e={1:"#3b82f6",2:"#22c55e",3:"#ef4444",4:"#8b5cf6",5:"#a16207",6:"#06b6d4",7:"#000000",8:"#6b7280"}[m.bombCount]||"#000000";this.add.text(S+this.tileSize/2,x+this.tileSize/2,m.bombCount.toString(),{fontSize:"48px",fontStyle:"bold",color:e}).setOrigin(.5).setDepth(1)}break}}}}onItemUsed(y,n,m){if(Ue.recordItemUse(y.id,n,null,m),this.updatePlayerInfo(y),this.checkAndSwitchBGM(),n==="time_bomb"&&this.cache.audio.exists("tickSFX")&&this.sound.play("tickSFX",{volume:.5}),n==="dagger"&&m?.effects?.length>0){const S=m.effects.find(x=>x.type==="damage");if(S&&S.damages&&S.damages.length>0){const x=S.damages[0].target,h=this.battleLogic.players.find(d=>d.id===x);h&&this.playKnifeAnimation(y,h)}}}updatePlayerInfo(y){const n=this.battleLogic.players.findIndex(S=>S.id===y.id),m=this.playerInfoContainers[n];if(m){const S=y.getStatus(),x=Math.max(0,S.hp),h="❤️".repeat(x),d="🖤".repeat(S.maxHP-x);m.hpText.setText(`${h}${d}`);let t="";S.resurrectionCard&&!S.resurrectionUsed&&(t+="💊"),S.shield&&(t+="🛡️"),S.poisoned>0&&(t+="☠️"),S.cursed>0&&(t+="💀"),S.timeBombRounds>0&&(t+="💣"),m.statusIcons.setText(t)}}updateAllPlayerInfo(){this.battleLogic.players.forEach(y=>{this.updatePlayerInfo(y)})}useItem(y){this.battleLogic.getCurrentPlayer();const n=this.battleLogic.useItem(y);n.success?this.addLogMessage(n.message):this.addLogMessage(n.message)}showFullLogScene(){this.scene.pause("AIBattleScene"),this.scene.launch("LogScene",{logMessages:this.logMessages,fromScene:"AIBattleScene"})}playSpineAnimation(y){this.currentSpineAnimation&&(this.currentSpineAnimation.destroy(),this.currentSpineAnimation=null);let n=y;if(typeof y=="string"&&(n=qt(y),!n)){console.warn(`动画配置未找到: ${y}`);return}const{jsonKey:m,atlasKey:S,player:x,soundKey:h,scale:d=1,loop:t=!1,timeout:e=3e3,onPlay:l=null,logName:i="动画"}=n,{width:s,height:r}=this.cameras.main;h&&this.cache.audio.exists(h)&&this.sound.play(h,{volume:.5});try{if(!this.cache.json.exists(m)||!this.cache.text.exists(S)){console.warn(`${i}资源未加载,跳过动画`);return}const o=this.boardOffsetY+this.battleLogic.rows*this.tileSize,a=this.battleLogic.players.length>4,u=a?100:0;let f;a?f=o+(r-o-u)/2:f=o+(r-o)/2;const v=this.add.spine(s/2,f,m,S);v.setScale(d),v.setDepth(100),this.currentSpineAnimation=v;const c=v.animationStateData.skeletonData.animations;if(c.length>0){const g=c[0].name;v.animationState.setAnimation(0,g,t),console.log(`播放${i}: ${x?.name||"未知"} 在屏幕中央, 动画: ${g}`),l&&l()}else{console.warn(`${i}Spine文件中没有找到动画数据`),v.destroy(),this.currentSpineAnimation=null;return}v.animationState.addListener({complete:()=>{v.destroy(),this.currentSpineAnimation=null}}),this.time.delayedCall(e,()=>{v.active&&(v.destroy(),this.currentSpineAnimation=null)})}catch(o){console.error(`播放${i}失败:`,o),this.currentSpineAnimation=null}}playTimeBombExplosionAnimation(y){const n=qt("timerBomb");this.playSpineAnimation({...n,player:y,logName:"定时炸弹爆炸动画",onPlay:()=>{this.time.delayedCall(500,()=>{this.cameras.main.shake(200,.01)})}})}playShieldAnimation(y){const n=qt("shield");this.playSpineAnimation({...n,player:y,logName:"护盾激活动画"})}playMedkitAnimation(y){const n=qt("medkit");this.playSpineAnimation({...n,player:y,logName:"医疗包动画"})}playPoisonAnimation(y){const n=qt("poison");this.playSpineAnimation({...n,player:y,logName:"毒药动画"})}playDogAnimation(y){const n=qt("dog");this.playSpineAnimation({...n,player:y,logName:"狗动画",timeout:5e3})}playKnifeAnimation(y,n){const m=qt("knife");this.playSpineAnimation({...m,player:y,logName:"飞刀动画"})}playGoodPersonAnimation(y){const n=qt("goodPerson");this.playSpineAnimation({...n,player:y,logName:"好人卡动画"})}playRebirthAnimation(y){const n=qt("rebirth");this.playSpineAnimation({...n,player:y,logName:"复活甲动画",timeout:5e3})}playThunderAnimation(y){const n=qt("thunder");this.playSpineAnimation({...n,player:y,logName:"闪电动画"})}playMagnifierAnimation(y){const n=qt("magnifier");this.playSpineAnimation({...n,player:y,logName:"放大镜动画"})}playChickenAnimation(y){const n=qt("chicken");this.playSpineAnimation({...n,player:y,logName:"鸡应激动画",timeout:5e3})}playMonkeyAnimation(y){const n=qt("monkey");this.playSpineAnimation({...n,player:y,logName:"猴子采摘动画",timeout:5e3})}playCatAnimation(y){const n=qt("cat");this.playSpineAnimation({...n,player:y,logName:"猫灵动动画",timeout:5e3})}playElephantAnimation(y){const n=qt("elephant");this.playSpineAnimation({...n,player:y,logName:"大象皮厚动画",timeout:5e3})}playTigerAnimation(y){this.cameras.main.shake(500,.03);const n=qt("tiger");this.playSpineAnimation({...n,player:y,logName:"老虎猛击动画",timeout:5e3})}playCurseAnimation(y){const n=qt("curse");this.playSpineAnimation({...n,player:y,logName:"诅咒动画",timeout:5e3})}playSlothAnimation(y){const n=qt("sloth");this.playSpineAnimation({...n,player:y,logName:"树懒特性动画",timeout:5e3})}playChestAnimation(y){const n=qt("chest");this.playSpineAnimation({...n,player:y,logName:"宝箱动画",timeout:5e3})}playHippoAnimation(y){const n=qt("hippo");this.playSpineAnimation({...n,player:y,logName:"河马复活动画",timeout:5e3})}initializeBGM(){if(this.bgm&&(this.bgm.stop(),this.bgm.destroy(),this.bgm=null),localStorage.getItem("bgmEnabled")!=="false")try{if(this.cache.audio.exists("battleBGM")){const n=localStorage.getItem("bgmVolume"),m=n?parseFloat(n):.1;this.bgm=this.sound.add("battleBGM",{loop:!0,volume:m}),this.bgm.play(),this.bgmEnabled=!0,console.log("BGM已成功加载并播放,音量:",m)}else console.warn("BGM音频文件未找到,跳过BGM播放"),this.bgmEnabled=!1}catch(n){console.error("BGM初始化失败:",n),this.bgmEnabled=!1}else this.bgmEnabled=!1;this.updateBGMButton()}toggleBGM(){this.bgmEnabled=!this.bgmEnabled,localStorage.setItem("bgmEnabled",this.bgmEnabled.toString()),this.bgmEnabled?(this.bgm||(this.bgm=this.sound.add("battleBGM",{loop:!0,volume:.5})),this.bgm.resume(),this.addLogMessage("🎵 BGM已开启")):(this.bgm&&this.bgm.pause(),this.addLogMessage("🔇 BGM已关闭")),this.updateBGMButton()}updateBGMButton(){this.bgmButton&&(this.bgmEnabled?(this.bgmButton.icon.setText("🎵"),this.bgmButton.bg.setStrokeStyle(2,65416)):(this.bgmButton.icon.setText("🔇"),this.bgmButton.bg.setStrokeStyle(2,4871528)))}checkAndSwitchBGM(){if(!this.bgmEnabled||!this.battleLogic)return;const y=this.battleLogic.players.find(x=>!x.name.startsWith("AI-"));if(!y||y.isDead)return;const m=y.hp<=2,S=this.bgm.key==="intenseBGM";m&&!S?this.switchToIntenseBGM():!m&&S&&this.switchToNormalBGM()}switchToIntenseBGM(){if(!this.cache.audio.exists("intenseBGM")){console.warn("紧张BGM文件未找到");return}try{const y=this.bgm.volume;this.bgm.stop(),this.bgm=this.sound.add("intenseBGM",{loop:!0,volume:y}),this.bgm.play(),console.log("已切换到紧张氛围BGM(血量<=2)")}catch(y){console.error("切换到紧张BGM失败:",y)}}switchToNormalBGM(){if(!this.cache.audio.exists("battleBGM")){console.warn("普通BGM文件未找到");return}try{const y=this.bgm.volume;this.bgm.stop(),this.bgm=this.sound.add("battleBGM",{loop:!0,volume:y}),this.bgm.play(),console.log("已切换回普通BGM(血量>2)")}catch(y){console.error("切换回普通BGM失败:",y)}}shutdown(){this.bgm&&(this.bgm.stop(),this.bgm.destroy(),this.bgm=null)}showToast(y,n=2e3){const{width:m,height:S}=this.cameras.main,x=this.add.container(m/2,80).setDepth(99999),h=this.add.rectangle(0,0,400,50,2963272,.9).setStrokeStyle(2,65416),d=this.add.text(0,0,y,{fontSize:"18px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);x.add([h,d]),x.alpha=0,this.tweens.add({targets:x,alpha:1,duration:200,ease:"Power2"}),this.time.delayedCall(n,()=>{this.tweens.add({targets:x,alpha:0,duration:200,ease:"Power2",onComplete:()=>{x.destroy()}})})}}class er extends ce{constructor(){super({key:"ResultScene"})}init(y){this.winner=y.winner,this.loser=y.loser,this.logMessages=y.logMessages||[],this.fromScene=y.fromScene||"AIBattleScene",this.isOnline=y.isOnline||!1}getCharacterEmoji(y){return{cat:"🐱",chicken:"🐔",dog:"🐕",elephant:"🐘",hippopotamus:"🦛",monkey:"🐵",sloth:"🦥",tiger:"🐯"}[y]||"🐱"}create(){const{width:y,height:n}=this.cameras.main;this.overlay=this.add.rectangle(y/2,n/2,y,n,0,.75),this.contentContainer=this.add.container(y/2,n/2);const m=this.winner&&!this.winner.isAI,S=m?65416:16729156;this.contentBg=this.add.rectangle(0,0,y*.85,n*.8,1712172,.95).setStrokeStyle(3,S).setInteractive(),this.contentContainer.add(this.contentBg),this.createCloseButton(y,n),m?this.playVictoryAnimation(y,n):this.playDefeatAnimation(y,n),this.createResultDisplay(y,n,m),this.createButtons(y,n)}createResultDisplay(y,n,m){const S=m?this.winner:this.loser,x=this.getCharacterEmoji(S?.characterType);if(m){const h=this.add.text(0,n*-.32,`${this.winner.name} 获得胜利!`,{fontSize:"48px",fontStyle:"bold",color:"#00ff88",stroke:"#000",strokeThickness:6}).setOrigin(.5);this.contentContainer.add(h);const d=this.add.text(0,n*-.17,`${x}🏆`,{fontSize:"60px"}).setOrigin(.5);this.contentContainer.add(d)}else{const h=this.add.text(0,n*-.32,`${this.loser?.name||"你"} 被淘汰了`,{fontSize:"48px",fontStyle:"bold",color:"#ff4444",stroke:"#000",strokeThickness:6}).setOrigin(.5);this.contentContainer.add(h);const d=this.add.text(0,n*-.17,`${x}😢`,{fontSize:"60px"}).setOrigin(.5);if(this.contentContainer.add(d),this.winner){const t=this.add.text(0,n*-.05,`胜利者: ${this.winner.name}`,{fontSize:"24px",color:"#ffcc00"}).setOrigin(.5);this.contentContainer.add(t)}}}createCloseButton(y,n){const m=this.add.rectangle(y*.42,n*.12,50,50,16729156).setStrokeStyle(2,13369344).setInteractive({useHandCursor:!0});this.add.text(y*.42,n*.12,"✕",{fontSize:"30px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),m.on("pointerover",()=>{m.setFillStyle(16737894),m.setScale(1.1)}),m.on("pointerout",()=>{m.setFillStyle(16729156),m.setScale(1)}),m.on("pointerdown",()=>{this.closeResult()})}closeResult(){this.scene.stop(),this.scene.resume(this.fromScene)}playVictoryAnimation(y,n){for(let m=0;m<30;m++)this.time.delayedCall(m*100,()=>{const S=Math.random()*y,x=Math.random()*n*.5,h=[65416,65484,8978312,16764040][Math.floor(Math.random()*4)],d=this.add.circle(S,x,5,h);this.tweens.add({targets:d,scale:{from:0,to:3},alpha:{from:1,to:0},duration:1e3,onComplete:()=>{d.destroy()}})})}playDefeatAnimation(y,n){for(let m=0;m<20;m++)this.time.delayedCall(m*150,()=>{const S=Math.random()*y,h=this.add.circle(S,-20,8,6710886);this.tweens.add({targets:h,y:n*.5,alpha:{from:1,to:0},duration:2e3,onComplete:()=>{h.destroy()}})})}createButtons(y,n){const m=n*.22;if(this.isOnline){const S=this.add.rectangle(-110,m,190,60,1483594).setStrokeStyle(3,2278750).setInteractive({useHandCursor:!0});this.contentContainer.add(S);const x=this.add.text(-110,m,"🚀 再次匹配",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);this.contentContainer.add(x),S.on("pointerover",()=>{S.setFillStyle(2278750),S.setScale(1.05)}),S.on("pointerout",()=>{S.setFillStyle(1483594),S.setScale(1)}),S.on("pointerdown",()=>{this.scene.stop(this.fromScene),this.scene.stop("ResultScene"),this.scene.start("LobbyScene")});const h=this.add.rectangle(110,m,190,60,1920728).setStrokeStyle(3,3900150).setInteractive({useHandCursor:!0});this.contentContainer.add(h);const d=this.add.text(110,m,"🏠 返回大厅",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);this.contentContainer.add(d),h.on("pointerover",()=>{h.setFillStyle(3900150),h.setScale(1.05)}),h.on("pointerout",()=>{h.setFillStyle(1920728),h.setScale(1)}),h.on("pointerdown",()=>{this.scene.stop(this.fromScene),this.scene.stop("ResultScene"),this.scene.start("LobbyScene")})}else{const S=this.add.rectangle(-120,m,140,45,4886754).setStrokeStyle(3,3504829).setInteractive({useHandCursor:!0});this.contentContainer.add(S);const x=this.add.text(-120,m,"返回大厅",{fontSize:"18px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);this.contentContainer.add(x),S.on("pointerover",()=>{S.setFillStyle(5939186),S.setScale(1.05)}),S.on("pointerout",()=>{S.setFillStyle(4886754),S.setScale(1)}),S.on("pointerdown",()=>{this.scene.stop(this.fromScene),this.scene.start("MenuScene")});const h=this.add.rectangle(0,m,140,45,65416).setStrokeStyle(3,52330).setInteractive({useHandCursor:!0});this.contentContainer.add(h);const d=this.add.text(0,m,"再来一局",{fontSize:"18px",fontStyle:"bold",color:"#1a202c"}).setOrigin(.5);this.contentContainer.add(d),h.on("pointerover",()=>{h.setFillStyle(65433),h.setScale(1.05)}),h.on("pointerout",()=>{h.setFillStyle(65416),h.setScale(1)}),h.on("pointerdown",()=>{this.scene.stop(this.fromScene),this.scene.stop("ResultScene"),this.scene.start("RoomScene")});const t=this.add.rectangle(120,m,140,45,9133302).setStrokeStyle(3,8141549).setInteractive({useHandCursor:!0});this.contentContainer.add(t);const e=this.add.text(120,m,"📼 回放",{fontSize:"18px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);this.contentContainer.add(e),t.on("pointerover",()=>{t.setFillStyle(10980346),t.setScale(1.05)}),t.on("pointerout",()=>{t.setFillStyle(9133302),t.setScale(1)}),t.on("pointerdown",()=>{this.scene.stop(this.fromScene),this.scene.stop("ResultScene"),this.scene.start("ReplayScene")})}}}class ir extends ce{constructor(){super({key:"ReplayScene"}),this.isCompactLayout=!1}init(y){this.replayData=y.replayData||Ue.getReplayData(),this.currentStep=0,this.isPlaying=!1,this.playSpeed=1e3,this.previewedCells=new Map,this.flaggedCells=new Set}create(){const{width:y,height:n}=this.cameras.main;this.isCompactLayout=vt.isCompactLayout(),vt.logLayoutInfo(),this.add.rectangle(y/2,n/2,y,n,1712172),this.initReplayState(),this.calculateBoardSize(),this.createBoard();const m=vt.getFontSize("28px","20px"),S=vt.getY(20,15);this.add.text(y/2,S,"📼 对局回放",{fontSize:m,fontStyle:"bold",color:"#00ff88"}).setOrigin(.5);const x=vt.getY(55,40),h=vt.getFontSize("16px","12px");this.stepText=this.add.text(y/2,x,"",{fontSize:h,color:"#00ffff"}).setOrigin(.5),this.createPlayerPanel(),this.createControls(),this.updateDisplay()}calculateBoardSize(){const{width:y,height:n}=this.cameras.main,m=this.replayData?.gameState;if(!m?.config)return;this.rows=m.config.rows,this.cols=m.config.cols;const S=vt.getSize(80,55),x=vt.getSize(55,40),h=vt.getButtonReservedHeight(x),d=vt.getSize(24,16),t=vt.getSize(60,40),e=h+d+t+vt.getSize(15,10),l=vt.getSize(10,8),i=y-l*2,s=n-S-e,r=Math.floor(i/this.cols),o=Math.floor(s/this.rows);this.tileSize=Math.min(r,o);const a=vt.getSize(70,50),u=vt.getSize(30,25);this.tileSize=Math.max(u,Math.min(a,this.tileSize));const f=this.cols*this.tileSize,v=this.rows*this.tileSize;this.boardOffsetX=(y-f)/2,this.boardOffsetY=S+(s-v)/2,console.log(`棋盘计算: 可用空间=${i}x${s}, 格子尺寸=${this.tileSize}, 棋盘尺寸=${f}x${v}`)}initReplayState(){const y=this.replayData?.gameState;if(!y){console.error("回放数据无效"),this.scene.start("MenuScene");return}this.board=y.board.map(n=>n.map(m=>({...m}))),this.players=y.players.map(n=>({...n})),this.currentTurnIndex=0,this.totalTurnCount=0}createBoard(){const{width:y,height:n}=this.cameras.main;if(!(!this.rows||!this.cols)){this.add.rectangle(this.boardOffsetX+this.cols*this.tileSize/2,this.boardOffsetY+this.rows*this.tileSize/2,this.cols*this.tileSize+4,this.rows*this.tileSize+4,1710638).setStrokeStyle(2,4871528),this.boardContainer=this.add.container(this.boardOffsetX,this.boardOffsetY);for(let m=0;m<this.rows;m++)for(let S=0;S<this.cols;S++){const x=S*this.tileSize,h=m*this.tileSize,d=this.add.rectangle(x+this.tileSize/2,h+this.tileSize/2,this.tileSize-2,this.tileSize-2,4871528).setStrokeStyle(1,7438486).setInteractive({useHandCursor:!0});d.setData("gridX",S),d.setData("gridY",m),d.on("pointerdown",()=>this.showCellInfo(S,m)),d.on("pointerover",()=>{this.isPlaying||d.setStrokeStyle(2,65416)}),d.on("pointerout",()=>{d.setStrokeStyle(1,7438486)}),this.boardContainer.add(d)}}}showCellInfo(y,n){if(this.isPlaying)return;const m=this.board[n]?.[y];if(!m)return;this.infoPopup&&(this.infoPopup.destroy(),this.infoPopup=null);const{width:S,height:x}=this.cameras.main,h=this.boardOffsetX+y*this.tileSize+this.tileSize/2,d=this.boardOffsetY+n*this.tileSize+this.tileSize/2;this.infoPopup=this.add.container(h,d);let t="",e="",l=2963272,i=4871528;if(m.revealed)switch(m.type){case $t.BOMB:t="💣 炸弹",e="这是一个炸弹格子",l=8330525,i=15680580;break;case $t.ITEM:t="🎁 道具",e={medkit:"医疗包 💊",time_bomb:"定时炸弹 💣",poison:"毒药 ☠️",shield:"护盾 🛡️",good_card:"好人卡 🃏",magnifier:"放大镜 🔍",dagger:"飞刀 🗡️",resurrection:"复活甲 👼",lightning:"雷击 ⚡",chest:"宝箱 🎁",curse:"诅咒 👻"}[m.itemType]||"未知道具",l=1332013,i=2278750;break;case $t.EMPTY:t=m.bombCount>0?`数字 ${m.bombCount}`:"安全格",e=m.bombCount>0?`周围有 ${m.bombCount} 个炸弹`:"周围没有炸弹",l=1981023,i=3900150;break}else{const c=`${y}-${n}`;if(this.previewedCells.has(c)){this.previewedCells.delete(c),this.updateBoard();return}switch(this.previewedCells.set(c,{...m}),m.type){case $t.BOMB:t="💣 炸弹",e="点击再次隐藏",l=8330525,i=15680580;break;case $t.ITEM:t="🎁 道具",e={medkit:"医疗包 💊",time_bomb:"定时炸弹 💣",poison:"毒药 ☠️",shield:"护盾 🛡️",good_card:"好人卡 🃏",magnifier:"放大镜 🔍",dagger:"飞刀 🗡️",resurrection:"复活甲 👼",lightning:"雷击 ⚡",chest:"宝箱 🎁",curse:"诅咒 👻"}[m.itemType]||"未知道具",l=1332013,i=2278750;break;case $t.EMPTY:t=m.bombCount>0?`数字 ${m.bombCount}`:"安全格",e="点击再次隐藏",l=1981023,i=3900150;break;default:t="❓ 未知",e="点击再次隐藏",l=3621201,i=7041664}this.updateBoard()}const s=160,r=80,o=this.add.rectangle(0,0,s,r,l,.95).setStrokeStyle(2,i),a=this.add.text(0,-20,t,{fontSize:"18px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),u=this.add.text(0,10,e,{fontSize:"14px",color:"#e2e8f0",wordWrap:{width:s-20}}).setOrigin(.5),f=this.add.rectangle(s/2-15,-r/2+15,24,24,16729156).setInteractive({useHandCursor:!0}),v=this.add.text(s/2-15,-r/2+15,"✕",{fontSize:"16px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);f.on("pointerdown",()=>{this.infoPopup.destroy(),this.infoPopup=null}),f.on("pointerover",()=>f.setFillStyle(16737894)),f.on("pointerout",()=>f.setFillStyle(16729156)),this.infoPopup.add([o,a,u,f,v]),this.infoPopup.setDepth(1e3),this.input.once("pointerdown",c=>{this.infoPopup&&(this.infoPopup.getBounds().contains(c.x,c.y)||(this.infoPopup.destroy(),this.infoPopup=null))}),this.time.delayedCall(2e3,()=>{this.infoPopup&&(this.infoPopup.destroy(),this.infoPopup=null)})}createPlayerPanel(){const{width:y,height:n}=this.cameras.main,m=vt.getSize(55,40),S=vt.getButtonReservedHeight(m),x=vt.getSize(24,16),h=vt.getSize(45,30),d=vt.getSize(8,5),t=n-S-x-d-h/2,e=this.players.length,l=vt.getSize(15,10),i=y-l*2,s=Math.min(vt.getSize(120,80),Math.floor(i/e));this.playerContainers=[];const r=vt.getFontSize("18px","14px"),o=vt.getFontSize("16px","12px"),a=s*e,u=(y-a)/2+s/2;this.players.forEach((f,v)=>{const c=u+v*s,g=this.add.rectangle(c,t,s-vt.getSize(10,6),h,4871528).setStrokeStyle(2,7438486).setDepth(10),p=t-h*.15-vt.getSize(8,5),T=this.add.text(c,p,f.name,{fontSize:r,fontStyle:"bold",color:"#ffffff"}).setOrigin(.5).setDepth(10),C=t+vt.getSize(5,3),M=this.add.text(c,C,"❤️".repeat(Math.max(0,f.hp)),{fontSize:o}).setOrigin(.5).setDepth(10);this.playerContainers.push({bg:g,name:T,hp:M,player:f})})}createControls(){const{width:y,height:n}=this.cameras.main,m=vt.getSize(55,40),S=vt.getButtonReservedHeight(m),x=n-S/2,h=4,d=vt.getSize(20,15),t=vt.getSize(10,6),e=(h-1)*t,l=y-d*2,i=Math.floor((l-e)/h),s=Math.min(vt.getSize(160,80),i),r=vt.getSize(55,40),o=s*h+e,a=(y-o)/2+s/2;console.log(`按钮布局: 可用宽度=${l}, 按钮宽度=${s}, 间隙=${t}, 总宽度=${o}`);const u=vt.getSize(24,16),f=n-S-u/2-5;this.createProgressBar(y,f),this.createButton(a,x,"⏮",()=>this.prevStep(),s,r),this.playButton=this.createButton(a+s+t,x,"▶",()=>this.togglePlay(),s,r),this.playButtonText=this.playButton.getData("textObject"),this.createButton(a+(s+t)*2,x,"⏭",()=>this.nextStep(),s,r),this.createButton(a+(s+t)*3,x,"✕",()=>this.goBack(),s,r)}createButton(y,n,m,S,x=200,h=88){const d=vt.getFontSize("24px","18px"),t=this.add.rectangle(y,n,x,h,4886754).setStrokeStyle(vt.getSize(3,2),3504829).setInteractive({useHandCursor:!0}),e=this.add.text(y,n,m,{fontSize:d,fontStyle:"bold",color:"#ffffff"}).setOrigin(.5);return t.setData("textObject",e),t.on("pointerover",()=>{t.setFillStyle(5939186),t.setScale(1.05)}),t.on("pointerout",()=>{t.setFillStyle(4886754),t.setScale(1)}),t.on("pointerdown",S),t}createProgressBar(y,n){const m=y-vt.getSize(60,30),S=vt.getSize(24,16);this.progressBg=this.add.rectangle(y/2,n,m,S,2963272).setStrokeStyle(vt.getSize(3,2),4871528).setDepth(1),this.progressBar=this.add.rectangle(vt.getSize(30,15),n,0,S-6,65416).setOrigin(0,.5).setDepth(2),this.progressBg.setInteractive({useHandCursor:!0}),this.progressBg.on("pointerdown",(x,h)=>{const d=h/m,t=Math.floor(d*this.replayData.actions.length);this.jumpToStep(t)})}togglePlay(){this.isPlaying=!this.isPlaying,this.isPlaying?(this.previewedCells.clear(),this.updateBoard(),this.playButtonText.setText("⏸️ 暂停"),this.playLoop()):(this.playButtonText.setText("▶️ 播放"),this.playTimer&&(this.playTimer.remove(),this.playTimer=null))}playLoop(){if(!this.isPlaying||this.currentStep>=this.replayData.actions.length){this.isPlaying=!1,this.playButtonText.setText("▶️ 播放");return}this.nextStep(),this.playTimer=this.time.delayedCall(this.playSpeed,()=>{this.playLoop()})}prevStep(){this.currentStep>0&&(this.currentStep--,this.rebuildStateToStep(this.currentStep),this.updateDisplay())}nextStep(){this.currentStep<this.replayData.actions.length&&(this.applyAction(this.replayData.actions[this.currentStep]),this.currentStep++,this.updateDisplay())}jumpToStep(y){y=Math.max(0,Math.min(y,this.replayData.actions.length)),this.rebuildStateToStep(y),this.currentStep=y,this.updateDisplay()}rebuildStateToStep(y){const n=this.replayData.gameState;this.board=n.board.map(m=>m.map(S=>({...S}))),this.players=n.players.map(m=>({...m}));for(let m=0;m<y;m++)this.applyAction(this.replayData.actions[m])}applyAction(y){switch(y.type){case te.CELL_CLICK:this.applyCellClick(y);break;case te.ITEM_USE:this.applyItemUse(y);break;case te.PLAYER_DAMAGE:this.applyPlayerDamage(y);break;case te.PLAYER_DEATH:this.applyPlayerDeath(y);break;case te.PLAYER_REVIVE:this.applyPlayerRevive(y);break;case te.TURN_CHANGE:this.applyTurnChange(y);break}}applyCellClick(y){const{x:n,y:m,cellType:S,itemType:x,bombCount:h}=y.data,d=this.board[m][n];d.revealed=!0,d.type=S,d.itemType=x,d.bombCount=h}applyItemUse(y){}applyPlayerDamage(y){const n=this.players.find(m=>m.id===y.playerId);n&&y.data.damage&&(n.hp=Math.max(0,n.hp-y.data.damage))}applyPlayerDeath(y){const n=this.players.find(m=>m.id===y.playerId);n&&(n.isDead=!0,n.hp=0)}applyPlayerRevive(y){const n=this.players.find(m=>m.id===y.playerId);n&&(n.isDead=!1,n.hp=2)}applyTurnChange(y){const n=this.players.findIndex(m=>m.id===y.playerId);n>=0&&(this.currentTurnIndex=n),this.totalTurnCount=y.data.turnCount}updateDisplay(){this.updateBoard(),this.updatePlayers(),this.updateProgress(),this.updateStepText()}updateBoard(){if(!this.rows||!this.cols||!this.board||!this.boardContainer)return;for(let m=0;m<this.rows;m++)for(let S=0;S<this.cols;S++){const x=m*this.cols+S,h=this.boardContainer.getAt(x);if(!h)continue;const d=this.board[m]?.[S];if(!d)continue;const t=`${S}-${m}`,e=this.previewedCells.has(t);if(d.revealed||e){switch(d.type){case $t.BOMB:h.setFillStyle(16729156);break;case $t.ITEM:h.setFillStyle(2278750);break;case $t.EMPTY:h.setFillStyle(7438486);break}e&&!d.revealed?h.setStrokeStyle(2,16776960):h.setStrokeStyle(1,7438486)}else h.setFillStyle(4871528),h.setStrokeStyle(1,7438486)}this.cellContentContainer&&this.cellContentContainer.destroy(),this.cellContentContainer=this.add.container(this.boardOffsetX,this.boardOffsetY);const y=Math.max(20,Math.floor(this.tileSize*.5)),n=Math.max(24,Math.floor(this.tileSize*.6));for(let m=0;m<this.rows;m++)for(let S=0;S<this.cols;S++){const x=this.board[m]?.[S];if(!x)continue;const h=`${S}-${m}`,d=this.previewedCells.has(h);if(!x.revealed&&!d)continue;const t=S*this.tileSize+this.tileSize/2,e=m*this.tileSize+this.tileSize/2;if(x.type===$t.BOMB)this.cellContentContainer.add(this.add.text(t,e,"💣",{fontSize:`${n}px`}).setOrigin(.5));else if(x.type===$t.EMPTY&&x.bombCount>0){const l={1:"#3b82f6",2:"#22c55e",3:"#ef4444",4:"#8b5cf6",5:"#a16207",6:"#06b6d4",7:"#000000",8:"#6b7280"};this.cellContentContainer.add(this.add.text(t,e,x.bombCount.toString(),{fontSize:`${y}px`,fontStyle:"bold",color:l[x.bombCount]||"#000000"}).setOrigin(.5))}else if(x.type===$t.ITEM&&x.itemType){const i={medkit:"💊",time_bomb:"💣",poison:"☠️",shield:"🛡️",good_card:"🃏",magnifier:"🔍",dagger:"🗡️",resurrection:"👼",lightning:"⚡",chest:"🎁",curse:"👻"}[x.itemType]||"🎁";this.cellContentContainer.add(this.add.text(t,e,i,{fontSize:`${n}px`}).setOrigin(.5))}}}updatePlayers(){this.playerContainers.forEach((y,n)=>{const m=this.players[n];m&&(y.hp.setText("❤️".repeat(Math.max(0,m.hp))),y.name.setColor(m.isDead?"#ff4444":"#ffffff"),n===this.currentTurnIndex&&!m.isDead?y.bg.setStrokeStyle(3,65416):y.bg.setStrokeStyle(1,7438486))})}updateProgress(){const y=this.replayData.actions.length,n=y>0?this.currentStep/y:0,m=this.cameras.main.width-44;this.progressBar.width=n*m}updateStepText(){const y=this.replayData.actions[this.currentStep-1];let n=`步骤 ${this.currentStep} / ${this.replayData.actions.length}`;if(y){const m=this.players.find(x=>x.id===y.playerId),S=m?m.name:"";switch(y.type){case te.CELL_CLICK:n+=` - ${S} 点击 (${y.data.x+1}, ${y.data.y+1})`;break;case te.ITEM_USE:n+=` - ${S} 使用道具`;break;case te.PLAYER_DAMAGE:n+=` - ${S} 受到 ${y.data.damage} 点伤害`;break;case te.PLAYER_DEATH:n+=` - ${S} 被淘汰`;break;case te.PLAYER_REVIVE:n+=` - ${S} 复活`;break;case te.TURN_CHANGE:n+=` - ${S} 的回合`;break}}this.stepText.setText(n)}goBack(){this.scene.start("MenuScene")}}class sr extends ce{constructor(){super({key:"HelpScene"})}create(){const{width:y,height:n}=this.cameras.main;this.add.rectangle(y/2,n/2,y,n,1710638),this.add.rectangle(y/2,40,y,80,1710638).setDepth(10),this.add.text(y/2,40,"游戏说明",{fontSize:"48px",fontStyle:"bold",color:"#00ff88",stroke:"#000",strokeThickness:6}).setOrigin(.5).setDepth(11);const m=this.add.rectangle(70,40,100,50,4871528).setStrokeStyle(2,7438486).setInteractive({useHandCursor:!0}).setDepth(11);this.add.text(70,40,"返回",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5).setDepth(11),m.on("pointerover",()=>{m.setFillStyle(6710886),m.setScale(1.05)}),m.on("pointerout",()=>{m.setFillStyle(4871528),m.setScale(1)}),m.on("pointerdown",()=>{this.scene.start("MenuScene")}),this.contentContainer=this.add.container(0,90);const S=this.createScrollableContent(y),x=n-130;new Phaser.Geom.Rectangle(0,90,y,x),this.minScrollY=90,this.maxScrollY=Math.min(90,n-S-40),this.isDragging=!1,this.lastPointerY=0;const h=S>n-130;if(console.log("Content height:",S,"Visible height:",n-130,"Needs scroll:",h),console.log("Min Y:",this.minScrollY,"Max Y:",this.maxScrollY),h){this.input.on("pointerdown",t=>{t.y>80&&(this.isDragging=!0,this.lastPointerY=t.y)}),this.input.on("pointermove",t=>{if(this.isDragging){const e=t.y-this.lastPointerY;let l=this.contentContainer.y+e;l=Phaser.Math.Clamp(l,this.maxScrollY,this.minScrollY),this.contentContainer.y=l,this.lastPointerY=t.y}}),this.input.on("pointerup",()=>{this.isDragging=!1}),this.input.on("pointerupoutside",()=>{this.isDragging=!1}),this.add.rectangle(y/2,n-25,y,50,1710638).setDepth(10);const d=this.add.text(y/2,n-25,"↑↓ 滑动查看更多",{fontSize:"20px",color:"#666666"}).setOrigin(.5).setDepth(11);this.tweens.add({targets:d,alpha:.3,duration:1e3,yoyo:!0,repeat:-1})}}createScrollableContent(y){let n=0;const m=(e,l,i,s)=>{const r=this.add.text(e,l,i,s);return this.contentContainer.add(r),r};return m(25,n,"基础玩法",{fontSize:"36px",fontStyle:"bold",color:"#ffcc00"}),n+=50,["• 点击格子翻开,数字表示周围8格内的炸弹数量","• 翻到炸弹会扣除生命值","• 翻到道具格可获得随机道具","• 多人回合制,每人每回合翻一个格子","• 生命值归零则淘汰,最后存活者获胜","• 非自己回合时可点击格子插旗标记"].forEach(e=>{m(35,n,e,{fontSize:"28px",color:"#e2e8f0",wordWrap:{width:y-70}}),n+=45}),n+=30,m(25,n,"角色介绍",{fontSize:"36px",fontStyle:"bold",color:"#ffcc00"}),n+=55,[{emoji:"🐱",name:"猫",desc:"可爱:伤害强制为1"},{emoji:"🐔",name:"鸡",desc:"应激:受伤概率获得防御道具"},{emoji:"🐕",name:"狗",desc:"嗅觉:每N个回合可以获得道具提示"},{emoji:"🐘",name:"大象",desc:"皮厚:HP为5,不能使用道具"},{emoji:"🦛",name:"河马",desc:"复活:淘汰时33%概率复活"},{emoji:"🐵",name:"猴子",desc:"采摘:概率获得香蕉回血1点,每局限制2次"},{emoji:"🦥",name:"树懒",desc:"迟钝:对炸弹伤害减少1点,免疫毒药效果"},{emoji:"🐯",name:"老虎",desc:"猛击:飞刀变AOE,伤害为2"}].forEach(e=>{m(35,n,`${e.emoji} ${e.name}`,{fontSize:"32px",fontStyle:"bold",color:"#00ff88"}),m(180,n+5,e.desc,{fontSize:"26px",color:"#a0aec0",wordWrap:{width:y-200}}),n+=55}),n+=30,m(25,n,"道具介绍",{fontSize:"36px",fontStyle:"bold",color:"#ffcc00"}),n+=55,[{emoji:"💊",name:"医疗包",desc:"恢复生命值"},{emoji:"💣",name:"定时炸弹",desc:"3回合后对目标造成伤害"},{emoji:"☠️",name:"毒药",desc:"下毒,每行动2次后损失1点生命值"},{emoji:"🛡️",name:"护盾",desc:"抵挡下一次伤害"},{emoji:"🃏",name:"好人卡",desc:"目标下回合跳过行动"},{emoji:"🔍",name:"放大镜",desc:"查看随机格子的信息"},{emoji:"🗡️",name:"飞刀",desc:"对所有其他玩家造成1点伤害"},{emoji:"👼",name:"复活甲",desc:"淘汰时自动复活"},{emoji:"⚡",name:"闪电",desc:"对其他所有目标造成1点伤害"},{emoji:"🎁",name:"宝箱",desc:"随机获得一个道具"},{emoji:"👻",name:"诅咒",desc:"目标受到伤害翻倍"}].forEach(e=>{m(35,n,`${e.emoji} ${e.name}`,{fontSize:"30px",fontStyle:"bold",color:"#4a90e2"}),m(200,n+3,e.desc,{fontSize:"26px",color:"#a0aec0"}),n+=50}),n+=30,m(25,n,"操作提示",{fontSize:"36px",fontStyle:"bold",color:"#ffcc00"}),n+=50,["• 自己回合:点击未翻开的格子翻开","• 非自己回合:点击格子插旗/取消旗","• 道具使用:道具会自动使用","• 查看日志:点击右上角日志按钮"].forEach(e=>{m(35,n,e,{fontSize:"28px",color:"#e2e8f0"}),n+=45}),n+=30,m(25,n,"音频资源",{fontSize:"36px",fontStyle:"bold",color:"#ffcc00"}),n+=50,["🎵 背景音乐:vespidaze-upbeat-rpg-battle","🎵 紧张音乐:williamhector-cinematic-action","💥 爆炸音效:dennish18-small-explosion","💥 大爆炸:freesound_community-explosion","⚠️ 警告音效:freesound_community-warning-sound","🖱️ 点击音效:denielcz-click","🔪 刀剑音效:freesound_community-knife-slice","🗡️ 格挡音效:voicebosch-sword-block","💊 治愈音效:freesound_crunchpixstudio-heal-sound","✨ 神圣音效:u_1cwn0vj1yq-mystical-chime","🎁 获得道具:u_czn2yg55gn-item-found","📖 翻书音效:jacqtydus-oh-dn","😿 失败音效:ribhavagrawal-you-lose-game-sound","🎉 胜利音效:bugradio-he-is-good","🐱 猫叫声:dragon-studio-cute-cat-meow","🐕 狗叫声:dragon-studio-dog-bark","🐕 狗嚎叫:dragon-studio-old-dog-howling","🐘 大象叫:freesound_community-elephant-trumpets","🐯 老虎吼:dffdv-tiger-roar-loudly","🐵 猴子叫:koiroylers-monkey-jungle","🦥 树懒声:roaming_sloth-sloth-inspired","🦛 河马叫:u_tococonino969-hungry-hippos","⚡ 雷声:u_vrs223ln83-loud-thunder","🧪 毒药声:ldc96-acid_spell_cast_bubble_poison","📜 宝箱声:benkirb-shine"].forEach(e=>{m(35,n,`• ${e}`,{fontSize:"22px",color:"#a0aec0",wordWrap:{width:y-70}}),n+=35}),n+=30,m(25,n,"制作人员",{fontSize:"36px",fontStyle:"bold",color:"#ffcc00"}),n+=55,m(35,n,"🎮 游戏设计:柯大鸭",{fontSize:"28px",color:"#e2e8f0"}),n+=45,m(35,n,"💻 程序开发:柯大鸭",{fontSize:"28px",color:"#e2e8f0"}),n+=45,m(35,n,"🎨 美术设计:阳光果粒橙",{fontSize:"28px",color:"#e2e8f0"}),n+=45,m(35,n,"🎵 音效资源:Pixabay / Freesound",{fontSize:"28px",color:"#e2e8f0"}),n+=45,m(35,n,"🔧 游戏引擎:Phaser 4",{fontSize:"28px",color:"#e2e8f0"}),n+=60,m(25,n,"特别感谢",{fontSize:"36px",fontStyle:"bold",color:"#ffcc00"}),n+=50,m(35,n,"感谢所有测试玩家的宝贵建议!",{fontSize:"28px",color:"#e2e8f0"}),n+=45,m(35,n,"感谢开源社区的贡献者们!",{fontSize:"28px",color:"#e2e8f0"}),n+=60,m(y/2,n,"© 2025-2026 柯大鸭 版权所有",{fontSize:"24px",color:"#888888"}).setOrigin(.5),n+50}}const Ae=new URLSearchParams(window.location.search),Yi=Ae.get("game_token")||"",nr=decodeURIComponent(Ae.get("nakama_server")||""),rr=Ae.get("nakama_key")||"defaultkey",ar="wss://game.1024tool.vip";function di(E){if(!E)return null;try{const y=new URL(E);return y.protocol==="wss:"||y.protocol==="ws:"?y:null}catch{return null}}function or(E){return!E||E==="localhost"||E==="127.0.0.1"||E==="0.0.0.0"||E==="yourdomain.com"||E.includes("oicp.vip")}function hr(){const{protocol:E,hostname:y,port:n}=window.location;if(!y)return"";const m=E==="https:"?"wss:":"ws:",x=n&&n!==(E==="https:"?"443":"80")?`:${n}`:"";return`${m}//${y}${x}`}const Vi=di(nr),Xi=di(hr()),os=di(ar),lr=!or(window.location.hostname)&&!!os,hs=lr?os.toString():Vi?Vi.toString():Xi?Xi.toString():"",ur=!!di(hs),_t={isWebView:!!Yi&&ur,gameToken:Yi,nakamaServer:hs,nakamaKey:rr,mode:Ae.get("mode"),gameMode:Ae.get("game_type")||"minesweeper",nickname:decodeURIComponent(Ae.get("nickname")||"")||null,uid:Ae.get("uid")||null,matchId:Ae.get("match_id")||null,isSpectator:Ae.get("is_spectator")==="1",scene:Ae.get("scene")||null};class fr extends ce{constructor(){super({key:"LoadingScene"})}preload(){const{width:y,height:n}=this.cameras.main;this.add.rectangle(y/2,n/2,y,n,1712172),this.add.text(y/2,n/3,"💣 扫雷对战",{fontSize:"48px",fontStyle:"bold",color:"#00ff88"}).setOrigin(.5),this.loadText=this.add.text(y/2,n/2,"正在加载资源...",{fontSize:"24px",color:"#e2e8f0"}).setOrigin(.5);const m=400,S=20,x=(y-m)/2,h=n/2+50;this.progressBarBg=this.add.rectangle(y/2,h,m,S,2963272).setStrokeStyle(2,4871528),this.progressBar=this.add.rectangle(x,h,0,S,65416).setOrigin(0,.5),this.progressText=this.add.text(y/2,h+40,"0%",{fontSize:"20px",color:"#a0aec0"}).setOrigin(.5),this.load.on("progress",d=>{const t=Math.floor(d*100);this.progressBar.width=m*d,this.progressText.setText(`${t}%`)}),this.load.on("complete",()=>{console.log("=== 所有资源加载完成 ==="),this.loadText.setText("加载完成!"),this.progressBar.width=m,this.progressText.setText("100%"),this.time.delayedCall(500,()=>{_t.isWebView?_t.gameMode==="minesweeper_free"?this.scene.start("RoomScene"):this.scene.start("LobbyScene",{mode:_t.gameMode}):this.scene.start("MenuScene")})}),this.load.on("loaderror",d=>{console.error("=== 资源加载失败 ==="),console.error("Key:",d.key),console.error("Type:",d.type),console.error("URL:",d.url),console.error("Error:",d?.error),this.loadText.setText(`加载失败: ${d.key}`),this.progressBar.setFillStyle(16729156)}),this.load.on("filecomplete",(d,t,e)=>{console.log(`✓ 资源加载完成: ${d} (${t})`)}),this.loadGameAssets()}loadGameAssets(){this.loadAudioAssets(jn()),this.loadAudioAssets(rs()),this.loadImageAssets(kn()),this.loadImageAssets(qn()),this.loadSpineAssets(as())}loadAudioAssets(y){for(const[n,m]of Object.entries(y))this.load.audio(n,m)}loadImageAssets(y){for(const[n,m]of Object.entries(y))this.load.image(n,m)}loadSpineAssets(y){for(const n of y){this.load.spineJson(n.jsonKey,n.jsonPath);for(const m of n.textures)this.load.image(m.key,m.path);this.load.spineAtlas(n.atlasKey,n.atlasPath)}}create(){}}class dr extends ce{constructor(){super({key:"SpineV4TestScene"})}preload(){this.add.text(this.cameras.main.width/2,this.cameras.main.height/2,"Loading Spine Assets...",{fontSize:"32px",color:"#ffffff"}).setOrigin(.5),this.load.spine("spineboy","assets/spine/spineboy-pro.json","assets/spine/spineboy-pma.atlas",!0)}create(){this.add.rectangle(0,0,this.cameras.main.width,this.cameras.main.height,2960708).setOrigin(0),this.add.text(this.cameras.main.width/2,80,"Spine Phaser V4 Demo",{fontSize:"48px",color:"#00ff00",fontStyle:"bold"}).setOrigin(.5);const n=this.add.spine(400,600,"spineboy");n.setMix("walk","run",.2),n.setMix("run","walk",.2),n.setMix("walk","jump",.1),n.setMix("jump","walk",.1),n.animationState.setAnimation(0,"walk",!0),n.setScale(.5),n.setInteractive(),n.on("pointerdown",()=>{const x=n.animationState.tracks[0].animation.name;let h="run";x==="walk"?h="run":x==="run"?h="jump":x==="jump"&&(h="walk"),n.animationState.setAnimation(0,h,h==="walk"||h==="run"),this.showFeedback(`切换到: ${h}`)}),this.add.text(this.cameras.main.width/2,this.cameras.main.height-100,`点击 Spine 角色切换动画
|
||
(使用 spine-phaser-v4 API)`,{fontSize:"24px",color:"#ffff00",align:"center",backgroundColor:"#000000",padding:{x:20,y:10}}).setOrigin(.5),this.statusText=this.add.text(this.cameras.main.width/2,this.cameras.main.height-200,"当前动画: walk",{fontSize:"28px",color:"#00ffff",backgroundColor:"#000000",padding:{x:15,y:8}}),this.statusText.setOrigin(.5),n.animationState.addListener({start:x=>{console.log("Animation started:",x.animation.name)},end:x=>{console.log("Animation ended:",x.animation.name)},complete:x=>{console.log("Animation completed:",x.animation.name)},event:(x,h)=>{console.log("Animation event:",h.data.name)}}),this.events.on("update",()=>{if(n.animationState.tracks[0]){const x=n.animationState.tracks[0].animation.name;this.statusText.setText(`当前动画: ${x}`)}}),this.input.keyboard.on("keydown-SPACE",()=>{n.animationState.setAnimation(0,"jump",!1),n.animationState.addAnimation(0,"walk",!0,0)});const S=this.add.text(50,50,"← 返回",{fontSize:"24px",color:"#ffffff",backgroundColor:"#0066cc",padding:{x:20,y:10}});S.setInteractive({useHandCursor:!0}),S.on("pointerdown",()=>{this.scene.start("MenuScene")})}showFeedback(y){const n=this.add.text(this.cameras.main.width/2,this.cameras.main.height/2-150,y,{fontSize:"32px",color:"#ffff00",backgroundColor:"#000000",padding:{x:20,y:10}});n.setOrigin(.5),this.tweens.add({targets:n,alpha:0,duration:1500,onComplete:()=>n.destroy()})}}class vr extends ce{constructor(){super({key:"SpineTestScene"})}preload(){this.loadResources()}loadResources(){const y=rs();for(const[m,S]of Object.entries(y))this.load.audio(m,S);const n=as();for(const m of n){this.load.spineJson(m.jsonKey,m.jsonPath);for(const S of m.textures)this.load.image(S.key,S.path);this.load.spineAtlas(m.atlasKey,m.atlasPath)}}create(){const{width:y,height:n}=this.cameras.main;this.add.rectangle(y/2,n/2,y,n,1710638),this.add.text(y/2,40,"Spine动画测试",{fontSize:"36px",fontStyle:"bold",color:"#00ff88"}).setOrigin(.5),this.add.text(y/2,80,"点击下方按钮播放对应动画",{fontSize:"18px",color:"#718096"}).setOrigin(.5),this.currentSpine=null,this.currentAnimName=null,this.animationList=Jn(),this.createAnimationButtons(),this.createControlButtons(),this.createBackButton(),this.statusText=this.add.text(y/2,n-80,"请选择要播放的动画",{fontSize:"20px",color:"#00ffff",backgroundColor:"#000000",padding:{x:15,y:8}}).setOrigin(.5)}createAnimationButtons(){const{width:y}=this.cameras.main,n=60,m=130,S=100,x=40,h=4,d=15,t=10;this.animationList.forEach((e,l)=>{const i=l%h,s=Math.floor(l/h),r=n+i*(S+d)+S/2,o=m+s*(x+t)+x/2,a=this.add.rectangle(r,o,S,x,2963272).setStrokeStyle(2,4871528).setInteractive({useHandCursor:!0});this.add.text(r,o,e.displayName,{fontSize:"16px",color:"#ffffff"}).setOrigin(.5),a.on("pointerover",()=>{a.setFillStyle(4871528)}),a.on("pointerout",()=>{a.setFillStyle(2963272)}),a.on("pointerdown",()=>{this.playAnimation(e)})})}createControlButtons(){const{width:y,height:n}=this.cameras.main,m=n-140;this.createButton(y/2-150,m,"暂停/继续",()=>{this.currentSpine&&(this.currentSpine.animationState.timeScale===0?(this.currentSpine.animationState.timeScale=1,this.showFeedback("动画继续")):(this.currentSpine.animationState.timeScale=0,this.showFeedback("动画暂停")))}),this.createButton(y/2,m,"重新播放",()=>{this.currentSpine&&this.currentAnimName&&(this.currentSpine.animationState.setAnimation(0,this.currentAnimName,!1),this.showFeedback("重新播放"))}),this.createButton(y/2+150,m,"循环播放",()=>{this.currentSpine&&this.currentAnimName&&(this.currentSpine.animationState.setAnimation(0,this.currentAnimName,!0),this.showFeedback("循环播放"))})}createButton(y,n,m,S){const x=this.add.rectangle(y,n,120,36,3355494).setStrokeStyle(2,5592490).setInteractive({useHandCursor:!0});return this.add.text(y,n,m,{fontSize:"16px",color:"#ffffff"}).setOrigin(.5),x.on("pointerover",()=>x.setFillStyle(4474026)),x.on("pointerout",()=>x.setFillStyle(3355494)),x.on("pointerdown",S),x}createBackButton(){this.add.text(50,50,"← 返回",{fontSize:"24px",color:"#ffffff",backgroundColor:"#0066cc",padding:{x:20,y:10}}).setInteractive({useHandCursor:!0}).on("pointerdown",()=>{this.scene.start("MenuScene")})}playAnimation(y){const{width:n,height:m}=this.cameras.main;this.currentSpine&&(this.currentSpine.destroy(),this.currentSpine=null);try{if(!this.cache.json.exists(y.jsonKey)){this.showFeedback(`${y.displayName}: JSON未加载`);return}if(!this.cache.text.exists(y.atlasKey)){this.showFeedback(`${y.displayName}: Atlas未加载`);return}const S=this.add.spine(n/2,m/2-50,y.jsonKey,y.atlasKey),x=S.animationStateData.skeletonData.animations;if(x.length===0){this.showFeedback(`${y.displayName}: 无动画数据`),S.destroy();return}const h=x[0].name;S.animationState.setAnimation(0,h,!1);const d=y.scale||1;S.setScale(d,d),console.log(`播放动画: ${y.displayName}, scale: ${d}, 实际scale: ${S.scaleX}, ${S.scaleY}`);const e=li[y.name]?.soundKey;e&&this.cache.audio.exists(e)&&this.sound.play(e,{volume:.5}),this.currentSpine=S,this.currentAnimName=h,this.statusText.setText(`${y.displayName}: ${h}`),S.animationState.addListener({complete:()=>{this.showFeedback("动画播放完成")}}),this.showFeedback(`播放: ${y.displayName}`)}catch(S){this.showFeedback(`${y.displayName}: 加载失败`),console.error(`播放${y.displayName}失败:`,S)}}showFeedback(y){const{width:n,height:m}=this.cameras.main,S=this.add.text(n/2,m/2-200,y,{fontSize:"28px",color:"#ffff00",backgroundColor:"#000000",padding:{x:20,y:10}}).setOrigin(.5);this.tweens.add({targets:S,alpha:0,y:S.y-50,duration:1e3,onComplete:()=>S.destroy()})}}const ae={GAME_START:1,STATE_UPDATE:2,PLAYER_CLICK:3,GAME_EVENT:5,GAME_END:6,REQUEST_STATE:100},ee={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",RECONNECTING:"reconnecting"};class cr{constructor(){$(this,"_nextCid",1);$(this,"_pendingRequests",{});this.serverUrl=null,this.serverKey="defaultkey",this.useSSL=!0,this.host=null,this.port="443",this.heartbeatInterval=15e3,this.heartbeatTimer=null,this.ws=null,this.connectionState=ee.DISCONNECTED,this.session=null,this.gameToken=null,this.externalUserId=null,this.customId=null,this.matchId=null,this.matchToken=null,this.listeners={onmatchmakermatched:null,onmatchdata:null,onmatchpresence:null,ondisconnect:null,onerror:null,onconnectionstatechange:null},this.messageQueue=[],this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.reconnectDelay=2e3}initClient(y,n="defaultkey"){this.serverUrl=y,this.serverKey=n;try{const m=new URL(y);this.useSSL=m.protocol==="wss:",this.host=m.hostname,this.port=m.port||(this.useSSL?"443":"80")}catch(m){console.error("[NakamaManager] Invalid server URL:",m)}console.log("[NakamaManager] Client initialized:",{serverUrl:this.serverUrl,host:this.host,port:this.port,useSSL:this.useSSL})}normalizeUsername(y){return y?String(y).normalize("NFKC").replace(/[^\w.-]/g,"_").replace(/_+/g,"_").replace(/^[_\-.]+|[_\-.]+$/g,"").slice(0,32):""}isValidCustomId(y){if(!y)return!1;const n=new TextEncoder().encode(String(y)).length;return n>=6&&n<=128}buildCustomId(y){if(!y&&y!==0)return null;const n=String(y).trim();if(!n)return null;if(this.isValidCustomId(n))return n;const m=n.startsWith("user_")?n:`user_${n}`;return this.isValidCustomId(m)?m:null}async authenticateWithGameToken(y,n=null,m=null){this.gameToken=y,this.externalUserId=n||n===0?String(n):null;let S=this.buildCustomId(n);this.externalUserId&&S&&S!==this.externalUserId&&console.log("[NakamaManager] Using derived custom ID for external user ID:",{externalUserId:this.externalUserId,customId:S}),this.externalUserId&&!S&&console.warn("[NakamaManager] externalUserId cannot be converted to a valid custom ID, falling back to token-derived ID:",this.externalUserId),S||(S=this.extractUserIdFromToken(y)),S||(S=localStorage.getItem("nakama_custom_id"),S||(S=`game_${Date.now()}_${Math.random().toString(36).substring(2,9)}`,localStorage.setItem("nakama_custom_id",S))),this.customId=S;const x=this.normalizeUsername(m),d=`${this.useSSL?"https":"http"}://${this.host}:${this.port}/v2/account/authenticate/custom?create=true`,t=btoa(`${this.serverKey}:`);console.log("[NakamaManager] Authenticating with customId:",S,"username:",x||"(omitted)");try{const e=async(i="")=>fetch(`${d}${i?`&username=${encodeURIComponent(i)}`:""}`,{method:"POST",headers:{Authorization:`Basic ${t}`,"Content-Type":"application/json"},body:JSON.stringify({id:S})});let l=await e(x);if(!l.ok){const i=await l.text(),s=l.status===409&&i.includes("Username is already in use");if(x&&s)console.warn("[NakamaManager] Username already in use, retrying without username"),l=await e("");else throw new Error(`Authentication failed: ${l.status} - ${i}`)}if(!l.ok){const i=await l.text();throw new Error(`Authentication failed: ${l.status} - ${i}`)}if(this.session=await l.json(),!this.session.user_id&&this.session.token)try{const i=JSON.parse(this.base64UrlDecode(this.session.token.split(".")[1]));this.session.user_id=i.uid||i.user_id}catch{}return console.log("[NakamaManager] Authentication successful:",{userId:this.session.user_id}),this.session}catch(e){throw console.error("[NakamaManager] Authentication error:",e),e}}base64UrlDecode(y){let n=y.replace(/-/g,"+").replace(/_/g,"/");const m=n.length%4;return m===2?n+="==":m===3&&(n+="="),atob(n)}extractUserIdFromToken(y){if(!y)return null;try{const n=y.split(".");if(n.length!==3)return null;const m=JSON.parse(this.base64UrlDecode(n[1]));console.log("[NakamaManager] game_token payload:",m);const S=m.user_id||m.uid||m.sub;return S?`user_${S}`:null}catch(n){return console.warn("[NakamaManager] Failed to extract user_id from game_token:",n),`token_${y.substring(0,32)}`}}setListeners(y){this.listeners={...this.listeners,...y},console.log("[NakamaManager] Listeners configured")}async connect(){if(this.connectionState===ee.CONNECTED){console.log("[NakamaManager] Already connected");return}if(this.connectionState===ee.CONNECTING){console.log("[NakamaManager] Connection already in progress");return}if(!this.session||!this.session.token)throw new Error("No valid session. Please authenticate first.");this.setConnectionState(ee.CONNECTING);const n=`${this.useSSL?"wss":"ws"}://${this.host}:${this.port}/ws?lang=en&status=true&token=${this.session.token}`;return console.log("[NakamaManager] Connecting to:",n),new Promise((m,S)=>{try{this.ws=new WebSocket(n),this.ws.onopen=()=>{console.log("[NakamaManager] WebSocket connected"),this.setConnectionState(ee.CONNECTED),this.reconnectAttempts=0,this.startHeartbeat(),this.flushMessageQueue(),m()},this.ws.onmessage=x=>{this.handleMessage(x.data)},this.ws.onclose=x=>{console.error("[NakamaManager] WebSocket CLOSED! code:",x.code,"reason:",x.reason,"wasClean:",x.wasClean),this.setConnectionState(ee.DISCONNECTED),this.stopHeartbeat(),this.listeners.ondisconnect&&this.listeners.ondisconnect(x)},this.ws.onerror=x=>{console.error("[NakamaManager] WebSocket error:",x),this.setConnectionState(ee.DISCONNECTED),this.listeners.onerror&&this.listeners.onerror(x),S(x)}}catch(x){this.setConnectionState(ee.DISCONNECTED),S(x)}})}disconnect(){this.stopHeartbeat(),this.ws&&(this.ws.close(),this.ws=null),this.setConnectionState(ee.DISCONNECTED),this.matchId=null,this.matchToken=null,console.log("[NakamaManager] Disconnected")}setConnectionState(y){const n=this.connectionState;this.connectionState=y,n!==y&&this.listeners.onconnectionstatechange&&this.listeners.onconnectionstatechange(y,n)}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.sendHeartbeat()},this.heartbeatInterval)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}sendHeartbeat(){}flushMessageQueue(){for(;this.messageQueue.length>0&&this.ws&&this.ws.readyState===WebSocket.OPEN;){const y=this.messageQueue.shift();this.ws.send(y)}}sendMessage(y){const n=JSON.stringify(y);this.ws&&this.ws.readyState===WebSocket.OPEN?this.ws.send(n):this.messageQueue.push(n)}_sendWithCid(y,n=1e4){const m=String(this._nextCid++);return y.cid=m,new Promise((S,x)=>{const h=setTimeout(()=>{delete this._pendingRequests[m],x(new Error("Request timeout"))},n);this._pendingRequests[m]={resolve:S,reject:x,timer:h},this.sendMessage(y)})}handleMessage(y){if(y)try{const n=JSON.parse(y);if(console.log("[NakamaManager] Received message:",n),n.cid&&this._pendingRequests[n.cid]){const m=this._pendingRequests[n.cid];delete this._pendingRequests[n.cid],clearTimeout(m.timer),n.error?m.reject(new Error(n.error.message||"Server error")):m.resolve(n);return}if(n.error){const m=new Error(n.error.message||"Server error");console.error("[NakamaManager] Server error:",n.error),this.listeners.onerror&&this.listeners.onerror(m);return}if(n.matchmaker_ticket&&(console.log("[NakamaManager] Matchmaker ticket:",n.matchmaker_ticket.ticket),this.currentMatchmakerTicket=n.matchmaker_ticket.ticket),n.matchmaker_matched&&(console.log("[NakamaManager] Matchmaker matched:",n.matchmaker_matched),this.currentMatchmakerTicket=null,this.listeners.onmatchmakermatched&&this.listeners.onmatchmakermatched(n.matchmaker_matched)),n.match_data){const m=n.match_data;if(m.data)try{const S=Uint8Array.from(atob(m.data),h=>h.charCodeAt(0)),x=new TextDecoder("utf-8").decode(S);m.parsedData=JSON.parse(x)}catch(S){console.warn("[NakamaManager] Failed to decode match data:",S),m.parsedData=m.data}this.listeners.onmatchdata&&this.listeners.onmatchdata(m)}n.match_presence_event&&(console.log("[NakamaManager] Match presence event:",n.match_presence_event),this.listeners.onmatchpresence&&this.listeners.onmatchpresence(n.match_presence_event)),n.match&&(console.log("[NakamaManager] Match joined:",n.match),this.matchId=n.match.match_id)}catch(n){console.error("[NakamaManager] Failed to parse message:",n,y)}}async findMatch(y=2,n=4,m="minesweeper"){const S=this._parseGameTypeFromToken(this.gameToken)||m;console.log("[NakamaManager] Finding match:",{minCount:y,maxCount:n,resolvedGameType:S}),this._matchmakerCancelled=!1;const x=()=>{const h={matchmaker_add:{min_count:y,max_count:n,query:`+properties.game_type:${S}`,string_properties:{game_token:this.gameToken||"",game_type:S}}};this.externalUserId&&(h.matchmaker_add.string_properties.uid=this.externalUserId),this.customId&&(h.matchmaker_add.string_properties.custom_id=this.customId),console.log("[NakamaManager] Sending matchmaker_add"),this.sendMessage(h)};return x(),new Promise((h,d)=>{const t=setTimeout(()=>{this._matchmakerCancelled=!0,clearInterval(e),d(new Error("Matchmaker timeout"))},6e4),e=setInterval(()=>{if(this._matchmakerCancelled){clearInterval(e);return}console.log("[NakamaManager] Re-submitting matchmaker ticket (server expires after 5s)"),x()},6e3),l=this.listeners.onmatchmakermatched;this.listeners.onmatchmakermatched=i=>{this._matchmakerCancelled=!0,clearTimeout(t),clearInterval(e),this.listeners.onmatchmakermatched=l,l&&l(i),h(i)}})}cancelMatchmaking(){if(this._matchmakerCancelled=!0,this.currentMatchmakerTicket){const y={matchmaker_remove:{ticket:this.currentMatchmakerTicket}};this.sendMessage(y),this.currentMatchmakerTicket=null}console.log("[NakamaManager] Matchmaking cancelled")}async joinMatch(y,n=null){console.log("[NakamaManager] Joining match:",y,"with token:",!!n);const m={match_join:{metadata:{game_token:this.gameToken}}};this.externalUserId&&(m.match_join.metadata.uid=this.externalUserId),this.customId&&(m.match_join.metadata.custom_id=this.customId),n?m.match_join.token=n:m.match_join.match_id=y;const S=await this._sendWithCid(m);if(S.match)return this.matchId=S.match.match_id,console.log("[NakamaManager] Joined match:",this.matchId),S.match;throw new Error("Join match failed: no match in response")}leaveMatch(){if(!this.matchId)return;const y={match_leave:{match_id:this.matchId}};this.sendMessage(y),this.matchId=null,this.matchToken=null,console.log("[NakamaManager] Left match")}sendMatchState(y,n,m){const S=typeof m=="string"?m:JSON.stringify(m),x=btoa(unescape(encodeURIComponent(S))),h={match_data_send:{match_id:y,op_code:n.toString(),data:x}};console.log("[NakamaManager] Sending match state:",{opCode:n,data:m}),this.sendMessage(h)}async rpc(y,n={}){const m=await this._sendWithCid({rpc:{id:y,payload:JSON.stringify(n)}});if(m.rpc&&m.rpc.payload)try{return JSON.parse(m.rpc.payload)}catch{return m.rpc.payload}return m}async listMatches(y="minesweeper"){if(!this.session||!this.session.token)throw new Error("No valid session");const S=`${`${this.useSSL?"https":"http"}://${this.host}:${this.port}`}/v2/match?limit=20&authoritative=true&label=${encodeURIComponent(y)}`,x=await fetch(S,{headers:{Authorization:`Bearer ${this.session.token}`}});if(!x.ok)throw new Error(`List matches failed: ${x.status}`);return(await x.json()).matches||[]}async joinChat(y,n=1,m=!1,S=!1){const x={channel_join:{target:y,type:n,persistence:m,hidden:S}};return this.sendMessage(x),console.log("[NakamaManager] Joining chat:",y),{target:y,type:n}}get isConnected(){return this.connectionState===ee.CONNECTED}get isConnecting(){return this.connectionState===ee.CONNECTING}get userId(){return this.session?.user_id||null}_parseGameTypeFromToken(y){try{if(!y)return null;const n=y.split(".");if(n.length!==3)return null;const m=n[1].replace(/-/g,"+").replace(/_/g,"/"),S=m+"==".slice(0,(4-m.length%4)%4),x=Uint8Array.from(atob(S),d=>d.charCodeAt(0));return JSON.parse(new TextDecoder().decode(x)).game_type||null}catch{return null}}}const Dt=new cr,ls="https://game.1024tool.vip";function us(){if(typeof window>"u")return!0;const{hostname:E}=window.location;return E==="localhost"||E==="127.0.0.1"||E==="0.0.0.0"||E.includes("oicp.vip")}const pr=us()?"/api/app":`${ls}/api/app`;let mr={baseUrl:pr};function gr(){const E=localStorage.getItem("user_info");if(E)try{const y=JSON.parse(E);return y.token||y.authToken||null}catch(y){console.error("[API] Failed to parse user info:",y)}return null}async function xr(E){const y=gr(),n={"Content-Type":"application/json",...E.headers};y&&(n.Authorization=`Bearer ${y}`);const m=E.url.startsWith("http")?E.url:`${mr.baseUrl}${E.url}`;try{const S=await fetch(m,{method:E.method||"GET",headers:n,body:E.data?JSON.stringify(E.data):null});if(!S.ok){let h=`HTTP Error: ${S.status}`;try{const d=await S.json();h=d.message||d.error||h}catch{}throw new Error(h)}return await S.json()}catch(S){throw console.error("[API] Request failed:",S),S}}async function yr(E="minesweeper"){return await xr({url:"/games/enter",method:"POST",data:{game_code:E}})}async function Tr(){const E=us()?"/api/internal/game/minesweeper/config":`${ls}/api/internal/game/minesweeper/config`;try{const y=await fetch(E,{headers:{"X-Internal-Key":"bindbox-internal-secret-2024"}});if(!y.ok){const m=await y.text();throw new Error(`getGameConfig failed: ${y.status} - ${m}`)}return await y.json()}catch(y){throw console.error("[API] getGameConfig failed:",y),y}}function Sr(E){localStorage.setItem("user_info",JSON.stringify(E))}function Cr(){const E=localStorage.getItem("user_info");if(E)try{return JSON.parse(E)}catch{return null}return null}function Er(){return{id:`user_${Date.now()}_${Math.random().toString(36).substring(2,8)}`,name:`玩家${Math.floor(Math.random()*1e4)}`,token:"mock_token_"+Math.random().toString(36).substring(2)}}const xi=typeof wx<"u"&&wx.miniProgram,Je={isInWx:xi,postMessage(E){if(xi)try{wx.miniProgram.postMessage({data:E})}catch(y){console.warn("[WxBridge] postMessage failed:",y)}},navigateBack(){if(xi)try{wx.miniProgram.navigateBack()}catch(E){console.warn("[WxBridge] navigateBack failed:",E)}},notifyGameOver(E){this.postMessage({action:"game_over",...E})},notifyPlayAgain(){this.postMessage({action:"playAgain"}),this.navigateBack()},notifyClose(){this.postMessage({action:"close"}),this.navigateBack()}},ie={IDLE:"idle",MATCHING:"matching",MATCHED:"matched",ERROR:"error"};class Ar extends ce{constructor(){super({key:"LobbyScene"})}init(y){this.matchPlayerCount=4,this.matchState=ie.IDLE,this.matchingTime=0,this.matchingTimer=null,this.userInfo=Cr(),_t.isWebView?(this.gameMode=_t.gameMode,this.gameToken=_t.gameToken,this.nakamaServer=_t.nakamaServer,this.nakamaKey=_t.nakamaKey,this.stableUserId=_t.uid||null,this.pendingMatchId=_t.matchId||null,this.isSpectator=_t.isSpectator||!1,this.pendingScene=_t.scene||null):(this.gameMode=y.mode||"minesweeper",this.autoMatch=y.autoMatch||!1,this.gameToken=null,this.nakamaServer=null,this.nakamaKey=null,this.stableUserId=null,this.pendingMatchId=null,this.isSpectator=!1,this.pendingScene=null)}create(){const{width:y,height:n}=this.cameras.main;this._drawBackground(y,n),this._drawTitle(y),this._drawInfoCards(y,n),this._drawMatchArea(y,n),this.configReadyPromise=this.fetchGameConfig(),this.userInfo||(this.userInfo=Er(),Sr(this.userInfo)),this.initGame()}getAuthExternalUserId(){return _t.isWebView?this.stableUserId||null:this.userInfo?this.userInfo.id:null}getAuthNickname(){return _t.isWebView?_t.nickname||null:this.userInfo?this.userInfo.name:null}_drawBackground(y,n){this.add.rectangle(y/2,n/2,y,n,527380);const m=this.add.graphics();m.fillStyle(1715786,.6);const S=40;for(let d=S;d<y;d+=S)for(let t=S;t<n;t+=S)m.fillCircle(d,t,1);const x=this.add.graphics();x.fillGradientStyle(863562,863562,527380,527380,.9,.9,0,0),x.fillRect(0,0,y,120);const h=this.add.graphics();h.lineStyle(2,1985146,.5),h.beginPath(),h.moveTo(0,40),h.lineTo(0,0),h.lineTo(40,0),h.strokePath(),h.beginPath(),h.moveTo(y-40,0),h.lineTo(y,0),h.lineTo(y,40),h.strokePath(),h.beginPath(),h.moveTo(0,n-40),h.lineTo(0,n),h.lineTo(40,n),h.strokePath(),h.beginPath(),h.moveTo(y-40,n),h.lineTo(y,n),h.lineTo(y,n-40),h.strokePath()}_drawTitle(y){const n=this.add.graphics();n.fillStyle(859182,1),n.fillRoundedRect(8,8,136,36,8),n.lineStyle(1,1981020,1),n.strokeRoundedRect(8,8,136,36,8),this.connectionDot=this.add.circle(26,26,7,4473924),this.connectionText=this.add.text(40,26,"未连接",{fontSize:"22px",color:"#666666"}).setOrigin(0,.5)}_drawInfoCards(y,n){const x=(y-24-16)/3,h=80,d=[3718648,10980346,16498468],t=["当前模式","匹配人数","在线玩家"],e=this.gameMode==="minesweeper"?"正式场":"练习场",l=this.gameMode==="minesweeper"?"🏆":"🎯";this.infoValues=[`${l} ${e}`,`${this.matchPlayerCount} 人`,"-- 人"],this._infoCardTexts=[];for(let i=0;i<3;i++){const s=12+(x+8)*i,r=this.add.graphics();r.fillStyle(859182,1),r.fillRoundedRect(s,52,x,h,8),r.fillStyle(d[i],1),r.fillRoundedRect(s,52,x,4,{tl:8,tr:8,bl:0,br:0}),r.lineStyle(1,d[i],.3),r.strokeRoundedRect(s,52,x,h,8),this.add.text(s+10,62,t[i],{fontSize:"22px",color:"#6b8aaa"});const o=this.add.text(s+10,92,this.infoValues[i],{fontSize:"28px",fontStyle:"bold",color:`#${d[i].toString(16).padStart(6,"0")}`});this._infoCardTexts.push(o)}this.playerCountText={setText:i=>{this._infoCardTexts[1].setText(i.replace("匹配人数: ","").replace("人"," 人"))}},this._onlineCountText=this._infoCardTexts[2]}_drawMatchArea(y,n){const S=n-140-8,x=140+S,h=this.add.graphics();h.fillStyle(726050,1),h.fillRoundedRect(12,140,y-24,S,12),h.lineStyle(1,1981020,1),h.strokeRoundedRect(12,140,y-24,S,12),h.fillStyle(991296,1),h.fillRoundedRect(12,140,y-24,44,{tl:12,tr:12,bl:0,br:0}),this.add.text(y/2,162,"匹 配 中 心",{fontSize:"24px",color:"#4a7aaa",letterSpacing:4}).setOrigin(.5);const d=this.add.text(y-20,162,"🏆",{fontSize:"34px"}).setOrigin(1,.5).setInteractive({useHandCursor:!0});d.on("pointerover",()=>d.setAlpha(.8)),d.on("pointerout",()=>d.setAlpha(1)),d.on("pointerdown",()=>{this.scene.launch("LeaderboardScene",{gameType:this.gameMode}),this.scene.pause()});const t=184,l=t+160;this.matchStatusText=this.add.text(y/2,t+36,"准备就绪,点击下方按钮开始匹配",{fontSize:"26px",fontStyle:"bold",color:"#c0d8f0"}).setOrigin(.5),this.matchingTimeText=this.add.text(y/2,t+100,"",{fontSize:"64px",fontStyle:"bold",color:"#38bdf8"}).setOrigin(.5),this.matchSpinner=this.add.text(y/2,t+100,"",{fontSize:"48px"}).setOrigin(.5).setVisible(!1);const i=this.add.graphics();i.lineStyle(1,1981020,.6),i.beginPath(),i.moveTo(24,l),i.lineTo(y-24,l),i.strokePath();const s=80,r=x-s/2-14,o=y-56,a=l+6,f=r-s/2-10-a,v=this.add.graphics();v.fillStyle(396826,1),v.fillRoundedRect(24,a,y-48,f,6),v.lineStyle(1,1385781,1),v.strokeRoundedRect(24,a,y-48,f,6),v.fillStyle(1985146,1),v.fillRoundedRect(24,a,3,f,{tl:6,tr:0,bl:6,br:0}),this.add.text(36,a+10,"› 通讯日志",{fontSize:"22px",color:"#3a6a9a",letterSpacing:1}),this.logText=this.add.text(36,a+38,"",{fontSize:"24px",color:"#4a7aaa",wordWrap:{width:y-76},lineSpacing:8}),this.logs=[],this._matchBtnGraphics=this.add.graphics(),this._drawMatchButton(y/2,r,o,s,!1),this._matchBtnHitArea=this.add.rectangle(y/2,r,o,s,0,0).setInteractive({useHandCursor:!0}),this.matchButtonText=this.add.text(y/2,r,"🚀 开始匹配",{fontSize:"36px",fontStyle:"bold",color:"#7ab8f5"}).setOrigin(.5),this._matchBtnHitArea.on("pointerover",()=>{(this.matchState===ie.IDLE||this.matchState===ie.ERROR)&&(this._matchBtnGraphics.clear(),this._drawMatchButton(y/2,r,o,s,!0))}),this._matchBtnHitArea.on("pointerout",()=>{this._matchBtnGraphics.clear(),this._drawMatchButton(y/2,r,o,s,!1)}),this._matchBtnHitArea.on("pointerdown",()=>this.toggleMatchmaking()),this._btnW=o,this._btnH=s,this._btnY=r,this._btnCX=y/2}_drawMatchButton(y,n,m,S,x){this.matchState===ie.MATCHING?(this._matchBtnGraphics.fillStyle(8330525,1),this._matchBtnGraphics.fillRoundedRect(y-m/2,n-S/2,m,S,12),this._matchBtnGraphics.lineStyle(2,15680580,1),this._matchBtnGraphics.strokeRoundedRect(y-m/2,n-S/2,m,S,12)):this.matchState===ie.ERROR?(this._matchBtnGraphics.fillStyle(7877903,1),this._matchBtnGraphics.fillRoundedRect(y-m/2,n-S/2,m,S,12),this._matchBtnGraphics.lineStyle(2,16096779,1),this._matchBtnGraphics.strokeRoundedRect(y-m/2,n-S/2,m,S,12)):this.matchState===ie.MATCHED?(this._matchBtnGraphics.fillStyle(1332013,1),this._matchBtnGraphics.fillRoundedRect(y-m/2,n-S/2,m,S,12),this._matchBtnGraphics.lineStyle(2,2278750,1),this._matchBtnGraphics.strokeRoundedRect(y-m/2,n-S/2,m,S,12)):(this._matchBtnGraphics.fillStyle(x?1985146:994640,1),this._matchBtnGraphics.fillRoundedRect(y-m/2,n-S/2,m,S,12),this._matchBtnGraphics.lineStyle(2,x?6333946:3718648,1),this._matchBtnGraphics.strokeRoundedRect(y-m/2,n-S/2,m,S,12))}_drawLogArea(y,n){}_drawBackButton(y,n){}createConnectionIndicator(y,n){}updateConnectionState(y){const n={[ee.DISCONNECTED]:6710886,[ee.CONNECTING]:16763904,[ee.CONNECTED]:65416,[ee.RECONNECTING]:16750916},m={[ee.DISCONNECTED]:"未连接",[ee.CONNECTING]:"连接中...",[ee.CONNECTED]:"已连接",[ee.RECONNECTING]:"重连中..."};this.connectionDot&&this.connectionDot.setFillStyle(n[y]||6710886),this.connectionText&&this.connectionText.setText(m[y]||"未知")}createMatchPanel(y,n){}createBackButton(y,n){}createLogPanel(y,n){}addLog(y,n="info"){const m=new Date().toLocaleTimeString("zh-CN",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),S=28,x=y.length>S?y.slice(0,S)+"…":y;this.logs.push(`${m} ${x}`),this.logs.length>12&&this.logs.shift(),this.logText&&this.logText.setText(this.logs.join(`
|
||
`))}async fetchGameConfig(){try{const y=await Tr();this.matchPlayerCount=y.match_player_count||4,this.playerCountText.setText(`匹配人数: ${this.matchPlayerCount}人`),this.addLog(`游戏配置: ${this.matchPlayerCount}人匹配`)}catch(y){this.matchPlayerCount=4,this.playerCountText.setText(`匹配人数: ${this.matchPlayerCount}人`),this.addLog(`获取配置失败,回退${this.matchPlayerCount}人: ${y.message}`,"warn")}}async initGame(){this.addLog("正在初始化游戏...");try{if(!_t.isWebView){const n=await yr(this.gameMode);this.gameToken=n.game_token,this.nakamaServer=n.nakama_server,this.nakamaKey=n.nakama_key}this.addLog(`服务器: ${this.nakamaServer}`),Dt.initClient(this.nakamaServer,this.nakamaKey),this.setupNakamaListeners(),this.addLog("正在认证...");const y=await Dt.authenticateWithGameToken(this.gameToken,this.getAuthExternalUserId(),this.getAuthNickname());if(this.addLog(`认证成功,用户ID: ${y.user_id}`),this.addLog("正在连接服务器..."),await Dt.connect(),this.addLog("连接成功!"),this.updateConnectionState(ee.CONNECTED),Dt.joinChat("minesweeper_lobby",1,!0,!1).catch(()=>{}),this.startOnlineCountPolling(),!this.isSpectator&&!this.pendingMatchId&&!this.pendingScene&&!this.autoMatch&&await this.findMyMatch())return;if(this.pendingMatchId){this.addLog(`加入指定房间: ${this.pendingMatchId}`);try{await Dt.joinMatch(this.pendingMatchId),this.addLog("已加入房间,等待游戏状态..."),setTimeout(()=>{Dt.sendMatchState(Dt.matchId,ae.REQUEST_STATE,{action:"getState"})},500)}catch(n){this.addLog(`加入房间失败: ${n.message}`)}return}if(this.pendingScene==="room-list"){this.addLog("正在获取房间列表..."),this.showRoomList();return}if(this.pendingScene==="leaderboard"){this.scene.launch("LeaderboardScene",{gameType:this.gameMode}),this.scene.pause();return}if(this.autoMatch){this.addLog("自动开始匹配..."),this.startMatchmaking();return}}catch(y){this.addLog(`初始化失败: ${y.message}`),this.matchState=ie.ERROR,this.updateMatchUI()}}async showRoomList(){const{width:y,height:n}=this.cameras.main;this.matchStatusText.setText("房间列表"),this._matchBtnGraphics&&this._matchBtnGraphics.setVisible(!1),this._matchBtnHitArea&&this._matchBtnHitArea.setVisible(!1),this.matchButtonText&&this.matchButtonText.setVisible(!1),this.matchingTimeText&&this.matchingTimeText.setVisible(!1),this.add.rectangle(y/2,n/2-50,560,320,1714746,.95).setStrokeStyle(2,65416),this.add.text(y/2,n/2-195,"当前对战房间",{fontSize:"20px",fontStyle:"bold",color:"#00ff88"}).setOrigin(.5);const m=this.add.text(y/2,n/2-50,"正在加载...",{fontSize:"18px",color:"#a0aec0"}).setOrigin(.5);try{const S=await Dt.listMatches(this.gameMode);if(m.destroy(),!S||S.length===0){this.add.text(y/2,n/2-50,"暂无进行中的对战",{fontSize:"18px",color:"#718096"}).setOrigin(.5);return}S.slice(0,5).forEach((x,h)=>{const d=n/2-150+h*52,t=`房间 ${h+1} 玩家: ${x.size}/${x.max_size||4}`,e=this.add.rectangle(y/2,d,520,44,2963272).setStrokeStyle(1,4871528).setInteractive({useHandCursor:!0});this.add.text(y/2-200,d,t,{fontSize:"16px",color:"#e2e8f0"}).setOrigin(0,.5),this.add.text(y/2+160,d,"围观",{fontSize:"16px",color:"#00ff88",backgroundColor:"#1a3a2a",padding:{x:10,y:4}}).setOrigin(.5).setInteractive({useHandCursor:!0}).on("pointerdown",()=>{this.pendingMatchId=x.match_id,this.isSpectator=!0,Dt.joinMatch(x.match_id).then(()=>{setTimeout(()=>{Dt.sendMatchState(Dt.matchId,ae.REQUEST_STATE,{action:"getState"})},500)}).catch(i=>this.addLog(`围观失败: ${i.message}`))})})}catch(S){m.setText(`获取房间列表失败: ${S.message}`)}}setupNakamaListeners(){Dt.setListeners({onconnectionstatechange:y=>{this.updateConnectionState(y)},onmatchmakermatched:async y=>{this.addLog(`匹配成功!房间ID: ${y.match_id}`),this.matchState=ie.MATCHED,this.updateMatchUI();const n=3;for(let m=0;m<n;m++)try{await Dt.joinMatch(y.match_id,y.token),this.addLog("已加入房间,等待游戏开始..."),setTimeout(()=>{Dt.sendMatchState(Dt.matchId,ae.REQUEST_STATE,{action:"getState"})},500);return}catch(S){this.addLog(`加入房间失败(${m+1}/${n}): ${S.message}`),m<n-1&&await new Promise(x=>setTimeout(x,1e3))}this.matchState=ie.ERROR,this.updateMatchUI()},onmatchdata:y=>{this.handleMatchData(y)},onmatchpresence:y=>{y.joins&&y.joins.length>0&&y.joins.forEach(n=>{this.addLog(`${n.username||"玩家"} 加入了房间`)}),y.leaves&&y.leaves.length>0&&y.leaves.forEach(n=>{this.addLog(`${n.username||"玩家"} 离开了房间`)})},ondisconnect:async y=>{this.addLog("连接断开,尝试重连..."),this.updateConnectionState(ee.DISCONNECTED);try{await this.reconnect()}catch(n){this.addLog(`重连失败: ${n.message}`)}},onerror:y=>{this.addLog(`连接错误: ${y}`),console.error("[LobbyScene] Error details:",y)}})}handleMatchData(y){const n=parseInt(y.op_code),m=y.parsedData;switch(console.log("[LobbyScene] Match data:",{opCode:n,data:m}),n){case ae.GAME_START:this.addLog("游戏开始!正在进入战场..."),this.startOnlineBattle(m);break;case ae.STATE_UPDATE:m&&m.gameStarted&&this.startOnlineBattle(m);break;default:console.log("[LobbyScene] Unhandled opcode:",n)}}startOnlineBattle(y){this.stopMatchingTimer(),this.stopOnlineCountPolling(),this.scene.start("OnlineBattleScene",{matchId:Dt.matchId,gameToken:this.gameToken,nakamaServer:this.nakamaServer,nakamaKey:this.nakamaKey,userId:Dt.userId,initialState:y,gameMode:this.gameMode,isSpectator:this.isSpectator})}async reconnect(){try{Dt.session||await Dt.authenticateWithGameToken(this.gameToken,this.getAuthExternalUserId()),await Dt.connect(),this.currentMatchId&&(await Dt.joinMatch(this.currentMatchId),Dt.sendMatchState(Dt.matchId,ae.REQUEST_STATE,{action:"getState"})),this.addLog("重连成功!")}catch(y){throw y}}toggleMatchmaking(){switch(this.matchState){case ie.IDLE:case ie.ERROR:this.startMatchmaking();break;case ie.MATCHING:this.cancelMatchmaking();break}}async startMatchmaking(){if(!Dt.isConnected){this.addLog("未连接服务器,正在重连...");try{await Dt.connect()}catch(y){this.addLog(`连接失败: ${y.message}`);return}}this.configReadyPromise&&await this.configReadyPromise,this.matchState=ie.MATCHING,this.matchingTime=0,this.updateMatchUI(),this.startMatchingTimer(),this.addLog(`开始匹配 (${this.matchPlayerCount}人场)...`);try{await Dt.findMatch(this.matchPlayerCount,this.matchPlayerCount,this.gameMode)}catch(y){this.addLog(`匹配失败: ${y.message}`),this.matchState=ie.ERROR,this.stopMatchingTimer(),this.updateMatchUI()}}cancelMatchmaking(){Dt.cancelMatchmaking(),this.matchState=ie.IDLE,this.stopMatchingTimer(),this.updateMatchUI(),this.addLog("已取消匹配")}startMatchingTimer(){this.matchingTimer=this.time.addEvent({delay:1e3,callback:()=>{this.matchingTime++,this.updateMatchingTimeDisplay()},loop:!0})}stopMatchingTimer(){this.matchingTimer&&(this.matchingTimer.remove(),this.matchingTimer=null),this.matchingTime=0,this.matchingTimeText.setText("")}updateMatchingTimeDisplay(){const y=Math.floor(this.matchingTime/60),n=this.matchingTime%60;this.matchingTimeText.setText(`${y.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`),this.matchingTime<=30?this.matchStatusText.setText("正在寻找对手..."):this.matchingTime<=60?this.matchStatusText.setText("继续搜索中..."):this.matchStatusText.setText("等待时间较长,建议重试")}updateMatchUI(){switch(this._matchBtnGraphics&&(this._matchBtnGraphics.clear(),this._drawMatchButton(this._btnCX,this._btnY,this._btnW,this._btnH,!1)),this.matchState){case ie.IDLE:this.matchButtonText&&this.matchButtonText.setText("🚀 开始匹配").setColor("#7ab8f5"),this.matchStatusText&&this.matchStatusText.setText("准备就绪,点击下方按钮开始匹配");break;case ie.MATCHING:this.matchButtonText&&this.matchButtonText.setText("✖ 取消匹配").setColor("#fca5a5"),this.matchStatusText&&this.matchStatusText.setText("正在寻找对手...");break;case ie.MATCHED:this.matchButtonText&&this.matchButtonText.setText("✓ 匹配成功").setColor("#86efac"),this.matchStatusText&&this.matchStatusText.setText("匹配成功!正在进入游戏...");break;case ie.ERROR:this.matchButtonText&&this.matchButtonText.setText("⚠ 点击重试").setColor("#fcd34d"),this.matchStatusText&&this.matchStatusText.setText("发生错误,请重试");break}}startOnlineCountPolling(){this.stopOnlineCountPolling(),this._pollOnlineCount(),this.onlineCountTimer=setInterval(()=>{this._pollOnlineCount()},5e3)}stopOnlineCountPolling(){this.onlineCountTimer&&(clearInterval(this.onlineCountTimer),this.onlineCountTimer=null)}async _pollOnlineCount(){try{const y=await Dt.rpc("get_online_count",{}),n=y?.online_count??y?.count;n!==void 0&&this._onlineCountText&&this._onlineCountText.setText(`${n} 人`)}catch{}}async findMyMatch(){try{const y=await Dt.rpc("find_my_match",{});if(y&&y.match_id)return this.addLog("发现进行中的对局,正在重新加入..."),await Dt.joinMatch(y.match_id),setTimeout(()=>{Dt.sendMatchState(Dt.matchId,ae.REQUEST_STATE,{action:"getState"})},500),!0}catch{}return!1}exitLobby(){this.matchState===ie.MATCHING&&Dt.cancelMatchmaking(),this.stopOnlineCountPolling(),Dt.disconnect(),_t.isWebView?Je.notifyClose():this.scene.start("MenuScene")}}const Wi={medkit:"💊",time_bomb:"💣",poison:"☠️",shield:"🛡️",good_card:"🃏",magnifier:"🔍",dagger:"🗡️",resurrection:"👼",lightning:"⚡",chest:"🎁",curse:"👻"},Mr={dog:"🐶",elephant:"🐘",tiger:"🐯",monkey:"🐵",sloth:"🦥",hippo:"🦛",cat:"🐱",chicken:"🐔"};class Rr extends ce{constructor(){super({key:"OnlineBattleScene"})}init(y){this.matchId=y.matchId,this.gameToken=y.gameToken,this.nakamaServer=y.nakamaServer,this.nakamaKey=y.nakamaKey,this.myUserId=y.userId,this.initialState=y.initialState,this.gameMode=y.gameMode||"minesweeper",this.gameState=null,this.isSpectator=y.isSpectator||!1,this.tileSize=70,this.boardOffsetX=0,this.boardOffsetY=220,this.cellTiles=[],this.cellTexts=[],this.revealedCells=new Set,this.playerInfoContainers=[],this.logMessages=[],this.playerMarks={},this.flaggedCells=new Set,this.currentSpineAnimation=null,this._gameOverHandled=!1,this._gameOverTimer=null,this._resultSceneLaunched=!1,this._inactivityTimer=null,this._lastDamageApplied={}}create(){const{width:y,height:n}=this.cameras.main;this.add.rectangle(y/2,n/2,y,n,1712172),this.initializeBGM(),this.createBattleUI(y,n),this.setupNakamaListeners(),this.initialState?this.handleGameState(this.initialState):Dt.matchId&&Dt.sendMatchState(Dt.matchId,ae.REQUEST_STATE,{action:"getState"}),this.setupInput()}createBattleUI(y,n){this.turnIndicator=this.add.rectangle(y/2,40,y-120,60,2963272).setStrokeStyle(2,4871528),this.turnText=this.add.text(y/2,40,"等待游戏开始...",{fontSize:"24px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5),this.createLogButton(50,40),this.createBGMButton(y-50,40),this.createPlayerPanel(20,110,y-40),this.boardContainer=this.add.container(0,this.boardOffsetY),this.createInlineLogPanel(y,n),this.createBottomBar(y,n),this.turnTimer=15,this.turnTimerText=this.add.text(y/2,75,"15",{fontSize:"28px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5).setVisible(!1)}createLogButton(y,n){const m=this.add.container(y,n),S=this.add.circle(0,0,28,2963272).setStrokeStyle(3,4871528).setInteractive({useHandCursor:!0}),x=this.add.text(0,0,"📚",{fontSize:"28px"}).setOrigin(.5);m.add([S,x]),S.on("pointerover",()=>{S.setFillStyle(4871528),S.setScale(1.1)}),S.on("pointerout",()=>{S.setFillStyle(2963272),S.setScale(1)}),S.on("pointerdown",()=>this.openLogScene())}openLogScene(){this.scene.stop("LogScene"),this.scene.launch("LogScene",{logMessages:this.logMessages,fromScene:"OnlineBattleScene"}),this.scene.pause()}createPlayerPanel(y,n,m){this.playerPanelBg=this.add.rectangle(y+m/2,n+90/2,m,90,2963272,.9).setStrokeStyle(2,4871528),this.playerPanelX=y,this.playerPanelY=n,this.playerPanelWidth=m,this.playerPanelHeight=90,this.playerInfoContainers=[]}createInlineLogPanel(y,n){const m=this.boardOffsetY+this.tileSize*10;this._buildInlineLogPanel(y,n,m)}repositionInlineLog(){if(!this.inlineLogTexts)return;const{width:y,height:n}=this.cameras.main,m=this.boardOffsetY+(this.gridSize||10)*this.tileSize;this._inlineLogBg&&this._inlineLogBg.destroy(),this.inlineLogTexts.forEach(S=>S.destroy()),this.inlineLogTexts=[],this._buildInlineLogPanel(y,n,m),this.updateInlineLog()}_buildInlineLogPanel(y,n,m){const S=n-120,x=Math.max(40,S-m-8),h=m+x/2+4;this.inlineLogPanel={x:y/2,y:h,width:y-20,height:x,maxLines:Math.max(1,Math.floor(x/22))},this._inlineLogBg=this.add.rectangle(y/2,h,y-20,x,1712172,.85).setStrokeStyle(1,2963272).setDepth(5),this.inlineLogTexts=[];for(let d=0;d<this.inlineLogPanel.maxLines;d++){const t=h-x/2+12+d*22,e=this.add.text(10,t,"",{fontSize:"18px",color:"#718096",wordWrap:{width:y-30}}).setDepth(10);this.inlineLogTexts.push(e)}}updateInlineLog(){if(!this.inlineLogTexts||!this.inlineLogPanel)return;const y=this.inlineLogPanel.maxLines,n=this.logMessages.slice(-y);this.inlineLogTexts.forEach((m,S)=>{const x=n[S]||"",h=S===n.length-1&&x;m.setText(x),m.setColor(h?"#ffffff":"#718096")})}createBottomBar(y,n){const S=n-60;this._bottomBarY=S,this._bottomBarH=120,this.add.rectangle(y/2,S,y,120,1975862).setStrokeStyle(2,3820124).setDepth(20),this.add.text(20,S-120/2+8,"道具栏",{fontSize:"20px",color:"#6b8aaa"}).setDepth(21),this.itemContainer=this.add.container(20,S+10).setDepth(22)}setupNakamaListeners(){Dt.setListeners({onmatchdata:y=>this.handleMatchData(y),onmatchpresence:y=>{y.joins&&y.joins.forEach(n=>this.addLog(`${n.username||"玩家"} 加入了房间`)),y.leaves&&y.leaves.forEach(n=>this.addLog(`${n.username||"玩家"} 离开了房间`))},ondisconnect:async()=>{this.addLog("连接断开,尝试重连...");try{await this.reconnect()}catch(y){this.addLog(`重连失败: ${y.message}`),this.showDisconnectOverlay()}}})}handleMatchData(y){const n=parseInt(y.op_code),m=y.parsedData;switch(console.log("[OnlineBattleScene] Match data:",{opCode:n,data:m}),n){case ae.GAME_START:this.handleGameState(m),this.addLog("游戏开始!");break;case ae.STATE_UPDATE:this.handleGameState(m);break;case ae.GAME_EVENT:this.handleGameEvent(m);break;case ae.GAME_END:this.handleGameEnd(m);break}this._resetInactivityTimer()}_resetInactivityTimer(){this._gameOverHandled||(this._inactivityTimer&&this._inactivityTimer.remove(),this._inactivityTimer=this.time.delayedCall(2e4,()=>{this._gameOverHandled||!Dt.isConnected||Dt.matchId&&Dt.sendMatchState(Dt.matchId,ae.REQUEST_STATE,{action:"getState"})}))}handleGameState(y){const n=this.gameState;if(this.gameState=y,!n&&y.grid&&this.createBoard(y.gridSize||8),y.grid&&this.updateBoard(y.grid),y.players){this._detectStateChanges(n?.players,y.players),this.updatePlayersDisplay(y.players,y.turnOrder),this.checkAndSwitchBGM(y.players),this.checkClientSideGameOver(y.players,y.turnOrder);const m=y.players[this.myUserId];m&&this.updateItemBar(m)}if(y.currentTurnIndex!==void 0&&y.turnOrder){const m=y.turnOrder[y.currentTurnIndex],S=y.players[m],x=m===this.myUserId,h=y.round||1;S&&(x?(this.turnText.setText(`第${h}回合 - 你的回合!`),this.turnText.setColor("#00ff88")):(this.turnText.setText(`第${h}回合 - ${this.getDisplayName(S,y.currentTurnIndex)}`),this.turnText.setColor("#ffffff")))}y.turnDuration&&(this.turnTimer=y.turnDuration,this.turnTimerText.setVisible(!0),this.startTurnTimer(y.serverTime,y.lastMoveTimestamp,y.turnDuration))}createBoard(y){this.gridSize=y,this.cellTiles=[],this.cellTexts=[],this.revealedCells=new Set,this.boardContainer.removeAll(!0);const{width:n}=this.cameras.main,m=y*this.tileSize,S=y*this.tileSize;this.boardOffsetX=(n-m)/2,this.boardContainer.setPosition(this.boardOffsetX,this.boardOffsetY);const x=this.add.rectangle(m/2,S/2,m+4,S+4,988448);if(this.boardContainer.add(x),this.textures.exists("background")){const h=this.add.image(m/2,S/2,"background").setDisplaySize(m,S);this.boardContainer.add(h)}for(let h=0;h<y*y;h++){const d=h%y*this.tileSize,t=Math.floor(h/y)*this.tileSize;let e;this.textures.exists("tile")?e=this.add.image(d+this.tileSize/2,t+this.tileSize/2,"tile").setDisplaySize(this.tileSize-2,this.tileSize-2):e=this.add.rectangle(d+this.tileSize/2,t+this.tileSize/2,this.tileSize-2,this.tileSize-2,4871528).setStrokeStyle(2,2963272),e.setInteractive().setData("index",h),this.boardContainer.add(e),this.cellTiles.push(e),this.cellTexts.push(null)}this.repositionInlineLog()}updateBoard(y){y.forEach((n,m)=>{const S=this.cellTiles[m];if(S)if(n.revealed){const x=!this.revealedCells.has(m);switch(x&&this.revealedCells.add(m),S.disableInteractive(),n.type){case"bomb":this.textures.exists("bomb")&&S.setTexture?(S.setTexture("bomb"),S.setDisplaySize(this.tileSize-4,this.tileSize-4)):(S.setFillStyle&&S.setFillStyle(16729156),this.setCellText(m,"💣",Math.floor(this.tileSize*.5)));break;case"item":S.setTexture&&this.textures.exists("tile")&&(S.setTexture("tile"),S.setDisplaySize(this.tileSize-2,this.tileSize-2));const h=Wi[n.itemId]||"🎁";this.setCellText(m,h,32);break;case"empty":S.setTexture&&this.textures.exists("tile")&&(S.setTexture("tile"),S.setDisplaySize(this.tileSize-2,this.tileSize-2)),S.setTint?S.setTint(7438486):S.setFillStyle&&S.setFillStyle(7438486),n.neighborBombs>0&&this.setCellText(m,n.neighborBombs.toString(),48,this.getNumberColor(n.neighborBombs));break}if(x){const h=S.scaleX,d=S.scaleY;this.tweens.add({targets:S,scaleX:{from:h*.5,to:h},scaleY:{from:d*.5,to:d},duration:200,ease:"Back.easeOut"})}}else S.setTexture&&this.textures.exists("tile")?(S.setTexture("tile"),S.setDisplaySize(this.tileSize-2,this.tileSize-2),S.clearTint()):S.setFillStyle&&S.setFillStyle(4871528),this.setCellText(m,"",0)})}setCellText(y,n,m,S="#ffffff"){if(this.cellTexts[y]&&this.cellTexts[y].destroy(),!n){this.cellTexts[y]=null;return}const x=y%this.gridSize*this.tileSize+this.tileSize/2,h=Math.floor(y/this.gridSize)*this.tileSize+this.tileSize/2,d=this.add.text(x,h,n,{fontSize:`${m}px`,color:S,fontStyle:"bold"}).setOrigin(.5).setDepth(1);this.boardContainer.add(d),this.cellTexts[y]=d}getNumberColor(y){return{1:"#3b82f6",2:"#22c55e",3:"#ef4444",4:"#8b5cf6",5:"#a16207",6:"#06b6d4",7:"#000000",8:"#6b7280"}[y]||"#000000"}revealAllCells(){!this.gameState||!this.gameState.grid||(this.gameState.grid.forEach((y,n)=>{y.revealed=!0}),this.updateBoard(this.gameState.grid))}checkClientSideGameOver(y,n){if(!y||this._gameOverHandled)return;const m=Object.entries(y),S=m.filter(([x,h])=>h.hp>0);if(S.length<=1&&m.length>0){const x=S.length===1?S[0][0]:null,h=x===this.myUserId;console.log("[OnlineBattleScene] Client game over:",{winnerId:x,alive:S.length,total:m.length}),this._gameOverHandled=!0,this.logMessages.push("游戏结束!"),this.revealAllCells(),h||this.playSFX("youLoseSFX"),Je.notifyGameOver({isWinner:h,winnerId:x,matchId:this.matchId,gameMode:this.gameMode});const d=x?y[x]:null,t=y[this.myUserId],e=d?{name:this.getDisplayName(d,0),characterType:d.character,isAI:!1}:null;if(t&&!h&&(this.getDisplayName(t,0),t.character),this._resultSceneLaunched)return;this._resultSceneLaunched=!0,this._showInlineGameOver(h,e)}}_detectStateChanges(y,n){if(!(!y||!n)){for(const[m,S]of Object.entries(n)){const x=y[m];x&&(!x.curse&&S.curse&&this.addLog(`${S.username||"玩家"} 被诅咒了 👻`),!x.shield&&S.shield&&this.addLog(`${S.username||"玩家"} 获得了护盾 🛡️`),!x.poisoned&&S.poisoned&&this.addLog(`${S.username||"玩家"} 中毒了 ☠️`),x.hp>S.hp&&x.hp>0&&x.hp-S.hp>0&&!this._lastDamageApplied?.[m]&&this.playDamageEffect(m))}this._lastDamageApplied={}}}applyLocalDamage(y,n){if(!this.gameState||!this.gameState.players)return;const m=this.gameState.players[y];if(!m)return;this._lastDamageApplied||(this._lastDamageApplied={}),this._lastDamageApplied[y]=!0;let S=n;if(m.shield){m.shield=!1;return}m.character==="cat"&&(S=1),m.curse&&m.character!=="cat"?(S*=2,m.curse=!1):m.character==="cat"&&(m.curse=!1),m.hp=Math.max(0,m.hp-S),this.updatePlayersDisplay(this.gameState.players,this.gameState.turnOrder),this.checkClientSideGameOver(this.gameState.players,this.gameState.turnOrder)}getDisplayName(y,n){if(y.display_name)return y.display_name;const m=y.username||"";return m.length>8||/^[a-zA-Z0-9]{6,}$/.test(m)?`玩家${n+1}`:m||`玩家${n+1}`}updatePlayersDisplay(y,n){this.playerInfoContainers.forEach(h=>{h.bg&&h.bg.destroy(),h.avatar&&h.avatar.destroy(),h.name&&h.name.destroy(),h.hpText&&h.hpText.destroy(),h.statusIcons&&h.statusIcons.destroy(),h.deadMark&&h.deadMark.destroy()}),this.playerInfoContainers=[],n||(n=Object.keys(y));const m=this.playerPanelY,S=this.playerPanelHeight,x=this.playerPanelWidth/4;n.forEach((h,d)=>{const t=y[h];if(!t)return;const e=this.playerPanelX+d*x+x/2,l=m+S/2,i=x-2,s=S-8,r=this.gameState&&this.gameState.turnOrder&&this.gameState.turnOrder[this.gameState.currentTurnIndex]===h,o=h===this.myUserId,a=t.hp<=0,u=this.add.rectangle(e,l,i,s,o?5924216:4871528).setStrokeStyle(r?3:1,r?65416:7438486),f=Mr[t.character]||"👤",v=this.add.text(e,l+8,f,{fontSize:`${Math.floor(s*.5)}px`}).setOrigin(.5);a&&v.setTint(16729156);const c=this.getDisplayName(t,d),g=this.add.text(e,m+12,c,{fontSize:"20px",fontStyle:"bold",color:o?"#00ff88":"#ffffff",backgroundColor:"#000000",padding:{x:4,y:2}}).setOrigin(.5),p="❤️".repeat(Math.max(0,t.hp)),T="🖤".repeat(Math.max(0,(t.maxHp||3)-t.hp)),C=this.add.text(e-i/2+38,m+S-15,p+T,{fontSize:"12px",color:"#ff6b6b",fontStyle:"bold",backgroundColor:"#000000",padding:{x:4,y:2}}).setOrigin(.5);let M="";t.shield&&(M+="🛡️"),t.poisoned&&(M+="☠️"),t.curse&&(M+="💀"),t.timeBombTurns>0&&(M+="💣"),t.revive&&(M+="💊");const A=this.add.text(e+i/2-38,m+S-15,M,{fontSize:"16px",backgroundColor:"#000000",padding:{x:4,y:2}}).setOrigin(.5);let R=null;a&&(R=this.add.text(e,l,"🚫",{fontSize:`${Math.floor(Math.min(i,s)*1.2)}px`}).setOrigin(.5).setDepth(10)),this.playerInfoContainers.push({bg:u,avatar:v,name:g,hpText:C,statusIcons:A,deadMark:R,playerId:h})})}updateItemBar(y){if(!y||!y.inventory)return;this.itemContainer.removeAll(!0);const n=70,m=65;y.inventory.forEach((S,x)=>{const h=x*(n+8),d=this.add.rectangle(h+n/2,0,n,m,1715522).setStrokeStyle(2,3828378).setInteractive({useHandCursor:!0}).setData("itemId",S),t=Wi[S]||"📦",e=this.add.text(h+n/2,-4,t,{fontSize:"44px"}).setOrigin(.5);this.itemContainer.add([d,e]),d.on("pointerover",()=>d.setStrokeStyle(3,6333946)),d.on("pointerout",()=>d.setStrokeStyle(2,3828378)),d.on("pointerdown",()=>this.useItem(S))})}useItem(y){!this.isMyTurn||!Dt.matchId||Dt.sendMatchState(Dt.matchId,ae.PLAYER_CLICK,{action:"useItem",itemId:y})}handleGameEvent(y){if(y)switch(y.type){case"damage":this.addLog(`${y.playerName||"玩家"} 受到了 ${y.value} 点伤害`),this.playDamageEffect(y.playerId),y.damageSource==="lightning"&&(this.addSmokeEffect(y.playerId),this.playSpineAnimation("thunder")),this.applyLocalDamage(y.playerId,y.value);break;case"heal":this.addLog(`${y.playerName||"玩家"} 回复了 ${y.value} 点生命`),this.playHealEffect(y.playerId),this.playSpineAnimation("medkit");break;case"item":const n=Xe[y.itemId]?.name||y.itemId;this.addLog(`${y.playerName||"玩家"} 获得了 ${n}`),y.itemId==="time_bomb"&&(this.playSFX("tickSFX"),this.playSpineAnimation("timerBomb")),y.itemId==="shield"&&this.playSpineAnimation("shield"),y.itemId==="poison"&&this.playSpineAnimation("poison"),y.itemId==="dagger"&&this.playSpineAnimation("knife"),y.itemId==="good_card"&&this.playSpineAnimation("goodPerson"),y.itemId==="resurrection"&&this.playSpineAnimation("rebirth"),y.itemId==="magnifier"&&this.playSpineAnimation("magnifier"),y.itemId==="chest"&&this.playSpineAnimation("chest"),y.itemId==="curse"&&this.playSpineAnimation("curse"),y.itemId==="lightning"&&this.playSpineAnimation("thunder");break;case"ability":this.addLog(`${y.playerName||"玩家"} 触发了技能: ${y.message}`),y.character&&this.playSpineAnimation(y.character);break;case"death":this.addLog(`${y.playerName||"玩家"} 被淘汰了!`),y.playerId===this.myUserId&&this.playSFX("youLoseSFX");break;default:y.message&&this.addLog(y.message)}}handleGameEnd(y){if(this._resultSceneLaunched)return;this._gameOverHandled=!0,this._gameOverTimer&&(this._gameOverTimer.remove(),this._gameOverTimer=null),this._inactivityTimer&&(this._inactivityTimer.remove(),this._inactivityTimer=null);const n=y.winnerId,m=n===this.myUserId;this.gameState=y.gameState||this.gameState,this.revealAllCells(),m||this.playSFX("youLoseSFX"),Je.notifyGameOver({isWinner:m,winnerId:n,matchId:this.matchId,gameMode:this.gameMode});const S=this.gameState?.players||y.players||{},x=S[n],h=S[this.myUserId],d=x?{name:this.getDisplayName(x,0),characterType:x.character,isAI:!1}:null;h&&!m&&(this.getDisplayName(h,0),h.character),!this._resultSceneLaunched&&(this._resultSceneLaunched=!0,this._showInlineGameOver(m,d))}_showInlineGameOver(y,n){const{width:m,height:S}=this.cameras.main,x=200;this.add.rectangle(m/2,S/2,m,S,0,.8).setDepth(x);const h=y?"🎉 胜利!":"💀 失败",d=y?"#22c55e":"#ef4444";this.add.text(m/2,S/2-160,h,{fontSize:"80px",fontStyle:"bold",color:d,stroke:"#000000",strokeThickness:6}).setOrigin(.5).setDepth(x+1),n&&this.add.text(m/2,S/2-60,`胜者: ${n.name}`,{fontSize:"36px",color:"#fbbf24"}).setOrigin(.5).setDepth(x+1);const t=this.add.rectangle(m/2-110,S/2+60,190,70,1483594).setStrokeStyle(3,2278750).setInteractive({useHandCursor:!0}).setDepth(x+1);this.add.text(m/2-110,S/2+60,"🚀 再次匹配",{fontSize:"28px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5).setDepth(x+2),t.on("pointerover",()=>t.setFillStyle(2278750)),t.on("pointerout",()=>t.setFillStyle(1483594)),t.on("pointerdown",()=>{Dt.leaveMatch(),this.scene.start("LobbyScene",{mode:this.gameMode,autoMatch:!0})});const e=this.add.rectangle(m/2+110,S/2+60,190,70,1920728).setStrokeStyle(3,3900150).setInteractive({useHandCursor:!0}).setDepth(x+1);this.add.text(m/2+110,S/2+60,"🏠 返回大厅",{fontSize:"28px",fontStyle:"bold",color:"#ffffff"}).setOrigin(.5).setDepth(x+2),e.on("pointerover",()=>e.setFillStyle(3900150)),e.on("pointerout",()=>e.setFillStyle(1920728)),e.on("pointerdown",()=>{Dt.leaveMatch(),this.scene.start("LobbyScene",{mode:this.gameMode})})}showGameResult(y,n){const{width:m,height:S}=this.cameras.main;this.add.rectangle(m/2,S/2,m,S,0,.7).setDepth(100);const x=y?"🎉 胜利!":"💀 失败",h=y?"#00ff88":"#ff6b6b";this.add.text(m/2,S/2-50,x,{fontSize:"64px",fontStyle:"bold",color:h,stroke:"#000",strokeThickness:4}).setOrigin(.5).setDepth(101);const d=this.add.rectangle(m/2,S/2+50,200,50,4871528).setStrokeStyle(2,7438486).setInteractive({useHandCursor:!0}).setDepth(101);this.add.text(m/2,S/2+50,"返回大厅",{fontSize:"20px",color:"#ffffff"}).setOrigin(.5).setDepth(101),d.on("pointerdown",()=>{_t.isWebView?Je.notifyPlayAgain():this.scene.start("LobbyScene",{mode:this.gameMode})})}setupInput(){this.input.on("gameobjectdown",(y,n)=>{const m=n.getData("index");m!==void 0&&this.handleCellClick(m)})}handleCellClick(y){if(!this.gameState)return;if(!this.gameState.gameStarted){this.showToast("游戏尚未开始",1500);return}if(this.isSpectator){this.toggleFlag(y);return}if(this.gameState.grid[y]&&this.gameState.grid[y].revealed)return;if(this.gameState.turnOrder[this.gameState.currentTurnIndex]!==this.myUserId){this.toggleFlag(y);return}Dt.matchId&&Dt.sendMatchState(Dt.matchId,ae.PLAYER_CLICK,{index:y})}toggleFlag(y){this.flaggedCells.has(y)?this.flaggedCells.delete(y):this.flaggedCells.add(y),this.updateBoardFlags()}updateBoardFlags(){this.flagContainer?this.flagContainer.removeAll(!0):this.flagContainer=this.add.container(this.boardOffsetX,this.boardOffsetY),this.flaggedCells.forEach(y=>{if(this.gameState&&this.gameState.grid[y]&&this.gameState.grid[y].revealed){this.flaggedCells.delete(y);return}const n=y%this.gridSize*this.tileSize+this.tileSize/2,m=Math.floor(y/this.gridSize)*this.tileSize+this.tileSize/2,S=this.add.text(n,m,"🚩",{fontSize:`${Math.floor(this.tileSize*.6)}px`}).setOrigin(.5).setDepth(2);this.flagContainer.add(S)})}get isMyTurn(){return!this.gameState||!this.gameState.gameStarted?!1:this.gameState.turnOrder[this.gameState.currentTurnIndex]===this.myUserId}startTurnTimer(y,n,m){this.turnTimerEvent&&this.turnTimerEvent.remove();const S=Math.floor(Date.now()/1e3),x=y?S-y+(S-n):0;let h=Math.max(0,m-x);this.turnTimerText.setText(h.toString()),this.turnTimerText.setColor("#ffffff"),this.turnTimerEvent=this.time.addEvent({delay:1e3,callback:()=>{h--,h>=0&&(this.turnTimerText.setText(h.toString()),h<=5&&(this.turnTimerText.setColor("#ff4444"),this.playSFX("warningSFX",.3)))},loop:!0})}addLog(y){this.logMessages.push(y),this.updateInlineLog(),y.endsWith("翻开了格子")||this.showToast(y,2e3),console.log(`[OnlineBattle] ${y}`)}showToast(y,n=2e3){const{width:m}=this.cameras.main,S=this.add.container(m/2,80).setDepth(99999).setAlpha(0),x=this.add.rectangle(0,0,400,50,2963272,.9).setStrokeStyle(2,65416),h=this.add.text(0,0,y,{fontSize:"18px",fontStyle:"bold",color:"#ffffff",wordWrap:{width:380}}).setOrigin(.5);S.add([x,h]),this.tweens.add({targets:S,alpha:1,duration:200,ease:"Power2",onComplete:()=>{this.time.delayedCall(n,()=>{this.tweens.add({targets:S,alpha:0,duration:300,onComplete:()=>S.destroy()})})}})}showDisconnectOverlay(){const{width:y,height:n}=this.cameras.main;this.add.rectangle(y/2,n/2,y,n,0,.8).setDepth(100),this.add.text(y/2,n/2,"连接已断开",{fontSize:"32px",color:"#ff6b6b"}).setOrigin(.5).setDepth(101);const m=this.add.rectangle(y/2,n/2+60,150,40,4871528).setInteractive({useHandCursor:!0}).setDepth(101);this.add.text(y/2,n/2+60,"返回大厅",{fontSize:"16px",color:"#ffffff"}).setOrigin(.5).setDepth(101),m.on("pointerdown",()=>{_t.isWebView?Je.notifyClose():this.scene.start("LobbyScene",{mode:this.gameMode})})}async reconnect(){this.gameToken&&(await Dt.authenticateWithGameToken(this.gameToken,this.myUserId),await Dt.connect(),this.matchId&&(await Dt.joinMatch(this.matchId),Dt.sendMatchState(Dt.matchId,ae.REQUEST_STATE,{action:"getState"})),this.addLog("重连成功!"))}exitBattle(){this.bgm&&(this.bgm.stop(),this.bgm.destroy(),this.bgm=null),Dt.leaveMatch(),_t.isWebView?Je.notifyClose():this.scene.start("LobbyScene",{mode:this.gameMode})}shutdown(){this.bgm&&(this.bgm.stop(),this.bgm.destroy(),this.bgm=null)}initializeBGM(){if(this.bgm&&(this.bgm.stop(),this.bgm.destroy(),this.bgm=null),localStorage.getItem("bgmEnabled")!=="false")try{if(this.cache.audio.exists("battleBGM")){const n=localStorage.getItem("bgmVolume"),m=n?parseFloat(n):.1;this.bgm=this.sound.add("battleBGM",{loop:!0,volume:m}),this.bgm.play(),this.bgmEnabled=!0}else this.bgmEnabled=!1}catch{this.bgmEnabled=!1}else this.bgmEnabled=!1}createBGMButton(y,n){const m=this.add.container(y,n),S=this.add.circle(0,0,28,2963272).setStrokeStyle(3,this.bgmEnabled?65416:4871528).setInteractive({useHandCursor:!0}),x=this.add.text(0,0,this.bgmEnabled?"🎵":"🔇",{fontSize:"28px"}).setOrigin(.5);m.add([S,x]),this.bgmButton={bg:S,icon:x},S.on("pointerover",()=>{S.setFillStyle(4871528),S.setScale(1.1)}),S.on("pointerout",()=>{S.setFillStyle(2963272),S.setScale(1)}),S.on("pointerdown",()=>this.toggleBGM())}toggleBGM(){this.bgmEnabled=!this.bgmEnabled,localStorage.setItem("bgmEnabled",this.bgmEnabled.toString()),this.bgmEnabled?(this.bgm||(this.bgm=this.sound.add("battleBGM",{loop:!0,volume:.5})),this.bgm.resume(),this.addLog("🎵 BGM已开启")):(this.bgm&&this.bgm.pause(),this.addLog("🔇 BGM已关闭")),this.bgmButton&&(this.bgmButton.icon.setText(this.bgmEnabled?"🎵":"🔇"),this.bgmButton.bg.setStrokeStyle(3,this.bgmEnabled?65416:4871528))}checkAndSwitchBGM(y){if(!this.bgmEnabled||!this.bgm||!y)return;const n=y[this.myUserId];if(!n||n.hp<=0)return;const m=n.hp<=2,S=this.bgm.key==="intenseBGM";if(m&&!S&&this.cache.audio.exists("intenseBGM"))try{const x=this.bgm.volume;this.bgm.stop(),this.bgm=this.sound.add("intenseBGM",{loop:!0,volume:x}),this.bgm.play()}catch{}else if(!m&&S&&this.cache.audio.exists("battleBGM"))try{const x=this.bgm.volume;this.bgm.stop(),this.bgm=this.sound.add("battleBGM",{loop:!0,volume:x}),this.bgm.play()}catch{}}playSFX(y,n=.5){try{this.cache.audio.exists(y)&&this.sound.play(y,{volume:n})}catch{}}playDamageEffect(y){this.playSFX("smallBombSFX"),y===this.myUserId?(this.cameras.main.shake(200,.01),this.flashScreenRed()):this.flashAvatarRed(y)}playHealEffect(y){this.playSFX("healSFX")}flashScreenRed(){const{width:y,height:n}=this.cameras.main,m=this.add.graphics();m.lineStyle(20,16711680,.8),m.lineBetween(0,0,y,0),m.lineBetween(0,n,y,n),m.lineBetween(0,0,0,n),m.lineBetween(y,0,y,n),m.setDepth(9999),this.tweens.add({targets:m,alpha:0,duration:300,ease:"Power2",onComplete:()=>m.destroy()})}flashAvatarRed(y){const n=this.playerInfoContainers.find(m=>m.playerId===y);!n||!n.avatar||(n.avatar.setTint(16711680),this.tweens.add({targets:n.avatar,alpha:{from:1,to:.3},duration:150,yoyo:!0,repeat:2,onComplete:()=>{n.avatar.clearTint(),n.avatar.setAlpha(1)}}))}addSmokeEffect(y){const n=this.playerInfoContainers.find(x=>x.playerId===y);if(!n||!n.avatar)return;const m=n.avatar.x,S=n.avatar.y;for(let x=0;x<5;x++){const h=(Math.random()-.5)*40,d=(Math.random()-.5)*40,t=this.add.text(m+h,S+d,"💨",{fontSize:`${20+Math.random()*20}px`}).setOrigin(.5).setDepth(50).setAlpha(.8);this.tweens.add({targets:t,y:t.y-60-Math.random()*30,alpha:0,duration:1500,delay:x*100,onComplete:()=>t.destroy()})}}playSpineAnimation(y){this.currentSpineAnimation&&(this.currentSpineAnimation.destroy(),this.currentSpineAnimation=null);let n=y;if(typeof y=="string"&&(n=qt(y),!n))return;const{jsonKey:m,atlasKey:S,soundKey:x,scale:h=1,timeout:d=3e3}=n,{width:t,height:e}=this.cameras.main;x&&this.playSFX(x);try{if(!this.cache.json.exists(m)||!this.cache.text.exists(S))return;const l=this.boardOffsetY+(this.gridSize||8)*this.tileSize,i=l+(e-l)/2,s=this.add.spine(t/2,i,m,S);s.setScale(h),s.setDepth(100),this.currentSpineAnimation=s;const r=s.animationStateData.skeletonData.animations;if(r.length>0)s.animationState.setAnimation(0,r[0].name,!1);else{s.destroy(),this.currentSpineAnimation=null;return}s.animationState.addListener({complete:()=>{s.destroy(),this.currentSpineAnimation=null}}),this.time.delayedCall(d,()=>{s.active&&(s.destroy(),this.currentSpineAnimation=null)})}catch(l){console.error("Spine animation failed:",l),this.currentSpineAnimation=null}}}const Pr="https://game.1024tool.vip/api/app";class Lr extends ce{constructor(){super({key:"LeaderboardScene"})}init(y){this.gameType=y.gameType||"minesweeper",this.page=1,this.pageSize=10,this.totalCount=0,this.rows=[],this.rowTexts=[]}create(){const{width:y,height:n}=this.cameras.main;this.add.rectangle(y/2,n/2,y,n,0,.78).setInteractive();const m=700,S=1060,x=y/2,h=n/2,d=this.add.graphics();d.fillStyle(726050,1),d.fillRoundedRect(x-m/2,h-S/2,m,S,14),d.lineStyle(2,1981020,1),d.strokeRoundedRect(x-m/2,h-S/2,m,S,14);const t=56,e=h-S/2,l=this.add.graphics();l.fillStyle(991296,1),l.fillRoundedRect(x-m/2,e,m,t,{tl:14,tr:14,bl:0,br:0}),this.add.text(x,e+t/2,"🏆 排行榜",{fontSize:"32px",fontStyle:"bold",color:"#e2b94a"}).setOrigin(.5),this.add.text(x+m/2-36,e+t/2,"✕",{fontSize:"32px",color:"#ef4444"}).setOrigin(.5).setInteractive({useHandCursor:!0}).on("pointerdown",()=>{this.scene.stop(),this.scene.resume("LobbyScene")});const s=e+t+36;this._drawTabs(x,s,m);const r=s+44;this._drawHeader(x-m/2+16,r,m-32),this._listTop=r+36,this._listBottom=h+S/2-100,this._panelX=x,this._panelW=m,this.loadingText=this.add.text(x,this._listTop+120,"加载中...",{fontSize:"28px",color:"#4a7aaa"}).setOrigin(.5);const o=h+S/2-48;this._drawPageButtons(x,o),this._fetchLeaderboard()}_drawTabs(y,n,m){const S=[{label:"正式场",type:"minesweeper"},{label:"练习场",type:"minesweeper_free"}];this._tabBgs=[],this._tabTexts=[],S.forEach((x,h)=>{const e=y-m/2+28+h*216,l=x.type===this.gameType,i=this.add.graphics();this._drawTab(i,e,n-52/2,200,52,l),this._tabBgs.push({bg:i,x:e,y:n-52/2,w:200,h:52});const s=this.add.text(e+200/2,n,x.label,{fontSize:"26px",fontStyle:"bold",color:l?"#ffffff":"#4a7aaa"}).setOrigin(.5).setInteractive({useHandCursor:!0});this._tabTexts.push(s),s.on("pointerdown",()=>{this.gameType=x.type,this.page=1,this._refreshTabs(),this._fetchLeaderboard()})})}_drawTab(y,n,m,S,x,h){y.clear(),y.fillStyle(h?1920728:859182,1),y.fillRoundedRect(n,m,S,x,8),y.lineStyle(2,h?3900150:1981020,1),y.strokeRoundedRect(n,m,S,x,8)}_refreshTabs(){const y=["minesweeper","minesweeper_free"];this._tabBgs.forEach((n,m)=>{const S=y[m]===this.gameType;this._drawTab(n.bg,n.x,n.y,n.w,n.h,S),this._tabTexts[m].setColor(S?"#ffffff":"#4a7aaa")})}_drawHeader(y,n,m){const S=[{label:"名次",pct:.1},{label:"玩家",pct:.34},{label:"胜场",pct:.16},{label:"胜率",pct:.2},{label:"积分",pct:.2}],x=this.add.graphics();x.lineStyle(1,1981020,.5),x.beginPath(),x.moveTo(y,n+28),x.lineTo(y+m,n+28),x.strokePath();let h=y;S.forEach(d=>{this.add.text(h+m*d.pct/2,n,d.label,{fontSize:"22px",color:"#4a7aaa"}).setOrigin(.5,0),h+=m*d.pct})}_drawPageButtons(y,n){const m=this.add.rectangle(y-100,n,160,52,859182).setStrokeStyle(2,1981020).setInteractive({useHandCursor:!0});this.add.text(y-100,n,"◀ 上一页",{fontSize:"24px",color:"#4a7aaa"}).setOrigin(.5),m.on("pointerdown",()=>{this.page>1&&(this.page--,this._fetchLeaderboard())});const S=this.add.rectangle(y+100,n,160,52,859182).setStrokeStyle(2,1981020).setInteractive({useHandCursor:!0});this.add.text(y+100,n,"下一页 ▶",{fontSize:"24px",color:"#4a7aaa"}).setOrigin(.5),S.on("pointerdown",()=>{const x=Math.ceil(this.totalCount/this.pageSize);this.page<x&&(this.page++,this._fetchLeaderboard())}),this.pageInfoText=this.add.text(y,n+38,"",{fontSize:"20px",color:"#2a4a6a"}).setOrigin(.5)}async _fetchLeaderboard(){this.loadingText&&this.loadingText.setVisible(!0),this._clearRows();try{const y=_t.gameToken||"",n=`${Pr}/games/leaderboard?game_type=${this.gameType}&page=${this.page}&page_size=${this.pageSize}`,m=await fetch(n,{headers:y?{Authorization:`Bearer ${y}`}:{}});if(!m.ok)throw new Error(`HTTP ${m.status}`);const S=await m.json(),x=S.data||S;this.totalCount=x.total||0,this.rows=x.list||[],this.loadingText&&this.loadingText.setVisible(!1),this._renderRows();const h=Math.max(1,Math.ceil(this.totalCount/this.pageSize));this.pageInfoText&&this.pageInfoText.setText(`第 ${this.page} / ${h} 页 共 ${this.totalCount} 名`)}catch{this.loadingText&&this.loadingText.setText("加载失败,请重试").setVisible(!0)}}_clearRows(){this.rowTexts.forEach(y=>y.forEach(n=>n.destroy())),this.rowTexts=[]}_renderRows(){const y=this._panelX-this._panelW/2+16,n=this._panelW-32,m=72,S=["#f59e0b","#94a3b8","#b45309"],x=["🥇","🥈","🥉"];if(this.rows.forEach((h,d)=>{const t=this._listTop+d*m+m/2,e=h.rank||(this.page-1)*this.pageSize+d+1,l=this.add.graphics(),i=d%2===0?859182:661032;l.fillStyle(i,1),l.fillRect(y,t-m/2,n,m-2),this.rowTexts.push([l]);const s=[{val:e<=3?x[e-1]:`#${e}`,pct:.1,color:S[e-1]||"#c0d8f0"},{val:h.nickname||`玩家${h.user_id}`,pct:.34,color:"#c0d8f0"},{val:`${h.wins||0}`,pct:.16,color:"#22c55e"},{val:`${Math.round((h.win_rate||0)*100)}%`,pct:.2,color:"#38bdf8"},{val:`${h.total_rank_points||0}`,pct:.2,color:"#f59e0b"}];let r=y;const o=[l];s.forEach(a=>{const u=n*a.pct,f=this.add.text(r+u/2,t,String(a.val),{fontSize:"24px",color:a.color}).setOrigin(.5);o.push(f),r+=u}),this.rowTexts.push(o)}),this.rows.length===0){const h=this.add.text(this._panelX,this._listTop+120,"暂无数据",{fontSize:"28px",color:"#2a4a6a"}).setOrigin(.5);this.rowTexts.push([h])}}}var Fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fs={exports:{}};(function(E,y){(function(m,S){E.exports=S()})(Fr,()=>(()=>{var n={50792:h=>{var d=Object.prototype.hasOwnProperty,t="~";function e(){}Object.create&&(e.prototype=Object.create(null),new e().__proto__||(t=!1));function l(o,a,u){this.fn=o,this.context=a,this.once=u||!1}function i(o,a,u,f,v){if(typeof u!="function")throw new TypeError("The listener must be a function");var c=new l(u,f||o,v),g=t?t+a:a;return o._events[g]?o._events[g].fn?o._events[g]=[o._events[g],c]:o._events[g].push(c):(o._events[g]=c,o._eventsCount++),o}function s(o,a){--o._eventsCount===0?o._events=new e:delete o._events[a]}function r(){this._events=new e,this._eventsCount=0}r.prototype.eventNames=function(){var a=[],u,f;if(this._eventsCount===0)return a;for(f in u=this._events)d.call(u,f)&&a.push(t?f.slice(1):f);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(u)):a},r.prototype.listeners=function(a){var u=t?t+a:a,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var v=0,c=f.length,g=new Array(c);v<c;v++)g[v]=f[v].fn;return g},r.prototype.listenerCount=function(a){var u=t?t+a:a,f=this._events[u];return f?f.fn?1:f.length:0},r.prototype.emit=function(a,u,f,v,c,g){var p=t?t+a:a;if(!this._events[p])return!1;var T=this._events[p],C=arguments.length,M,A;if(T.fn){switch(T.once&&this.removeListener(a,T.fn,void 0,!0),C){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,u),!0;case 3:return T.fn.call(T.context,u,f),!0;case 4:return T.fn.call(T.context,u,f,v),!0;case 5:return T.fn.call(T.context,u,f,v,c),!0;case 6:return T.fn.call(T.context,u,f,v,c,g),!0}for(A=1,M=new Array(C-1);A<C;A++)M[A-1]=arguments[A];T.fn.apply(T.context,M)}else{var R=T.length,P;for(A=0;A<R;A++)switch(T[A].once&&this.removeListener(a,T[A].fn,void 0,!0),C){case 1:T[A].fn.call(T[A].context);break;case 2:T[A].fn.call(T[A].context,u);break;case 3:T[A].fn.call(T[A].context,u,f);break;case 4:T[A].fn.call(T[A].context,u,f,v);break;default:if(!M)for(P=1,M=new Array(C-1);P<C;P++)M[P-1]=arguments[P];T[A].fn.apply(T[A].context,M)}}return!0},r.prototype.on=function(a,u,f){return i(this,a,u,f,!1)},r.prototype.once=function(a,u,f){return i(this,a,u,f,!0)},r.prototype.removeListener=function(a,u,f,v){var c=t?t+a:a;if(!this._events[c])return this;if(!u)return s(this,c),this;var g=this._events[c];if(g.fn)g.fn===u&&(!v||g.once)&&(!f||g.context===f)&&s(this,c);else{for(var p=0,T=[],C=g.length;p<C;p++)(g[p].fn!==u||v&&!g[p].once||f&&g[p].context!==f)&&T.push(g[p]);T.length?this._events[c]=T.length===1?T[0]:T:s(this,c)}return this},r.prototype.removeAllListeners=function(a){var u;return a?(u=t?t+a:a,this._events[u]&&s(this,u)):(this._events=new e,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prefixed=t,r.EventEmitter=r,h.exports=r},11517:(h,d,t)=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(38829),l=function(i,s,r,o){for(var a=i[0],u=1;u<i.length;u++){var f=i[u];e(f,a,s,r,o),a=f}return i};h.exports=l},80318:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a){return e(i,"angle",s,r,o,a)};h.exports=l},60757:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){for(var i=0;i<t.length;i++){var s=t[i];e.call(l,s)}return t};h.exports=d},69927:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){l===void 0&&(l=0);for(var i=l;i<t.length;i++){var s=t[i],r=!0;for(var o in e)s[o]!==e[o]&&(r=!1);if(r)return s}return null};h.exports=d},32265:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){l===void 0&&(l=0);for(var i=t.length-1;i>=l;i--){var s=t[i],r=!0;for(var o in e)s[o]!==e[o]&&(r=!1);if(r)return s}return null};h.exports=d},94420:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(11879),l=t(60461),i=t(95540),s=t(29747),r=t(41481),o=new r({sys:{queueDepthSort:s,events:{once:s}}},0,0,1,1).setOrigin(0,0),a=function(u,f){f===void 0&&(f={});var v=f.hasOwnProperty("width"),c=f.hasOwnProperty("height"),g=i(f,"width",-1),p=i(f,"height",-1),T=i(f,"cellWidth",1),C=i(f,"cellHeight",T),M=i(f,"position",l.TOP_LEFT),A=i(f,"x",0),R=i(f,"y",0),P=0,L=0,F=g*T,w=p*C;o.setPosition(A,R),o.setSize(T,C);for(var O=0;O<u.length;O++)if(e(u[O],o,M),v&&g===-1)o.x+=T;else if(c&&p===-1)o.y+=C;else if(c&&!v){if(L+=C,o.y+=C,L===w&&(L=0,P+=T,o.y=R,o.x+=T,P===F))break}else if(P+=T,o.x+=T,P===F&&(P=0,L+=C,o.x=A,o.y+=C,L===w))break;return u};h.exports=a},41721:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a){return e(i,"alpha",s,r,o,a)};h.exports=l},67285:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a){return e(i,"x",s,r,o,a)};h.exports=l},9074:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a,u,f){return r==null&&(r=s),e(i,"x",s,o,u,f),e(i,"y",r,a,u,f)};h.exports=l},75222:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a){return e(i,"y",s,r,o,a)};h.exports=l},22983:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l===void 0&&(l=0),i===void 0&&(i=6.28);for(var s=l,r=(i-l)/t.length,o=e.x,a=e.y,u=e.radius,f=0;f<t.length;f++)t[f].x=o+u*Math.cos(s),t[f].y=a+u*Math.sin(s),s+=r;return t};h.exports=d},95253:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l===void 0&&(l=0),i===void 0&&(i=6.28);for(var s=l,r=(i-l)/t.length,o=e.width/2,a=e.height/2,u=0;u<t.length;u++)t[u].x=e.x+o*Math.cos(s),t[u].y=e.y+a*Math.sin(s),s+=r;return t};h.exports=d},88505:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(15258),l=t(26708),i=function(s,r,o){var a;o?a=l(r,o,s.length):a=e(r,s.length);for(var u=0;u<s.length;u++){var f=s[u],v=a[u];f.x=v.x,f.y=v.y}return s};h.exports=i},41346:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(14649),l=t(86003),i=t(49498),s=function(r,o,a){a===void 0&&(a=0);var u=e(o,!1,r.length);a>0?l(u,a):a<0&&i(u,Math.abs(a));for(var f=0;f<r.length;f++)r[f].x=u[f].x,r[f].y=u[f].y;return r};h.exports=s},11575:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(84993),l=function(i,s,r){var o=e({x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2},r),a=e({x1:s.x2,y1:s.y2,x2:s.x3,y2:s.y3},r),u=e({x1:s.x3,y1:s.y3,x2:s.x1,y2:s.y1},r);o.pop(),a.pop(),u.pop(),o=o.concat(a,u);for(var f=o.length/i.length,v=0,c=0;c<i.length;c++){var g=i[c],p=o[Math.floor(v)];g.x=p.x,g.y=p.y,v+=f}return i};h.exports=l},29953:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){for(var i=0;i<t.length;i++){var s=t[i];s.anims&&s.anims.play(e,l)}return t};h.exports=d},66979:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s,r){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=1);var o,a=0,u=t.length;if(r===1)for(o=s;o<u;o++)t[o][e]+=l+a*i,a++;else for(o=s;o>=0;o--)t[o][e]+=l+a*i,a++;return t};h.exports=d},43967:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s,r){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=1);var o,a=0,u=t.length;if(r===1)for(o=s;o<u;o++)t[o][e]=l+a*i,a++;else for(o=s;o>=0;o--)t[o][e]=l+a*i,a++;return t};h.exports=d},88926:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(28176),l=function(i,s){for(var r=0;r<i.length;r++)e(s,i[r]);return i};h.exports=l},33286:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(24820),l=function(i,s){for(var r=0;r<i.length;r++)e(s,i[r]);return i};h.exports=l},96e3:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65822),l=function(i,s){for(var r=0;r<i.length;r++)e(s,i[r]);return i};h.exports=l},28789:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26597),l=function(i,s){for(var r=0;r<i.length;r++)e(s,i[r]);return i};h.exports=l},97154:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90260),l=function(i,s){for(var r=0;r<i.length;r++)e(s,i[r]);return i};h.exports=l},20510:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a){return e(i,"rotation",s,r,o,a)};h.exports=l},91051:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(1163),l=t(20339),i=function(s,r,o){for(var a=r.x,u=r.y,f=0;f<s.length;f++){var v=s[f];e(v,a,u,o,Math.max(1,l(v.x,v.y,a,u)))}return s};h.exports=i},76332:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(1163),l=function(i,s,r,o){var a=s.x,u=s.y;if(o===0)return i;for(var f=0;f<i.length;f++)e(i[f],a,u,r,o);return i};h.exports=l},61619:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a){return e(i,"scaleX",s,r,o,a)};h.exports=l},94868:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a,u,f){return r==null&&(r=s),e(i,"scaleX",s,o,u,f),e(i,"scaleY",r,a,u,f)};h.exports=l},95532:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66979),l=function(i,s,r,o,a){return e(i,"scaleY",s,r,o,a)};h.exports=l},8689:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"alpha",s,r,o,a)};h.exports=l},2645:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o){return e(i,"blendMode",s,0,r,o)};h.exports=l},32372:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"depth",s,r,o,a)};h.exports=l},85373:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){for(var i=0;i<t.length;i++)t[i].setInteractive(e,l);return t};h.exports=d},81583:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a,u,f){return r==null&&(r=s),e(i,"originX",s,o,u,f),e(i,"originY",r,a,u,f),i.forEach(function(v){v.updateDisplayOrigin()}),i};h.exports=l},79939:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"rotation",s,r,o,a)};h.exports=l},2699:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a,u,f){return r==null&&(r=s),e(i,"scaleX",s,o,u,f),e(i,"scaleY",r,a,u,f)};h.exports=l},98739:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"scaleX",s,r,o,a)};h.exports=l},98476:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"scaleY",s,r,o,a)};h.exports=l},6207:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a,u,f){return r==null&&(r=s),e(i,"scrollFactorX",s,o,u,f),e(i,"scrollFactorY",r,a,u,f)};h.exports=l},6607:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"scrollFactorX",s,r,o,a)};h.exports=l},72248:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"scrollFactorY",s,r,o,a)};h.exports=l},14036:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s){for(var r=0;r<t.length;r++)t[r].setTint(e,l,i,s);return t};h.exports=d},50159:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o){return e(i,"visible",s,0,r,o)};h.exports=l},77597:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"x",s,r,o,a)};h.exports=l},83194:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a,u,f){return r==null&&(r=s),e(i,"x",s,o,u,f),e(i,"y",r,a,u,f)};h.exports=l},67678:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43967),l=function(i,s,r,o,a){return e(i,"y",s,r,o,a)};h.exports=l},35850:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a){o===void 0&&(o=0),a===void 0&&(a=new e);var u,f,v=i.length;if(v===1)u=i[0].x,f=i[0].y,i[0].x=s,i[0].y=r;else{var c=1,g=0;o===0&&(g=v-1,c=v-2),u=i[g].x,f=i[g].y,i[g].x=s,i[g].y=r;for(var p=0;p<v;p++)if(!(c>=v||c===-1)){var T=i[c],C=T.x,M=T.y;T.x=u,T.y=f,u=C,f=M,o===0?c--:c++}}return a.x=u,a.y=f,a};h.exports=l},8628:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(33680),l=function(i){return e(i)};h.exports=l},21837:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7602),l=function(i,s,r,o,a){a===void 0&&(a=!1);var u=Math.abs(o-r)/i.length,f;if(a)for(f=0;f<i.length;f++)i[f][s]+=e(f*u,r,o);else for(f=0;f<i.length;f++)i[f][s]=e(f*u,r,o);return i};h.exports=l},21910:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(54261),l=function(i,s,r,o,a){a===void 0&&(a=!1);var u=Math.abs(o-r)/i.length,f;if(a)for(f=0;f<i.length;f++)i[f][s]+=e(f*u,r,o);else for(f=0;f<i.length;f++)i[f][s]=e(f*u,r,o);return i};h.exports=l},62054:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s){if(s===void 0&&(s=!1),t.length===0)return t;if(t.length===1)return s?t[0][e]+=(i+l)/2:t[0][e]=(i+l)/2,t;var r=Math.abs(i-l)/(t.length-1),o;if(s)for(o=0;o<t.length;o++)t[o][e]+=o*r+l;else for(o=0;o<t.length;o++)t[o][e]=o*r+l;return t};h.exports=d},79815:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){for(var e=0;e<t.length;e++)t[e].visible=!t[e].visible;return t};h.exports=d},39665:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author samme <samme.npm@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(15994),l=function(i,s,r){r===void 0&&(r=0);for(var o=0;o<i.length;o++){var a=i[o];a.x=e(a.x,s.left-r,s.right+r),a.y=e(a.y,s.top-r,s.bottom+r)}return i};h.exports=l},61061:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(74943),s=t(81957),r=t(41138),o=t(35154),a=t(90126),u=new l({initialize:function(v,c,g){this.manager=v,this.key=c,this.type="frame",this.frames=this.getFrames(v.textureManager,o(g,"frames",[]),o(g,"defaultTextureKey",null),o(g,"sortFrames",!0)),this.frameRate=o(g,"frameRate",null),this.duration=o(g,"duration",null),this.msPerFrame,this.skipMissedFrames=o(g,"skipMissedFrames",!0),this.delay=o(g,"delay",0),this.repeat=o(g,"repeat",0),this.repeatDelay=o(g,"repeatDelay",0),this.yoyo=o(g,"yoyo",!1),this.showBeforeDelay=o(g,"showBeforeDelay",!1),this.showOnStart=o(g,"showOnStart",!1),this.hideOnComplete=o(g,"hideOnComplete",!1),this.randomFrame=o(g,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(i.PAUSE_ALL,this.pause,this),this.manager.on(i.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(f,v,c,g){c===null&&g===null?(f.frameRate=24,f.duration=24/v*1e3):c&&g===null?(f.duration=c,f.frameRate=v/(c/1e3)):(f.frameRate=g,f.duration=v/g*1e3),f.msPerFrame=1e3/f.frameRate},addFrame:function(f){return this.addFrameAt(this.frames.length,f)},addFrameAt:function(f,v){var c=this.getFrames(this.manager.textureManager,v);if(c.length>0){if(f===0)this.frames=c.concat(this.frames);else if(f===this.frames.length)this.frames=this.frames.concat(c);else{var g=this.frames.slice(0,f),p=this.frames.slice(f);this.frames=g.concat(c,p)}this.updateFrameSequence()}return this},checkFrame:function(f){return f>=0&&f<this.frames.length},getFirstTick:function(f){f.accumulator=0,f.nextTick=f.frameRate===f.currentAnim.frameRate&&f.currentFrame.duration||f.msPerFrame},getFrameAt:function(f){return this.frames[f]},getFrames:function(f,v,c,g){g===void 0&&(g=!0);var p=[],T,C,M=1,A,R;if(typeof v=="string"){if(R=v,!f.exists(R))return console.warn('Texture "%s" not found',R),p;var P=f.get(R),L=P.getFrameNames();g&&a(L),v=[],L.forEach(function(D){v.push({key:R,frame:D})})}if(!Array.isArray(v)||v.length===0)return p;for(A=0;A<v.length;A++){var F=v[A],w=o(F,"key",c);if(w){var O=o(F,"frame",0),B=f.getFrame(w,O);if(!B){console.warn('Texture "%s" not found',w);continue}C=new r(w,O,M,B),C.duration=o(F,"duration",0),C.isFirst=!T,T&&(T.nextFrame=C,C.prevFrame=T),p.push(C),T=C,M++}}if(p.length>0){C.isLast=!0,C.nextFrame=p[0],p[0].prevFrame=C;var I=1/(p.length-1);for(A=0;A<p.length;A++)p[A].progress=A*I}return p},getNextTick:function(f){f.accumulator-=f.nextTick,f.nextTick=f.frameRate===f.currentAnim.frameRate&&f.currentFrame.duration||f.msPerFrame},getFrameByProgress:function(f){return f=e(f,0,1),s(f,this.frames,"progress")},nextFrame:function(f){var v=f.currentFrame;v.isLast?f.yoyo?this.handleYoyoFrame(f,!1):f.repeatCounter>0?f.inReverse&&f.forward?f.forward=!1:this.repeatAnimation(f):f.complete():this.updateAndGetNextTick(f,v.nextFrame)},handleYoyoFrame:function(f,v){if(v||(v=!1),f.inReverse===!v&&f.repeatCounter>0){(f.repeatDelay===0||f.pendingRepeat)&&(f.forward=v),this.repeatAnimation(f);return}if(f.inReverse!==v&&f.repeatCounter===0){f.complete();return}f.forward=v;var c=v?f.currentFrame.nextFrame:f.currentFrame.prevFrame;this.updateAndGetNextTick(f,c)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(f){var v=f.currentFrame;v.isFirst?f.yoyo?this.handleYoyoFrame(f,!0):f.repeatCounter>0?f.inReverse&&!f.forward?this.repeatAnimation(f):(f.forward=!0,this.repeatAnimation(f)):f.complete():this.updateAndGetNextTick(f,v.prevFrame)},updateAndGetNextTick:function(f,v){f.setCurrentFrame(v),this.getNextTick(f)},removeFrame:function(f){var v=this.frames.indexOf(f);return v!==-1&&this.removeFrameAt(v),this},removeFrameAt:function(f){return this.frames.splice(f,1),this.updateFrameSequence(),this},repeatAnimation:function(f){if(f._pendingStop===2){if(f._pendingStopValue===0)return f.stop();f._pendingStopValue--}f.repeatDelay>0&&!f.pendingRepeat?(f.pendingRepeat=!0,f.accumulator-=f.nextTick,f.nextTick+=f.repeatDelay):(f.repeatCounter--,f.forward?f.setCurrentFrame(f.currentFrame.nextFrame):f.setCurrentFrame(f.currentFrame.prevFrame),f.isPlaying&&(this.getNextTick(f),f.handleRepeat()))},toJSON:function(){var f={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(v){f.frames.push(v.toJSON())}),f},updateFrameSequence:function(){for(var f=this.frames.length,v=1/(f-1),c,g=0;g<f;g++)c=this.frames[g],c.index=g+1,c.isFirst=!1,c.isLast=!1,c.progress=g*v,g===0?(c.isFirst=!0,f===1?(c.isLast=!0,c.nextFrame=c,c.prevFrame=c):(c.isLast=!1,c.prevFrame=this.frames[f-1],c.nextFrame=this.frames[g+1])):g===f-1&&f>1?(c.isLast=!0,c.prevFrame=this.frames[f-2],c.nextFrame=this.frames[0]):f>1&&(c.prevFrame=this.frames[g-1],c.nextFrame=this.frames[g+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(i.PAUSE_ALL,this.pause,this),this.manager.off(i.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var f=0;f<this.frames.length;f++)this.frames[f].destroy();this.frames=[],this.manager=null}});h.exports=u},41138:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o,a,u){u===void 0&&(u=!1),this.textureKey=s,this.textureFrame=r,this.index=o,this.frame=a,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=u},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});h.exports=l},60848:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(42099),l=t(83419),i=t(90330),s=t(50792),r=t(74943),o=t(8443),a=t(95540),u=t(35154),f=t(36383),v=t(20283),c=t(41836),g=new l({Extends:s,initialize:function(T){s.call(this),this.game=T,this.textureManager=null,this.globalTimeScale=1,this.anims=new i,this.mixes=new i,this.paused=!1,this.name="AnimationManager",T.events.once(o.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(o.DESTROY,this.destroy,this)},addMix:function(p,T,C){var M=this.anims,A=this.mixes,R=typeof p=="string"?p:p.key,P=typeof T=="string"?T:T.key;if(M.has(R)&&M.has(P)){var L=A.get(R);L||(L={}),L[P]=C,A.set(R,L)}return this},removeMix:function(p,T){var C=this.mixes,M=typeof p=="string"?p:p.key,A=C.get(M);if(A)if(T){var R=typeof T=="string"?T:T.key;A.hasOwnProperty(R)&&delete A[R]}else T||C.delete(M);return this},getMix:function(p,T){var C=this.mixes,M=typeof p=="string"?p:p.key,A=typeof T=="string"?T:T.key,R=C.get(M);return R&&R.hasOwnProperty(A)?R[A]:0},add:function(p,T){return this.anims.has(p)?(console.warn("Animation key exists: "+p),this):(T.key=p,this.anims.set(p,T),this.emit(r.ADD_ANIMATION,p,T),this)},exists:function(p){return this.anims.has(p)},createFromAseprite:function(p,T,C){var M=[],A=this.game.cache.json.get(p);if(!A)return console.warn("No Aseprite data found for: "+p),M;var R=this,P=u(A,"meta",null),L=u(A,"frames",null);if(P&&L){var F=u(P,"frameTags",[]);F.forEach(function(w){var O=[],B=a(w,"name",null),I=a(w,"from",0),D=a(w,"to",0),N=a(w,"direction","forward");if(B&&(!T||T&&T.indexOf(B)>-1)){for(var z=0,V=I;V<=D;V++){var U=V.toString(),G=L[U];if(G){var b=a(G,"duration",f.MAX_SAFE_INTEGER);O.push({key:p,frame:U,duration:b}),z+=b}}N==="reverse"&&(O=O.reverse());var Y={key:B,frames:O,duration:z,yoyo:N==="pingpong"},W;C?C.anims&&(W=C.anims.create(Y)):W=R.create(Y),W&&M.push(W)}})}return M},create:function(p){var T=p.key,C=!1;return T&&(C=this.get(T),C?console.warn("AnimationManager key already exists: "+T):(C=new e(this,T,p),this.anims.set(T,C),this.emit(r.ADD_ANIMATION,T,C))),C},fromJSON:function(p,T){T===void 0&&(T=!1),T&&this.anims.clear(),typeof p=="string"&&(p=JSON.parse(p));var C=[];if(p.hasOwnProperty("anims")&&Array.isArray(p.anims)){for(var M=0;M<p.anims.length;M++)C.push(this.create(p.anims[M]));p.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=p.globalTimeScale)}else p.hasOwnProperty("key")&&p.type==="frame"&&C.push(this.create(p));return C},generateFrameNames:function(p,T){var C=u(T,"prefix",""),M=u(T,"start",0),A=u(T,"end",0),R=u(T,"suffix",""),P=u(T,"zeroPad",0),L=u(T,"outputArray",[]),F=u(T,"frames",!1);if(!this.textureManager.exists(p))return console.warn('Texture "%s" not found',p),L;var w=this.textureManager.get(p);if(!w)return L;var O;if(T)for(F||(F=v(M,A)),O=0;O<F.length;O++){var B=C+c(F[O],P,"0",1)+R;w.has(B)?L.push({key:p,frame:B}):console.warn('Frame "%s" not found in texture "%s"',B,p)}else for(F=w.getFrameNames(),O=0;O<F.length;O++)L.push({key:p,frame:F[O]});return L},generateFrameNumbers:function(p,T){var C=u(T,"start",0),M=u(T,"end",-1),A=u(T,"first",!1),R=u(T,"outputArray",[]),P=u(T,"frames",!1);if(!this.textureManager.exists(p))return console.warn('Texture "%s" not found',p),R;var L=this.textureManager.get(p);if(!L)return R;A&&L.has(A)&&R.push({key:p,frame:A}),P||(M===-1&&(M=L.frameTotal-2),P=v(C,M));for(var F=0;F<P.length;F++){var w=P[F];L.has(w)?R.push({key:p,frame:w}):console.warn('Frame "%s" not found in texture "%s"',w,p)}return R},get:function(p){return this.anims.get(p)},getAnimsFromTexture:function(p){for(var T=this.textureManager.get(p),C=T.key,M=this.anims.getArray(),A=[],R=0;R<M.length;R++)for(var P=M[R],L=P.frames,F=0;F<L.length;F++)if(L[F].textureKey===C){A.push(P.key);break}return A},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(r.PAUSE_ALL)),this},play:function(p,T){Array.isArray(T)||(T=[T]);for(var C=0;C<T.length;C++)T[C].anims.play(p);return this},staggerPlay:function(p,T,C,M){C===void 0&&(C=0),M===void 0&&(M=!0),Array.isArray(T)||(T=[T]);var A=T.length;M||A--;for(var R=0;R<T.length;R++){var P=C<0?Math.abs(C)*(A-R):C*R;T[R].anims.playAfterDelay(p,P)}return this},remove:function(p){var T=this.get(p);return T&&(this.emit(r.REMOVE_ANIMATION,p,T),this.anims.delete(p),this.removeMix(p)),T},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(r.RESUME_ALL)),this},toJSON:function(p){var T={anims:[],globalTimeScale:this.globalTimeScale};return p!==void 0&&p!==""?T.anims.push(this.anims.get(p).toJSON()):this.anims.each(function(C,M){T.anims.push(M.toJSON())}),T},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});h.exports=g},9674:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(42099),l=t(30976),i=t(83419),s=t(90330),r=t(74943),o=t(95540),a=new i({initialize:function(f){this.parent=f,this.animationManager=f.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(u){var f=this.parent;if(u===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,f;Array.isArray(u)||(u=[u]);for(var v=0;v<u.length;v++){var c=u[v];this.nextAnim?this.nextAnimsQueue.push(c):this.nextAnim=c}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(u){this.isPlaying&&this.stop();var f=this.animationManager,v=typeof u=="string"?u:o(u,"key",null),c=this.exists(v)?this.get(v):f.get(v);if(!c)console.warn("Missing animation: "+v);else{this.currentAnim=c;var g=c.getTotalFrames(),p=o(u,"frameRate",c.frameRate),T=o(u,"duration",c.duration);c.calculateDuration(this,g,T,p),this.delay=o(u,"delay",c.delay),this.repeat=o(u,"repeat",c.repeat),this.repeatDelay=o(u,"repeatDelay",c.repeatDelay),this.yoyo=o(u,"yoyo",c.yoyo),this.showBeforeDelay=o(u,"showBeforeDelay",c.showBeforeDelay),this.showOnStart=o(u,"showOnStart",c.showOnStart),this.hideOnComplete=o(u,"hideOnComplete",c.hideOnComplete),this.skipMissedFrames=o(u,"skipMissedFrames",c.skipMissedFrames),this.randomFrame=o(u,"randomFrame",c.randomFrame),this.timeScale=o(u,"timeScale",this.timeScale);var C=o(u,"startFrame",0);C>g&&(C=0),this.randomFrame&&(C=l(0,g-1));var M=c.frames[C];C===0&&!this.forward&&(M=c.getLastFrame()),this.currentFrame=M}return this.parent},pause:function(u){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),u!==void 0&&this.setCurrentFrame(u),this.parent},resume:function(u){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),u!==void 0&&this.setCurrentFrame(u),this.parent},playAfterDelay:function(u,f){if(!this.isPlaying)this.delayCounter=f,this.play(u,!0);else{var v=this.nextAnim,c=this.nextAnimsQueue;v&&c.unshift(v),this.nextAnim=u,this._pendingStop=1,this._pendingStopValue=f}return this.parent},playAfterRepeat:function(u,f){if(f===void 0&&(f=1),!this.isPlaying)this.play(u);else{var v=this.nextAnim,c=this.nextAnimsQueue;v&&c.unshift(v),this.repeatCounter!==-1&&f>this.repeatCounter&&(f=this.repeatCounter),this.nextAnim=u,this._pendingStop=2,this._pendingStopValue=f}return this.parent},play:function(u,f){f===void 0&&(f=!1);var v=this.currentAnim,c=this.parent,g=typeof u=="string"?u:u.key;if(f&&this.isPlaying&&v.key===g)return c;if(v&&this.isPlaying){var p=this.animationManager.getMix(v.key,u);if(p>0)return this.playAfterDelay(u,p)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(u)},playReverse:function(u,f){f===void 0&&(f=!1);var v=typeof u=="string"?u:u.key;return f&&this.isPlaying&&this.currentAnim.key===v?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(u))},startAnimation:function(u){this.load(u);var f=this.currentAnim,v=this.parent;return f&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,f.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)),v},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(r.ANIMATION_START)},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(u,f){var v=this.currentAnim;if(v){var c=this.currentFrame,g=this.parent,p=c.textureFrame;g.emit(u,v,c,g,p),f&&g.emit(f+v.key,v,c,g,p)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var u=this.currentFrame;if(!u)return 0;var f=u.progress;return this.inReverse&&(f*=-1),f},setProgress:function(u){return this.forward||(u=1-u),this.setCurrentFrame(this.currentAnim.getFrameByProgress(u)),this.parent},setRepeat:function(u){return this.repeatCounter=u===-1?Number.MAX_VALUE:u,this.parent},globalRemove:function(u,f){f===void 0&&(f=this.currentAnim),this.isPlaying&&f.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(u,f){u===void 0&&(u=!1),f===void 0&&(f=!1);var v=this.currentAnim,c=this.parent;return v?(f&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),v.getFirstTick(this),this.emitEvents(r.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!u,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(v.frames[0]),this.parent):c},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var u=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(u)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var u=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(u)}return this.parent},stopAfterDelay:function(u){return this._pendingStop=1,this._pendingStopValue=u,this.parent},stopAfterRepeat:function(u){return u===void 0&&(u=1),this.repeatCounter!==-1&&u>this.repeatCounter&&(u=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=u,this.parent},stopOnFrame:function(u){return this._pendingStop=3,this._pendingStopValue=u,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(u,f){var v=this.currentAnim;if(!(!this.isPlaying||!v||v.paused)){if(this.accumulator+=f*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=f,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?v.nextFrame(this):v.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var c=0;do this.forward?v.nextFrame(this):v.previousFrame(this),c++;while(this.isPlaying&&this.accumulator>this.nextTick&&c<60)}}},setCurrentFrame:function(u){var f=this.parent;return this.currentFrame=u,f.texture=u.frame.texture,f.frame=u.frame,f.isCropped&&f.frame.updateCropUVs(f._crop,f.flipX,f.flipY),u.setAlpha&&(f.alpha=u.alpha),f.setSizeToFrame(),f._originComponent&&(u.frame.customPivot?f.setOrigin(u.frame.pivotX,u.frame.pivotY):f.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(r.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===u&&this.stop()),f},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(u){return this.anims?this.anims.get(u):null},exists:function(u){return this.anims?this.anims.has(u):!1},create:function(u){var f=u.key,v=!1;return f&&(v=this.get(f),v?console.warn("Animation key already exists: "+f):(v=new e(this,f,u),this.anims||(this.anims=new s),this.anims.set(f,v))),v},createFromAseprite:function(u,f){return this.animationManager.createFromAseprite(u,f,this.parent)},generateFrameNames:function(u,f){return this.animationManager.generateFrameNames(u,f)},generateFrameNumbers:function(u,f){return this.animationManager.generateFrameNumbers(u,f)},remove:function(u){var f=this.get(u);return f&&(this.currentAnim===f&&this.stop(),this.anims.delete(u)),f},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}}});h.exports=a},57090:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="add"},25312:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="animationcomplete"},89580:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="animationcomplete-"},52860:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="animationrepeat"},63850:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="animationrestart"},99085:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="animationstart"},28087:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="animationstop"},1794:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="animationupdate"},52562:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pauseall"},57953:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="remove"},68339:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resumeall"},74943:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}},2161:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(90330),i=t(50792),s=t(24736),r=new e({initialize:function(){this.entries=new l,this.events=new i},add:function(o,a){return this.entries.set(o,a),this.events.emit(s.ADD,this,o,a),this},has:function(o){return this.entries.has(o)},exists:function(o){return this.entries.has(o)},get:function(o){return this.entries.get(o)},remove:function(o){var a=this.get(o);return a&&(this.entries.delete(o),this.events.emit(s.REMOVE,this,o,a.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});h.exports=r},24047:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(2161),l=t(83419),i=t(8443),s=new l({initialize:function(o){this.game=o,this.binary=new e,this.bitmapFont=new e,this.json=new e,this.physics=new e,this.shader=new e,this.audio=new e,this.video=new e,this.text=new e,this.html=new e,this.obj=new e,this.tilemap=new e,this.xml=new e,this.custom={},this.game.events.once(i.DESTROY,this.destroy,this)},addCustom:function(r){return this.custom.hasOwnProperty(r)||(this.custom[r]=new e),this.custom[r]},destroy:function(){for(var r=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],o=0;o<r.length;o++)this[r[o]].destroy(),this[r[o]]=null;for(var a in this.custom)this.custom[a].destroy();this.custom=null,this.game=null}});h.exports=s},51464:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="add"},59261:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="remove"},24736:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={ADD:t(51464),REMOVE:t(59261)}},83388:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}},71911:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(31401),i=t(39506),s=t(50792),r=t(19715),o=t(87841),a=t(61340),u=t(80333),f=t(26099),v=new e({Extends:s,Mixins:[l.AlphaSingle,l.Visible],initialize:function(g,p,T,C){g===void 0&&(g=0),p===void 0&&(p=0),T===void 0&&(T=0),C===void 0&&(C=0),s.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new o,this.dirty=!0,this._x=g,this._y=p,this._width=T,this._height=C,this._bounds=new o,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new a,this.matrixCombined=new a,this.matrixExternal=new a,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new f(T/2,C/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.forceComposite=!1,this.renderRoundPixels=!0},addToRenderList:function(c){this.renderList.push(c)},setOrigin:function(c,g){return c===void 0&&(c=.5),g===void 0&&(g=c),this.originX=c,this.originY=g,this},getScroll:function(c,g,p){p===void 0&&(p=new f);var T=this.width*.5,C=this.height*.5;return p.x=c-T,p.y=g-C,this.useBounds&&(p.x=this.clampX(p.x),p.y=this.clampY(p.y)),p},centerOnX:function(c){var g=this.width*.5;return this.midPoint.x=c,this.scrollX=c-g,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(c){var g=this.height*.5;return this.midPoint.y=c,this.scrollY=c-g,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(c,g){return this.centerOnX(c),this.centerOnY(g),this},centerToBounds:function(){if(this.useBounds){var c=this._bounds,g=this.width*.5,p=this.height*.5;this.midPoint.set(c.centerX,c.centerY),this.scrollX=c.centerX-g,this.scrollY=c.centerY-p}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(c){if(this.disableCull)return c;var g=this.matrix.matrix,p=g[0],T=g[1],C=g[2],M=g[3],A=p*M-T*C;if(!A)return c;var R=this.scrollX,P=this.scrollY,L=this.width,F=this.height,w=this.y,O=w+F,B=this.x,I=B+L,D=this.culledObjects,N=c.length;A=1/A,D.length=0;for(var z=0;z<N;++z){var V=c[z];if(!V.hasOwnProperty("width")||V.parentContainer){D.push(V);continue}var U=V.width,G=V.height,b=V.x-R*V.scrollFactorX-U*V.originX,Y=V.y-P*V.scrollFactorY-G*V.originY,W=b*p+Y*C,H=b*T+Y*M,X=(b+U)*p+(Y+G)*C,K=(b+U)*T+(Y+G)*M;X>B&&W<I&&K>w&&H<O&&D.push(V)}return D},getWorldPoint:function(c,g,p){p===void 0&&(p=new f);var T=this.matrixCombined.matrix,C=T[0],M=T[1],A=T[2],R=T[3],P=T[4],L=T[5],F=C*R-M*A;if(!F)return p.x=c,p.y=g,p;F=1/F;var w=R*F,O=-M*F,B=-A*F,I=C*F,D=(A*L-R*P)*F,N=(M*P-C*L)*F;return p.x=c*w+g*B+D,p.y=c*O+g*I+N,p},ignore:function(c){var g=this.id;Array.isArray(c)||(c=[c]);for(var p=0;p<c.length;p++){var T=c[p];Array.isArray(T)?this.ignore(T):T.isParent?this.ignore(T.getChildren()):T.cameraFilter|=g}return this},clampX:function(c){var g=this._bounds,p=this.displayWidth,T=g.x+(p-this.width)/2,C=Math.max(T,T+g.width-p);return c<T?c=T:c>C&&(c=C),c},clampY:function(c){var g=this._bounds,p=this.displayHeight,T=g.y+(p-this.height)/2,C=Math.max(T,T+g.height-p);return c<T?c=T:c>C&&(c=C),c},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(c){return c===void 0&&(c=0),this.rotation=i(c),this},setBackgroundColor:function(c){return c===void 0&&(c="rgba(0,0,0,0)"),this.backgroundColor=u(c),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(c,g,p,T,C){return C===void 0&&(C=!1),this._bounds.setTo(c,g,p,T),this.dirty=!0,this.useBounds=!0,C?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},setForceComposite:function(c){return this.forceComposite=c,this},getBounds:function(c){c===void 0&&(c=new o);var g=this._bounds;return c.setTo(g.x,g.y,g.width,g.height),c},setName:function(c){return c===void 0&&(c=""),this.name=c,this},setPosition:function(c,g){return g===void 0&&(g=c),this.x=c,this.y=g,this},setRotation:function(c){return c===void 0&&(c=0),this.rotation=c,this},setRoundPixels:function(c){return this.roundPixels=c,this},setScene:function(c,g){g===void 0&&(g=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=c,this.isSceneCamera=g;var p=c.sys;return this.sceneManager=p.game.scene,this.scaleManager=p.scale,this.cameraManager=p.cameras,this.updateSystem(),this},setScroll:function(c,g){return g===void 0&&(g=c),this.scrollX=c,this.scrollY=g,this},setSize:function(c,g){return g===void 0&&(g=c),this.width=c,this.height=g,this},setViewport:function(c,g,p,T){return this.x=c,this.y=g,this.width=p,this.height=T,this},setZoom:function(c,g){return c===void 0&&(c=1),g===void 0&&(g=c),c===0&&(c=.001),g===0&&(g=.001),this.zoomX=c,this.zoomY=g,this},setMask:function(c,g){return g===void 0&&(g=!0),this.mask=c,this._maskCamera=g?this.cameraManager.default:this,this},clearMask:function(c){return c===void 0&&(c=!1),c&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var c={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&&(c.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),c},update:function(){},setIsSceneCamera:function(c){return this.isSceneCamera=c,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var c=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,g=this.sceneManager;c&&!this._customViewport?g.customViewports++:!c&&this._customViewport&&g.customViewports--,this.dirty=!0,this._customViewport=c}},destroy:function(){this.emit(r.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.matrixCombined.destroy(),this.matrixExternal.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(c){this._x=c,this.updateSystem()}},y:{get:function(){return this._y},set:function(c){this._y=c,this.updateSystem()}},width:{get:function(){return this._width},set:function(c){this._width=c,this.updateSystem()}},height:{get:function(){return this._height},set:function(c){this._height=c,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(c){c!==this._scrollX&&(this._scrollX=c,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(c){c!==this._scrollY&&(this._scrollY=c,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(c){this._zoomX=c,this._zoomY=c,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(c){this._zoomX=c,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(c){this._zoomY=c,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(c){this._rotation=c,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}}});h.exports=v},38058:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(71911),l=t(67502),i=t(45319),s=t(83419),r=t(31401),o=t(20052),a=t(19715),u=t(28915),f=t(87841),v=t(26099),c=new s({Extends:e,initialize:function(p,T,C,M){e.call(this,p,T,C,M),this.filters={internal:new r.FilterList(this),external:new r.FilterList(this)},this.isObjectInversion=!1,this.inputEnabled=!0,this.fadeEffect=new o.Fade(this),this.flashEffect=new o.Flash(this),this.shakeEffect=new o.Shake(this),this.panEffect=new o.Pan(this),this.rotateToEffect=new o.RotateTo(this),this.zoomEffect=new o.Zoom(this),this.lerp=new v(1,1),this.followOffset=new v,this.deadzone=null,this._follow=null},setDeadzone:function(g,p){if(g===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=g,this.deadzone.height=p):this.deadzone=new f(0,0,g,p),this._follow){var T=this.width/2,C=this.height/2,M=this._follow.x-this.followOffset.x,A=this._follow.y-this.followOffset.y;this.midPoint.set(M,A),this.scrollX=M-T,this.scrollY=A-C}l(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(g,p,T,C,M,A){return this.fadeEffect.start(!1,g,p,T,C,!0,M,A)},fadeOut:function(g,p,T,C,M,A){return this.fadeEffect.start(!0,g,p,T,C,!0,M,A)},fadeFrom:function(g,p,T,C,M,A,R){return this.fadeEffect.start(!1,g,p,T,C,M,A,R)},fade:function(g,p,T,C,M,A,R){return this.fadeEffect.start(!0,g,p,T,C,M,A,R)},flash:function(g,p,T,C,M,A,R){return this.flashEffect.start(g,p,T,C,M,A,R)},shake:function(g,p,T,C,M){return this.shakeEffect.start(g,p,T,C,M)},pan:function(g,p,T,C,M,A,R){return this.panEffect.start(g,p,T,C,M,A,R)},rotateTo:function(g,p,T,C,M,A,R){return this.rotateToEffect.start(g,p,T,C,M,A,R)},zoomTo:function(g,p,T,C,M,A){return this.zoomEffect.start(g,p,T,C,M,A)},preRender:function(){this.renderList.length=0;var g=this.width,p=this.height,T=g*.5,C=p*.5,M=this.zoomX,A=this.zoomY;this.renderRoundPixels=this.roundPixels&&Number.isInteger(M)&&Number.isInteger(A);var R=g*this.originX,P=p*this.originY,L=this._follow,F=this.deadzone,w=this.scrollX,O=this.scrollY;F&&l(F,this.midPoint.x,this.midPoint.y);var B=!1;if(L&&!this.panEffect.isRunning){var I=this.lerp,D=L.x-this.followOffset.x,N=L.y-this.followOffset.y;F?(D<F.x?w=u(w,w-(F.x-D),I.x):D>F.right&&(w=u(w,w+(D-F.right),I.x)),N<F.y?O=u(O,O-(F.y-N),I.y):N>F.bottom&&(O=u(O,O+(N-F.bottom),I.y))):(w=u(w,D-R,I.x),O=u(O,N-P,I.y)),B=!0}this.useBounds&&(w=this.clampX(w),O=this.clampY(O)),this.scrollX=w,this.scrollY=O;var z=w+T,V=O+C;this.midPoint.set(z,V);var U=g/M,G=p/A,b=z-U/2,Y=V-G/2;this.worldView.setTo(b,Y,U,G);var W=this.matrix,H=this.matrixExternal;this.isObjectInversion?(W.loadIdentity(),W.translate(R,P),W.scale(M,A),W.rotate(this.rotation),W.translate(-w-R,-O-P)):(W.applyITRS(R,P,this.rotation,M,A),W.translate(-w-R,-O-P)),H.applyITRS(this.x,this.y,0,1,1),this.shakeEffect.preRender(),H.multiply(W,this.matrixCombined),B&&this.emit(a.FOLLOW_UPDATE,this,L)},getViewMatrix:function(g){return g||this.forceComposite||this.filters.external.length>0||this.filters.internal.length>0?this.matrix:this.matrixCombined},setLerp:function(g,p){return g===void 0&&(g=1),p===void 0&&(p=g),this.lerp.set(g,p),this},setFollowOffset:function(g,p){return g===void 0&&(g=0),p===void 0&&(p=0),this.followOffset.set(g,p),this},startFollow:function(g,p,T,C,M,A){p===void 0&&(p=!1),T===void 0&&(T=1),C===void 0&&(C=T),M===void 0&&(M=0),A===void 0&&(A=M),this._follow=g,this.roundPixels=p,T=i(T,0,1),C=i(C,0,1),this.lerp.set(T,C),this.followOffset.set(M,A);var R=this.width/2,P=this.height/2,L=g.x-M,F=g.y-A;return this.midPoint.set(L,F),this.scrollX=L-R,this.scrollY=F-P,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(g,p){this.visible&&(this.rotateToEffect.update(g,p),this.panEffect.update(g,p),this.zoomEffect.update(g,p),this.shakeEffect.update(g,p),this.flashEffect.update(g,p),this.fadeEffect.update(g,p))},destroy:function(){this.resetFX(),this.filters.internal.destroy(),this.filters.external.destroy(),e.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});h.exports=c},32743:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(38058),l=t(83419),i=t(95540),s=t(37277),r=t(37303),o=t(97480),a=t(44594),u=new l({initialize:function(v){this.scene=v,this.systems=v.sys,this.roundPixels=v.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,v.sys.events.once(a.BOOT,this.boot,this),v.sys.events.on(a.START,this.start,this)},boot:function(){var f=this.systems;f.settings.cameras?this.fromJSON(f.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new e(0,0,f.scale.width,f.scale.height).setScene(this.scene),f.game.scale.on(o.RESIZE,this.onResize,this),this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){if(!this.main){var f=this.systems;f.settings.cameras?this.fromJSON(f.settings.cameras):this.add(),this.main=this.cameras[0]}var v=this.systems.events;v.on(a.UPDATE,this.update,this),v.once(a.SHUTDOWN,this.shutdown,this)},add:function(f,v,c,g,p,T){f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=this.scene.sys.scale.width),g===void 0&&(g=this.scene.sys.scale.height),p===void 0&&(p=!1),T===void 0&&(T="");var C=new e(f,v,c,g);return C.setName(T),C.setScene(this.scene),C.setRoundPixels(this.roundPixels),C.id=this.getNextID(),this.cameras.push(C),p&&(this.main=C),C},addExisting:function(f,v){v===void 0&&(v=!1);var c=this.cameras.indexOf(f);return c===-1?(f.id=this.getNextID(),f.setRoundPixels(this.roundPixels),this.cameras.push(f),v&&(this.main=f),f):null},getNextID:function(){for(var f=this.cameras,v=1,c=0;c<32;c++){for(var g=!1,p=0;p<f.length;p++){var T=f[p];if(T&&T.id===v){g=!0;continue}}if(g)v=v<<1;else return v}return 0},getTotal:function(f){f===void 0&&(f=!1);for(var v=0,c=this.cameras,g=0;g<c.length;g++){var p=c[g];(!f||f&&p.visible)&&v++}return v},fromJSON:function(f){Array.isArray(f)||(f=[f]);for(var v=this.scene.sys.scale.width,c=this.scene.sys.scale.height,g=0;g<f.length;g++){var p=f[g],T=i(p,"x",0),C=i(p,"y",0),M=i(p,"width",v),A=i(p,"height",c),R=this.add(T,C,M,A);R.name=i(p,"name",""),R.zoom=i(p,"zoom",1),R.rotation=i(p,"rotation",0),R.scrollX=i(p,"scrollX",0),R.scrollY=i(p,"scrollY",0),R.roundPixels=i(p,"roundPixels",!1),R.visible=i(p,"visible",!0);var P=i(p,"backgroundColor",!1);P&&R.setBackgroundColor(P);var L=i(p,"bounds",null);if(L){var F=i(L,"x",0),w=i(L,"y",0),O=i(L,"width",v),B=i(L,"height",c);R.setBounds(F,w,O,B)}}return this},getCamera:function(f){for(var v=this.cameras,c=0;c<v.length;c++)if(v[c].name===f)return v[c];return null},getCamerasBelowPointer:function(f){for(var v=this.cameras,c=f.x,g=f.y,p=[],T=0;T<v.length;T++){var C=v[T];C.visible&&C.inputEnabled&&r(C,c,g)&&p.unshift(C)}return p},remove:function(f,v){v===void 0&&(v=!0),Array.isArray(f)||(f=[f]);for(var c=0,g=this.cameras,p=0;p<f.length;p++){var T=g.indexOf(f[p]);T!==-1&&(v?g[T].destroy():g[T].renderList=[],g.splice(T,1),c++)}return!this.main&&g[0]&&(this.main=g[0]),c},render:function(f,v){for(var c=this.scene,g=this.cameras,p=0;p<g.length;p++){var T=g[p];if(T.visible&&T.alpha>0){T.preRender();var C=this.getVisibleChildren(v.getChildren(),T);f.render(c,C,T)}}},getVisibleChildren:function(f,v){return f.filter(function(c){return c.willRender(v)})},resetAll:function(){for(var f=0;f<this.cameras.length;f++)this.cameras[f].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(f,v){for(var c=0;c<this.cameras.length;c++)this.cameras[c].update(f,v)},onResize:function(f,v,c,g,p){for(var T=0;T<this.cameras.length;T++){var C=this.cameras[T];C._x===0&&C._y===0&&C._width===g&&C._height===p&&C.setSize(v.width,v.height)}},resize:function(f,v){for(var c=0;c<this.cameras.length;c++)this.cameras[c].setSize(f,v)},shutdown:function(){this.main=void 0;for(var f=0;f<this.cameras.length;f++)this.cameras[f].destroy();this.cameras=[];var v=this.systems.events;v.off(a.UPDATE,this.update,this),v.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(a.START,this.start,this),this.systems.events.off(a.DESTROY,this.destroy,this),this.systems.game.scale.off(o.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});s.register("CameraManager",u,"cameras"),h.exports=u},5020:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(19715),s=new l({initialize:function(o){this.camera=o,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,o,a,u,f,v,c,g){if(r===void 0&&(r=!0),o===void 0&&(o=1e3),a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=!1),c===void 0&&(c=null),g===void 0&&(g=this.camera.scene),!v&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=o,this.direction=r,this.progress=0,this.red=a,this.green=u,this.blue=f,this.alpha=r?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=c,this._onUpdateScope=g;var p=r?i.FADE_OUT_START:i.FADE_IN_START;return this.camera.emit(p,this.camera,this,o,a,u,f),this.camera},update:function(r,o){this.isRunning&&(this._elapsed+=o,this.progress=e(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 o=this.camera;return r.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",r.fillRect(o.x,o.y,o.width,o.height),!0},postRenderWebGL:function(){return this.isRunning||this.isComplete},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var r=this.direction?i.FADE_OUT_COMPLETE:i.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}});h.exports=s},10662:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(19715),s=new l({initialize:function(o){this.camera=o,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,o,a,u,f,v,c){return r===void 0&&(r=250),o===void 0&&(o=255),a===void 0&&(a=255),u===void 0&&(u=255),f===void 0&&(f=!1),v===void 0&&(v=null),c===void 0&&(c=this.camera.scene),!f&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=r,this.progress=0,this.red=o,this.green=a,this.blue=u,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=v,this._onUpdateScope=c,this.camera.emit(i.FLASH_START,this.camera,this,r,o,a,u),this.camera)},update:function(r,o){this.isRunning&&(this._elapsed+=o,this.progress=e(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 o=this.camera;return r.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",r.fillRect(o.x,o.y,o.width,o.height),!0},postRenderWebGL:function(){return this.isRunning},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(i.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});h.exports=s},20359:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(62640),s=t(19715),r=t(26099),o=new l({initialize:function(u){this.camera=u,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(a,u,f,v,c,g,p){f===void 0&&(f=1e3),v===void 0&&(v=i.Linear),c===void 0&&(c=!1),g===void 0&&(g=null),p===void 0&&(p=this.camera.scene);var T=this.camera;return!c&&this.isRunning||(this.isRunning=!0,this.duration=f,this.progress=0,this.source.set(T.scrollX,T.scrollY),this.destination.set(a,u),T.getScroll(a,u,this.current),typeof v=="string"&&i.hasOwnProperty(v)?this.ease=i[v]:typeof v=="function"&&(this.ease=v),this._elapsed=0,this._onUpdate=g,this._onUpdateScope=p,this.camera.emit(s.PAN_START,this.camera,this,f,a,u)),T},update:function(a,u){if(this.isRunning){this._elapsed+=u;var f=e(this._elapsed/this.duration,0,1);this.progress=f;var v=this.camera;if(this._elapsed<this.duration){var c=this.ease(f);v.getScroll(this.destination.x,this.destination.y,this.current);var g=this.source.x+(this.current.x-this.source.x)*c,p=this.source.y+(this.current.y-this.source.y)*c;v.setScroll(g,p),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,v,f,g,p)}else v.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,v,f,v.scrollX,v.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(s.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}});h.exports=o},34208:(h,d,t)=>{/**
|
||
* @author Jason Nicholls <nicholls.jason@gmail.com>
|
||
* @copyright 2018 Photon Storm Ltd.
|
||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(19715),s=t(62640),r=t(86554),o=new l({initialize:function(u){this.camera=u,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(a,u,f,v,c,g,p){f===void 0&&(f=1e3),v===void 0&&(v=s.Linear),c===void 0&&(c=!1),g===void 0&&(g=null),p===void 0&&(p=this.camera.scene),u===void 0&&(u=!1);var T=this.camera;if(!c&&this.isRunning)return T;if(this.shortestPath=u,this.isRunning=!0,this.duration=f,this.progress=0,this.source=T.rotation,this.destination=a,typeof v=="string"&&s.hasOwnProperty(v)?this.ease=s[v]:typeof v=="function"&&(this.ease=v),this._elapsed=0,this._onUpdate=g,this._onUpdateScope=p,this.shortestPath){var C=r(this.destination-this.source);this.destination=this.source+C,this.clockwise=C>=0}else this.clockwise=this.destination>=this.source;return this.camera.emit(i.ROTATE_START,this.camera,this,f,this.destination),T},update:function(a,u){if(this.isRunning){this._elapsed+=u;var f=e(this._elapsed/this.duration,0,1);this.progress=f;var v=this.camera;if(this._elapsed<this.duration){var c=this.ease(f),g=this.source+c*(this.destination-this.source);v.rotation=g,this.current=g,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,v,f,g)}else v.rotation=this.destination,this.current=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,v,f,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(i.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}});h.exports=o},30330:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(19715),s=t(26099),r=new l({initialize:function(a){this.camera=a,this.isRunning=!1,this.duration=0,this.intensity=new s,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(o,a,u,f,v){return o===void 0&&(o=100),a===void 0&&(a=.05),u===void 0&&(u=!1),f===void 0&&(f=null),v===void 0&&(v=this.camera.scene),!u&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=o,this.progress=0,typeof a=="number"?this.intensity.set(a):this.intensity.set(a.x,a.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=f,this._onUpdateScope=v,this.camera.emit(i.SHAKE_START,this.camera,this,o,a),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(o,a){if(this.isRunning)if(this._elapsed+=a,this.progress=e(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var u=this.intensity,f=this.camera.width,v=this.camera.height,c=this.camera.zoom;this._offsetX=(Math.random()*u.x*f*2-u.x*f)*c,this._offsetY=(Math.random()*u.y*v*2-u.y*v)*c,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(i.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}});h.exports=r},45641:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(62640),s=t(19715),r=new l({initialize:function(a){this.camera=a,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(o,a,u,f,v,c){a===void 0&&(a=1e3),u===void 0&&(u=i.Linear),f===void 0&&(f=!1),v===void 0&&(v=null),c===void 0&&(c=this.camera.scene);var g=this.camera;return!f&&this.isRunning||(this.isRunning=!0,this.duration=a,this.progress=0,this.source=g.zoom,this.destination=o,typeof u=="string"&&i.hasOwnProperty(u)?this.ease=i[u]:typeof u=="function"&&(this.ease=u),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=c,this.camera.emit(s.ZOOM_START,this.camera,this,a,o)),g},update:function(o,a){this.isRunning&&(this._elapsed+=a,this.progress=e(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(s.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});h.exports=r},20052:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}},16438:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="cameradestroy"},32726:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerafadeincomplete"},87807:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerafadeinstart"},45917:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerafadeoutcomplete"},95666:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerafadeoutstart"},47056:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="cameraflashcomplete"},91261:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="cameraflashstart"},45047:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="followupdate"},81927:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerapancomplete"},74264:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerapanstart"},54419:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="postrender"},79330:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="prerender"},93183:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerarotatecomplete"},80112:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerarotatestart"},62252:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerashakecomplete"},86017:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerashakestart"},539:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerazoomcomplete"},51892:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="camerazoomstart"},19715:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}},63091:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(35154),i=new e({initialize:function(r){this.camera=l(r,"camera",null),this.left=l(r,"left",null),this.right=l(r,"right",null),this.up=l(r,"up",null),this.down=l(r,"down",null),this.zoomIn=l(r,"zoomIn",null),this.zoomOut=l(r,"zoomOut",null),this.zoomSpeed=l(r,"zoomSpeed",.01),this.minZoom=l(r,"minZoom",.001),this.maxZoom=l(r,"maxZoom",1e3),this.speedX=0,this.speedY=0;var o=l(r,"speed",null);typeof o=="number"?(this.speedX=o,this.speedY=o):(this.speedX=l(r,"speed.x",0),this.speedY=l(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(s){return this.camera=s,this},update:function(s){if(this.active){s===void 0&&(s=1);var r=this.camera;this.up&&this.up.isDown?r.scrollY-=this.speedY*s|0:this.down&&this.down.isDown&&(r.scrollY+=this.speedY*s|0),this.left&&this.left.isDown?r.scrollX-=this.speedX*s|0:this.right&&this.right.isDown&&(r.scrollX+=this.speedX*s|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}});h.exports=i},58818:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(35154),i=new e({initialize:function(r){this.camera=l(r,"camera",null),this.left=l(r,"left",null),this.right=l(r,"right",null),this.up=l(r,"up",null),this.down=l(r,"down",null),this.zoomIn=l(r,"zoomIn",null),this.zoomOut=l(r,"zoomOut",null),this.zoomSpeed=l(r,"zoomSpeed",.01),this.minZoom=l(r,"minZoom",.001),this.maxZoom=l(r,"maxZoom",1e3),this.accelX=0,this.accelY=0;var o=l(r,"acceleration",null);typeof o=="number"?(this.accelX=o,this.accelY=o):(this.accelX=l(r,"acceleration.x",0),this.accelY=l(r,"acceleration.y",0)),this.dragX=0,this.dragY=0;var a=l(r,"drag",null);typeof a=="number"?(this.dragX=a,this.dragY=a):(this.dragX=l(r,"drag.x",0),this.dragY=l(r,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var u=l(r,"maxSpeed",null);typeof u=="number"?(this.maxSpeedX=u,this.maxSpeedY=u):(this.maxSpeedX=l(r,"maxSpeed.x",0),this.maxSpeedY=l(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(s){return this.camera=s,this},update:function(s){if(this.active){s===void 0&&(s=1);var r=this.camera;this._speedX>0?(this._speedX-=this.dragX*s,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*s,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*s,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*s,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*s|0),this._speedY!==0&&(r.scrollY-=this._speedY*s|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}});h.exports=i},38865:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}},26638:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Controls:t(38865),Scene2D:t(87969)}},8054:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={VERSION:"4.0.0 RC6",LOG_VERSION:"v400",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};h.exports=e},69547:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(8054),i=t(42363),s=t(82264),r=t(95540),o=t(35154),a=t(41212),u=t(29747),f=t(75508),v=t(80333),c=new e({initialize:function(p){p===void 0&&(p={});var T=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],C="#ffffff",M=o(p,"scale",null);this.width=o(M,"width",1024,p),this.height=o(M,"height",768,p),this.zoom=o(M,"zoom",1,p),this.parent=o(M,"parent",void 0,p),this.scaleMode=o(M,M?"mode":"scaleMode",0,p),this.expandParent=o(M,"expandParent",!0,p),this.autoRound=o(M,"autoRound",!1,p),this.autoCenter=o(M,"autoCenter",0,p),this.resizeInterval=o(M,"resizeInterval",500,p),this.fullscreenTarget=o(M,"fullscreenTarget",null,p),this.minWidth=o(M,"min.width",0,p),this.maxWidth=o(M,"max.width",0,p),this.minHeight=o(M,"min.height",0,p),this.maxHeight=o(M,"max.height",0,p),this.snapWidth=o(M,"snap.width",0,p),this.snapHeight=o(M,"snap.height",0,p),this.renderType=o(p,"type",l.AUTO),this.canvas=o(p,"canvas",null),this.context=o(p,"context",null),this.canvasStyle=o(p,"canvasStyle",null),this.customEnvironment=o(p,"customEnvironment",!1),this.sceneConfig=o(p,"scene",null),this.seed=o(p,"seed",[(Date.now()*Math.random()).toString()]),f.RND=new f.RandomDataGenerator(this.seed),this.gameTitle=o(p,"title",""),this.gameURL=o(p,"url","https://phaser.io/"+l.LOG_VERSION),this.gameVersion=o(p,"version",""),this.autoFocus=o(p,"autoFocus",!0),this.stableSort=o(p,"stableSort",-1),this.stableSort===-1&&(this.stableSort=s.browser.es2019?1:0),s.features.stableSort=this.stableSort,this.domCreateContainer=o(p,"dom.createContainer",!1),this.domPointerEvents=o(p,"dom.pointerEvents","none"),this.inputKeyboard=o(p,"input.keyboard",!0),this.inputKeyboardEventTarget=o(p,"input.keyboard.target",window),this.inputKeyboardCapture=o(p,"input.keyboard.capture",[]),this.inputMouse=o(p,"input.mouse",!0),this.inputMouseEventTarget=o(p,"input.mouse.target",null),this.inputMousePreventDefaultDown=o(p,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=o(p,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=o(p,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=o(p,"input.mouse.preventDefaultWheel",!0),this.inputTouch=o(p,"input.touch",s.input.touch),this.inputTouchEventTarget=o(p,"input.touch.target",null),this.inputTouchCapture=o(p,"input.touch.capture",!0),this.inputActivePointers=o(p,"input.activePointers",1),this.inputSmoothFactor=o(p,"input.smoothFactor",0),this.inputWindowEvents=o(p,"input.windowEvents",!0),this.inputGamepad=o(p,"input.gamepad",!1),this.inputGamepadEventTarget=o(p,"input.gamepad.target",window),this.disableContextMenu=o(p,"disableContextMenu",!1),this.audio=o(p,"audio",{}),this.hideBanner=o(p,"banner",null)===!1,this.hidePhaser=o(p,"banner.hidePhaser",!1),this.bannerTextColor=o(p,"banner.text",C),this.bannerBackgroundColor=o(p,"banner.background",T),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(p,"fps",null);var A=o(p,"render",null);this.autoMobileTextures=o(A,"autoMobileTextures",!0,p),this.antialias=o(A,"antialias",!0,p),this.antialiasGL=o(A,"antialiasGL",!0,p),this.mipmapFilter=o(A,"mipmapFilter","",p),this.desynchronized=o(A,"desynchronized",!1,p),this.roundPixels=o(A,"roundPixels",!1,p),this.selfShadow=o(A,"selfShadow",!1,p),this.pathDetailThreshold=o(A,"pathDetailThreshold",1,p),this.pixelArt=o(A,"pixelArt",this.zoom!==1,p),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.smoothPixelArt=o(A,"smoothPixelArt",!1,p),this.smoothPixelArt&&(this.antialias=!0,this.antialiasGL=!0,this.pixelArt=!1),this.transparent=o(A,"transparent",!1,p),this.clearBeforeRender=o(A,"clearBeforeRender",!0,p),this.preserveDrawingBuffer=o(A,"preserveDrawingBuffer",!1,p),this.premultipliedAlpha=o(A,"premultipliedAlpha",!0,p),this.skipUnreadyShaders=o(A,"skipUnreadyShaders",!1,p),this.failIfMajorPerformanceCaveat=o(A,"failIfMajorPerformanceCaveat",!1,p),this.powerPreference=o(A,"powerPreference","default",p),this.batchSize=o(A,"batchSize",16384,p),this.maxTextures=o(A,"maxTextures",-1,p),this.maxLights=o(A,"maxLights",10,p),this.renderNodes=o(A,"renderNodes",{},p);var R=o(p,"backgroundColor",0);this.backgroundColor=v(R),this.transparent&&(this.backgroundColor=v(0),this.backgroundColor.alpha=0),this.preBoot=o(p,"callbacks.preBoot",u),this.postBoot=o(p,"callbacks.postBoot",u),this.physics=o(p,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(p,"loader.baseURL",""),this.loaderPath=o(p,"loader.path",""),this.loaderMaxParallelDownloads=o(p,"loader.maxParallelDownloads",s.os.android?6:32),this.loaderCrossOrigin=o(p,"loader.crossOrigin",void 0),this.loaderResponseType=o(p,"loader.responseType",""),this.loaderAsync=o(p,"loader.async",!0),this.loaderUser=o(p,"loader.user",""),this.loaderPassword=o(p,"loader.password",""),this.loaderTimeout=o(p,"loader.timeout",0),this.loaderMaxRetries=o(p,"loader.maxRetries",2),this.loaderWithCredentials=o(p,"loader.withCredentials",!1),this.loaderImageLoadType=o(p,"loader.imageLoadType","XHR"),this.loaderLocalScheme=o(p,"loader.localScheme",["file://","capacitor://"]),this.glowQuality=o(p,"filters.glow.quality",10),this.glowDistance=o(p,"filters.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var P=o(p,"plugins",null),L=i.DefaultScene;P&&(Array.isArray(P)?this.defaultPlugins=P:a(P)&&(this.installGlobalPlugins=r(P,"global",[]),this.installScenePlugins=r(P,"scene",[]),Array.isArray(P.default)?L=P.default:Array.isArray(P.defaultMerge)&&(L=L.concat(P.defaultMerge)))),this.defaultPlugins=L;var F="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(p,"images.default",F+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(p,"images.missing",F+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=o(p,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=l.WEBGL:window.FORCE_CANVAS&&(this.renderType=l.CANVAS))}});h.exports=c},86054:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20623),l=t(27919),i=t(8054),s=t(89357),r=function(o){var a=o.config;if((a.customEnvironment||a.canvas)&&a.renderType===i.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!a.customEnvironment&&!a.canvas&&a.renderType!==i.HEADLESS)if(a.renderType===i.AUTO&&(a.renderType=s.webGL?i.WEBGL:i.CANVAS),a.renderType===i.WEBGL){if(!s.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(a.renderType===i.CANVAS){if(!s.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+a.renderType);a.antialias||l.disableSmoothing();var u=o.scale.baseSize,f=u.width,v=u.height;if(a.canvas?(o.canvas=a.canvas,o.canvas.width=f,o.canvas.height=v):o.canvas=l.create(o,f,v,a.renderType),a.canvasStyle&&(o.canvas.style=a.canvasStyle),a.antialias||e.setCrisp(o.canvas),a.renderType!==i.HEADLESS){var c,g;c=t(68627),g=t(74797),a.renderType===i.WEBGL?o.renderer=new g(o):(o.renderer=new c(o),o.context=o.renderer.gameContext)}};h.exports=r},96391:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8054),l=function(i){var s=i.config;if(!s.hideBanner){var r="WebGL";s.renderType===e.CANVAS?r="Canvas":s.renderType===e.HEADLESS&&(r="Headless");var o=s.audio,a=i.device.audio,u;if(a.webAudio&&!o.disableWebAudio?u="Web Audio":o.noAudio||!a.webAudio&&!a.audioData?u="No Audio":u="HTML5 Audio",i.device.browser.ie)window.console&&console.log("Phaser v"+e.VERSION+" / https://phaser.io");else{var f="",v=[f];if(Array.isArray(s.bannerBackgroundColor)){var c;s.bannerBackgroundColor.forEach(function(g){f=f.concat("%c "),v.push("background: "+g),c=g}),v[v.length-1]="color: "+s.bannerTextColor+"; background: "+c}else f=f.concat("%c "),v.push("color: "+s.bannerTextColor+"; background: "+s.bannerBackgroundColor);v.push("background: transparent"),s.gameTitle&&(f=f.concat(s.gameTitle),s.gameVersion&&(f=f.concat(" v"+s.gameVersion)),s.hidePhaser||(f=f.concat(" / "))),s.hidePhaser||(f=f.concat("Phaser v"+e.VERSION+" ("+r+" | "+u+")")),f=f.concat(" %c "+s.gameURL),v[0]=f,console.log.apply(console,v)}}};h.exports=l},50127:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40366),l=t(60848),i=t(24047),s=t(27919),r=t(83419),o=t(69547),a=t(83719),u=t(86054),f=t(45893),v=t(96391),c=t(82264),g=t(57264),p=t(50792),T=t(8443),C=t(7003),M=t(37277),A=t(77332),R=t(76531),P=t(60903),L=t(69442),F=t(17130),w=t(65898),O=t(51085),B=t(14747),I=new r({initialize:function(N){this.config=new o(N),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new l(this),this.textures=new F(this),this.cache=new i(this),this.registry=new f(this,new p),this.input=new C(this,this.config),this.scene=new P(this,this.config.sceneConfig),this.device=c,this.scale=new R(this,this.config),this.sound=null,this.sound=B.create(this),this.loop=new w(this,this.config.fps),this.plugins=new A(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,g(this.boot.bind(this))},boot:function(){if(!M.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),a(this),v(this),e(this.canvas,this.config.parent),this.textures.once(L.READY,this.texturesReady,this),this.events.emit(T.BOOT)},texturesReady:function(){this.events.emit(T.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)),O(this);var D=this.events;D.on(T.HIDDEN,this.onHidden,this),D.on(T.VISIBLE,this.onVisible,this),D.on(T.BLUR,this.onBlur,this),D.on(T.FOCUS,this.onFocus,this)},step:function(D,N){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var z=this.events;z.emit(T.PRE_STEP,D,N),z.emit(T.STEP,D,N),this.scene.update(D,N),z.emit(T.POST_STEP,D,N);var V=this.renderer;V.preRender(),z.emit(T.PRE_RENDER,V,D,N),this.scene.render(V),V.postRender(),z.emit(T.POST_RENDER,V,D,N)}},headlessStep:function(D,N){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var z=this.events;z.emit(T.PRE_STEP,D,N),z.emit(T.STEP,D,N),this.scene.update(D,N),z.emit(T.POST_STEP,D,N),this.scene.isProcessing=!1,z.emit(T.PRE_RENDER,null,D,N),z.emit(T.POST_RENDER,null,D,N)}},onHidden:function(){this.loop.pause(),this.events.emit(T.PAUSE)},pause:function(){var D=this.isPaused;this.isPaused=!0,D||this.events.emit(T.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(T.RESUME,this.loop.pauseDuration)},resume:function(){var D=this.isPaused;this.isPaused=!1,D&&this.events.emit(T.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(D,N){N===void 0&&(N=!1),this.pendingDestroy=!0,this.removeCanvas=D,this.noReturn=N},runDestroy:function(){this.scene.destroy(),this.events.emit(T.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(s.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}});h.exports=I},65898:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(35154),i=t(29747),s=t(43092),r=new e({initialize:function(a,u){this.game=a,this.raf=new s,this.started=!1,this.running=!1,this.minFps=l(u,"min",5),this.targetFps=l(u,"target",60),this.fpsLimit=l(u,"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=i,this.forceSetTimeOut=l(u,"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=l(u,"deltaHistory",10),this.panicMax=l(u,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=l(u,"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 o=window.performance.now();this.time=o,this.lastTime=o,this.nextFpsUpdate=o+1e3,this.framesThisSecond=0;for(var a=0;a<this.deltaSmoothingMax;a++)this.deltaHistory[a]=Math.min(this._target,this.deltaHistory[a]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(o){if(this.started)return this;this.started=!0,this.running=!0;for(var a=0;a<this.deltaSmoothingMax;a++)this.deltaHistory[a]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=o;var u=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(u,this.forceSetTimeOut,this._target)},smoothDelta:function(o){var a=this.deltaIndex,u=this.deltaHistory,f=this.deltaSmoothingMax;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,o=Math.min(o,this._target)),o>this._min&&(o=u[a],o=Math.min(o,this._min)),u[a]=o,this.deltaIndex++,this.deltaIndex>=f&&(this.deltaIndex=0);for(var v=0,c=0;c<f;c++)v+=u[c];return v/=f,v},updateFPS:function(o){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=o+1e3,this.framesThisSecond=0},stepLimitFPS:function(o){this.now=o;var a=Math.max(0,o-this.lastTime);this.rawDelta=a,this.time+=this.rawDelta,this.smoothStep&&(a=this.smoothDelta(a)),this.delta+=a,o>=this.nextFpsUpdate&&this.updateFPS(o),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(o,this.delta),this.delta=0),this.lastTime=o,this.frame++},step:function(o){this.now=o;var a=Math.max(0,o-this.lastTime);this.rawDelta=a,this.time+=this.rawDelta,this.smoothStep&&(a=this.smoothDelta(a)),this.delta=a,o>=this.nextFpsUpdate&&this.updateFPS(o),this.framesThisSecond++,this.callback(o,a),this.lastTime=o,this.frame++},tick:function(){var o=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(o):this.step(o)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(o){o===void 0&&(o=!1);var a=window.performance.now();if(!this.running){o&&(this.startTime+=-this.lastTime+(this.lastTime+a));var u=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(u,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=a+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}});h.exports=r},51085:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8443),l=function(i){var s,r=i.events;if(document.hidden!==void 0)s="visibilitychange";else{var o=["webkit","moz","ms"];o.forEach(function(u){document[u+"Hidden"]!==void 0&&(document.hidden=function(){return document[u+"Hidden"]},s=u+"visibilitychange")})}var a=function(u){document.hidden||u.type==="pause"?r.emit(e.HIDDEN):r.emit(e.VISIBLE)};s&&document.addEventListener(s,a,!1),window.onblur=function(){r.emit(e.BLUR)},window.onfocus=function(){r.emit(e.FOCUS)},window.focus&&i.config.autoFocus&&window.focus()};h.exports=l},97217:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="blur"},47548:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="boot"},19814:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="contextlost"},68446:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="destroy"},41700:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="focus"},25432:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="hidden"},65942:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pause"},59211:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="postrender"},47789:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="poststep"},39066:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="prerender"},460:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="prestep"},16175:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="ready"},42331:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resume"},11966:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="step"},32969:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="systemready"},94830:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="visible"},8443:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}},46728:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(36316),i=t(80021),s=t(26099),r=new e({Extends:i,initialize:function(a,u,f,v){i.call(this,"CubicBezierCurve"),Array.isArray(a)&&(v=new s(a[6],a[7]),f=new s(a[4],a[5]),u=new s(a[2],a[3]),a=new s(a[0],a[1])),this.p0=a,this.p1=u,this.p2=f,this.p3=v},getStartPoint:function(o){return o===void 0&&(o=new s),o.copy(this.p0)},getResolution:function(o){return o},getPoint:function(o,a){a===void 0&&(a=new s);var u=this.p0,f=this.p1,v=this.p2,c=this.p3;return a.set(l(o,u.x,f.x,v.x,c.x),l(o,u.y,f.y,v.y,c.y))},draw:function(o,a){a===void 0&&(a=32);var u=this.getPoints(a);o.beginPath(),o.moveTo(this.p0.x,this.p0.y);for(var f=1;f<u.length;f++)o.lineTo(u[f].x,u[f].y);return o.strokePath(),o},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(o){var a=o.points,u=new s(a[0],a[1]),f=new s(a[2],a[3]),v=new s(a[4],a[5]),c=new s(a[6],a[7]);return new r(u,f,v,c)},h.exports=r},80021:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(19217),i=t(87841),s=t(26099),r=new e({initialize:function(a){this.type=a,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new s,this._tmpVec2B=new s},draw:function(o,a){return a===void 0&&(a=32),o.strokePoints(this.getPoints(a))},getBounds:function(o,a){o||(o=new i),a===void 0&&(a=16);var u=this.getLength();a>u&&(a=u/2);var f=Math.max(1,Math.round(u/a));return l(this.getSpacedPoints(f),o)},getDistancePoints:function(o){var a=this.getLength(),u=Math.max(1,a/o);return this.getSpacedPoints(u)},getEndPoint:function(o){return o===void 0&&(o=new s),this.getPointAt(1,o)},getLength:function(){var o=this.getLengths();return o[o.length-1]},getLengths:function(o){if(o===void 0&&(o=this.arcLengthDivisions),this.cacheArcLengths.length===o+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var a=[],u,f=this.getPoint(0,this._tmpVec2A),v=0;a.push(0);for(var c=1;c<=o;c++)u=this.getPoint(c/o,this._tmpVec2B),v+=u.distance(f),a.push(v),f.copy(u);return this.cacheArcLengths=a,a},getPointAt:function(o,a){var u=this.getUtoTmapping(o);return this.getPoint(u,a)},getPoints:function(o,a,u){u===void 0&&(u=[]),o||(a?o=this.getLength()/a:o=this.defaultDivisions);for(var f=0;f<=o;f++)u.push(this.getPoint(f/o));return u},getRandomPoint:function(o){return o===void 0&&(o=new s),this.getPoint(Math.random(),o)},getSpacedPoints:function(o,a,u){u===void 0&&(u=[]),o||(a?o=this.getLength()/a:o=this.defaultDivisions);for(var f=0;f<=o;f++){var v=this.getUtoTmapping(f/o,null,o);u.push(this.getPoint(v))}return u},getStartPoint:function(o){return o===void 0&&(o=new s),this.getPointAt(0,o)},getTangent:function(o,a){a===void 0&&(a=new s);var u=1e-4,f=o-u,v=o+u;return f<0&&(f=0),v>1&&(v=1),this.getPoint(f,this._tmpVec2A),this.getPoint(v,a),a.subtract(this._tmpVec2A).normalize()},getTangentAt:function(o,a){var u=this.getUtoTmapping(o);return this.getTangent(u,a)},getTFromDistance:function(o,a){return o<=0?0:this.getUtoTmapping(0,o,a)},getUtoTmapping:function(o,a,u){var f=this.getLengths(u),v=0,c=f.length,g;a?g=Math.min(a,f[c-1]):g=o*f[c-1];for(var p=0,T=c-1,C;p<=T;)if(v=Math.floor(p+(T-p)/2),C=f[v]-g,C<0)p=v+1;else if(C>0)T=v-1;else{T=v;break}if(v=T,f[v]===g)return v/(c-1);var M=f[v],A=f[v+1],R=A-M,P=(g-M)/R;return(v+P)/(c-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});h.exports=r},73825:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(80021),i=t(39506),s=t(35154),r=t(43396),o=t(26099),a=new e({Extends:l,initialize:function(f,v,c,g,p,T,C,M){if(typeof f=="object"){var A=f;f=s(A,"x",0),v=s(A,"y",0),c=s(A,"xRadius",0),g=s(A,"yRadius",c),p=s(A,"startAngle",0),T=s(A,"endAngle",360),C=s(A,"clockwise",!1),M=s(A,"rotation",0)}else g===void 0&&(g=c),p===void 0&&(p=0),T===void 0&&(T=360),C===void 0&&(C=!1),M===void 0&&(M=0);l.call(this,"EllipseCurve"),this.p0=new o(f,v),this._xRadius=c,this._yRadius=g,this._startAngle=i(p),this._endAngle=i(T),this._clockwise=C,this._rotation=i(M)},getStartPoint:function(u){return u===void 0&&(u=new o),this.getPoint(0,u)},getResolution:function(u){return u*2},getPoint:function(u,f){f===void 0&&(f=new o);for(var v=Math.PI*2,c=this._endAngle-this._startAngle,g=Math.abs(c)<Number.EPSILON;c<0;)c+=v;for(;c>v;)c-=v;c<Number.EPSILON&&(g?c=0:c=v),this._clockwise&&!g&&(c===v?c=-v:c=c-v);var p=this._startAngle+u*c,T=this.p0.x+this._xRadius*Math.cos(p),C=this.p0.y+this._yRadius*Math.sin(p);if(this._rotation!==0){var M=Math.cos(this._rotation),A=Math.sin(this._rotation),R=T-this.p0.x,P=C-this.p0.y;T=R*M-P*A+this.p0.x,C=R*A+P*M+this.p0.y}return f.set(T,C)},setXRadius:function(u){return this.xRadius=u,this},setYRadius:function(u){return this.yRadius=u,this},setWidth:function(u){return this.xRadius=u/2,this},setHeight:function(u){return this.yRadius=u/2,this},setStartAngle:function(u){return this.startAngle=u,this},setEndAngle:function(u){return this.endAngle=u,this},setClockwise:function(u){return this.clockwise=u,this},setRotation:function(u){return this.rotation=u,this},x:{get:function(){return this.p0.x},set:function(u){this.p0.x=u}},y:{get:function(){return this.p0.y},set:function(u){this.p0.y=u}},xRadius:{get:function(){return this._xRadius},set:function(u){this._xRadius=u}},yRadius:{get:function(){return this._yRadius},set:function(u){this._yRadius=u}},startAngle:{get:function(){return r(this._startAngle)},set:function(u){this._startAngle=i(u)}},endAngle:{get:function(){return r(this._endAngle)},set:function(u){this._endAngle=i(u)}},clockwise:{get:function(){return this._clockwise},set:function(u){this._clockwise=u}},angle:{get:function(){return r(this._rotation)},set:function(u){this._rotation=i(u)}},rotation:{get:function(){return this._rotation},set:function(u){this._rotation=u}},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)}}});a.fromJSON=function(u){return new a(u)},h.exports=a},33951:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(80021),i=t(19217),s=t(87841),r=t(26099),o=new e({Extends:l,initialize:function(u,f){l.call(this,"LineCurve"),Array.isArray(u)&&(f=new r(u[2],u[3]),u=new r(u[0],u[1])),this.p0=u,this.p1=f,this.arcLengthDivisions=1},getBounds:function(a){return a===void 0&&(a=new s),i([this.p0,this.p1],a)},getStartPoint:function(a){return a===void 0&&(a=new r),a.copy(this.p0)},getResolution:function(a){return a===void 0&&(a=1),a},getPoint:function(a,u){return u===void 0&&(u=new r),a===1?u.copy(this.p1):(u.copy(this.p1).subtract(this.p0).scale(a).add(this.p0),u)},getPointAt:function(a,u){return this.getPoint(a,u)},getTangent:function(a,u){return u===void 0&&(u=new r),u.copy(this.p1).subtract(this.p0).normalize(),u},getUtoTmapping:function(a,u,f){var v;if(u){var c=this.getLengths(f),g=c[c.length-1],p=Math.min(u,g);v=p/g}else v=a;return v},draw:function(a){return a.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),a},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});o.fromJSON=function(a){var u=a.points,f=new r(u[0],u[1]),v=new r(u[2],u[3]);return new o(f,v)},h.exports=o},14744:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(80021),i=t(32112),s=t(26099),r=new e({Extends:l,initialize:function(a,u,f){l.call(this,"QuadraticBezierCurve"),Array.isArray(a)&&(f=new s(a[4],a[5]),u=new s(a[2],a[3]),a=new s(a[0],a[1])),this.p0=a,this.p1=u,this.p2=f},getStartPoint:function(o){return o===void 0&&(o=new s),o.copy(this.p0)},getResolution:function(o){return o},getPoint:function(o,a){a===void 0&&(a=new s);var u=this.p0,f=this.p1,v=this.p2;return a.set(i(o,u.x,f.x,v.x),i(o,u.y,f.y,v.y))},draw:function(o,a){a===void 0&&(a=32);var u=this.getPoints(a);o.beginPath(),o.moveTo(this.p0.x,this.p0.y);for(var f=1;f<u.length;f++)o.lineTo(u[f].x,u[f].y);return o.strokePath(),o},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(o){var a=o.points,u=new s(a[0],a[1]),f=new s(a[2],a[3]),v=new s(a[4],a[5]);return new r(u,f,v)},h.exports=r},42534:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87842),l=t(83419),i=t(80021),s=t(26099),r=new l({Extends:i,initialize:function(a){a===void 0&&(a=[]),i.call(this,"SplineCurve"),this.points=[],this.addPoints(a)},addPoints:function(o){for(var a=0;a<o.length;a++){var u=new s;typeof o[a]=="number"?(u.x=o[a],u.y=o[a+1],a++):Array.isArray(o[a])?(u.x=o[a][0],u.y=o[a][1]):(u.x=o[a].x,u.y=o[a].y),this.points.push(u)}return this},addPoint:function(o,a){var u=new s(o,a);return this.points.push(u),u},getStartPoint:function(o){return o===void 0&&(o=new s),o.copy(this.points[0])},getResolution:function(o){return o*this.points.length},getPoint:function(o,a){a===void 0&&(a=new s);var u=this.points,f=(u.length-1)*o,v=Math.floor(f),c=f-v,g=u[v===0?v:v-1],p=u[v],T=u[v>u.length-2?u.length-1:v+1],C=u[v>u.length-3?u.length-1:v+2];return a.set(e(c,g.x,p.x,T.x,C.x),e(c,g.y,p.y,T.y,C.y))},toJSON:function(){for(var o=[],a=0;a<this.points.length;a++)o.push(this.points[a].x),o.push(this.points[a].y);return{type:this.type,points:o}}});r.fromJSON=function(o){return new r(o.points)},h.exports=r},25410:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(26099),i=new e({initialize:function(r,o){this.active=!1,this.p0=new l(r,o)},getPoint:function(s,r){return r===void 0&&(r=new l),r.copy(this.p0)},getPointAt:function(s,r){return this.getPoint(s,r)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});h.exports=i},46669:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(46728),i=t(73825),s=t(39429),r=t(33951),o=t(68618),a=t(14744),u=t(87841),f=t(42534),v=t(26099),c=t(36383),g=new e({initialize:function(T,C){T===void 0&&(T=0),C===void 0&&(C=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new v,this._tmpVec2A=new v,this._tmpVec2B=new v,typeof T=="object"?this.fromJSON(T):this.startPoint.set(T,C)},add:function(p){return this.curves.push(p),this},circleTo:function(p,T,C){return T===void 0&&(T=!1),this.ellipseTo(p,p,0,360,T,C)},closePath:function(){var p=this.curves[0].getPoint(0),T=this.curves[this.curves.length-1].getPoint(1);return p.equals(T)||this.curves.push(new r(T,p)),this},cubicBezierTo:function(p,T,C,M,A,R){var P=this.getEndPoint(),L,F,w;return p instanceof v?(L=p,F=T,w=C):(L=new v(C,M),F=new v(A,R),w=new v(p,T)),this.add(new l(P,L,F,w))},quadraticBezierTo:function(p,T,C,M){var A=this.getEndPoint(),R,P;return p instanceof v?(R=p,P=T):(R=new v(C,M),P=new v(p,T)),this.add(new a(A,R,P))},draw:function(p,T){for(var C=0;C<this.curves.length;C++){var M=this.curves[C];M.active&&M.draw(p,T)}return p},ellipseTo:function(p,T,C,M,A,R){var P=new i(0,0,p,T,C,M,A,R),L=this.getEndPoint(this._tmpVec2A),F=P.getStartPoint(this._tmpVec2B);return L.subtract(F),P.x=L.x,P.y=L.y,this.add(P)},fromJSON:function(p){this.curves=[],this.cacheLengths=[],this.startPoint.set(p.x,p.y),this.autoClose=p.autoClose;for(var T=0;T<p.curves.length;T++){var C=p.curves[T];switch(C.type){case"LineCurve":this.add(r.fromJSON(C));break;case"EllipseCurve":this.add(i.fromJSON(C));break;case"SplineCurve":this.add(f.fromJSON(C));break;case"CubicBezierCurve":this.add(l.fromJSON(C));break;case"QuadraticBezierCurve":this.add(a.fromJSON(C));break}}return this},getBounds:function(p,T){p===void 0&&(p=new u),T===void 0&&(T=16),p.x=Number.MAX_VALUE,p.y=Number.MAX_VALUE;for(var C=new u,M=c.MIN_SAFE_INTEGER,A=c.MIN_SAFE_INTEGER,R=0;R<this.curves.length;R++){var P=this.curves[R];P.active&&(P.getBounds(C,T),p.x=Math.min(p.x,C.x),p.y=Math.min(p.y,C.y),M=Math.max(M,C.right),A=Math.max(A,C.bottom))}return p.right=M,p.bottom=A,p},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var p=[],T=0,C=0;C<this.curves.length;C++)T+=this.curves[C].getLength(),p.push(T);return this.cacheLengths=p,p},getCurveAt:function(p){for(var T=p*this.getLength(),C=this.getCurveLengths(),M=0;M<C.length;){if(C[M]>=T)return this.curves[M];M++}return null},getEndPoint:function(p){return p===void 0&&(p=new v),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,p):p.copy(this.startPoint),p},getLength:function(){var p=this.getCurveLengths();return p[p.length-1]},getPoint:function(p,T){T===void 0&&(T=new v);for(var C=p*this.getLength(),M=this.getCurveLengths(),A=0;A<M.length;){if(M[A]>=C){var R=M[A]-C,P=this.curves[A],L=P.getLength(),F=L===0?0:1-R/L;return P.getPointAt(F,T)}A++}return null},getPoints:function(p,T){!p&&!T&&(p=this.defaultDivisions);for(var C=[],M,A=0;A<this.curves.length;A++){var R=this.curves[A];if(R.active)for(var P=R.getResolution(p),L=R.getPoints(P,T),F=0;F<L.length;F++){var w=L[F];M&&M.equals(w)||(C.push(w),M=w)}}return this.autoClose&&C.length>1&&!C[C.length-1].equals(C[0])&&C.push(C[0]),C},getRandomPoint:function(p){return p===void 0&&(p=new v),this.getPoint(Math.random(),p)},getSpacedPoints:function(p){p===void 0&&(p=40);for(var T=[],C=0;C<=p;C++)T.push(this.getPoint(C/p));return this.autoClose&&T.push(T[0]),T},getStartPoint:function(p){return p===void 0&&(p=new v),p.copy(this.startPoint)},getTangent:function(p,T){T===void 0&&(T=new v);for(var C=p*this.getLength(),M=this.getCurveLengths(),A=0;A<M.length;){if(M[A]>=C){var R=M[A]-C,P=this.curves[A],L=P.getLength(),F=L===0?0:1-R/L;return P.getTangentAt(F,T)}A++}return null},lineTo:function(p,T){p instanceof v?this._tmpVec2B.copy(p):typeof p=="object"?this._tmpVec2B.setFromObject(p):this._tmpVec2B.set(p,T);var C=this.getEndPoint(this._tmpVec2A);return this.add(new r([C.x,C.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(p){return p.unshift(this.getEndPoint()),this.add(new f(p))},moveTo:function(p,T){return p instanceof v?this.add(new o(p.x,p.y)):this.add(new o(p,T))},toJSON:function(){for(var p=[],T=0;T<this.curves.length;T++)p.push(this.curves[T].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:p}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});s.register("path",function(p,T){return new g(p,T)}),h.exports=g},45893:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(24882),i=new e({initialize:function(r,o){this.parent=r,this.events=o,o||(this.events=r.events?r.events:r),this.list={},this.values={},this._frozen=!1,!r.hasOwnProperty("sys")&&this.events&&this.events.once(l.DESTROY,this.destroy,this)},get:function(s){var r=this.list;if(Array.isArray(s)){for(var o=[],a=0;a<s.length;a++)o.push(r[s[a]]);return o}else return r[s]},getAll:function(){var s={};for(var r in this.list)this.list.hasOwnProperty(r)&&(s[r]=this.list[r]);return s},query:function(s){var r={};for(var o in this.list)this.list.hasOwnProperty(o)&&o.match(s)&&(r[o]=this.list[o]);return r},set:function(s,r){if(this._frozen)return this;if(typeof s=="string")return this.setValue(s,r);for(var o in s)this.setValue(o,s[o]);return this},inc:function(s,r){if(this._frozen)return this;r===void 0&&(r=1);var o=this.get(s);return o===void 0&&(o=0),this.set(s,o+r),this},toggle:function(s){return this._frozen?this:(this.set(s,!this.get(s)),this)},setValue:function(s,r){if(this._frozen)return this;if(this.has(s))this.values[s]=r;else{var o=this,a=this.list,u=this.events,f=this.parent;Object.defineProperty(this.values,s,{enumerable:!0,configurable:!0,get:function(){return a[s]},set:function(v){if(!o._frozen){var c=a[s];a[s]=v,u.emit(l.CHANGE_DATA,f,s,v,c),u.emit(l.CHANGE_DATA_KEY+s,f,v,c)}}}),a[s]=r,u.emit(l.SET_DATA,f,s,r)}return this},each:function(s,r){for(var o=[this.parent,null,void 0],a=1;a<arguments.length;a++)o.push(arguments[a]);for(var u in this.list)o[1]=u,o[2]=this.list[u],s.apply(r,o);return this},merge:function(s,r){r===void 0&&(r=!0);for(var o in s)s.hasOwnProperty(o)&&(r||!r&&!this.has(o))&&this.setValue(o,s[o]);return this},remove:function(s){if(this._frozen)return this;if(Array.isArray(s))for(var r=0;r<s.length;r++)this.removeValue(s[r]);else return this.removeValue(s);return this},removeValue:function(s){if(this.has(s)){var r=this.list[s];delete this.list[s],delete this.values[s],this.events.emit(l.REMOVE_DATA,this.parent,s,r)}return this},pop:function(s){var r=void 0;return!this._frozen&&this.has(s)&&(r=this.list[s],delete this.list[s],delete this.values[s],this.events.emit(l.REMOVE_DATA,this.parent,s,r)),r},has:function(s){return this.list.hasOwnProperty(s)},setFreeze:function(s){return this._frozen=s,this},reset:function(){for(var s in this.list)delete this.list[s],delete this.values[s];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(l.CHANGE_DATA),this.events.off(l.SET_DATA),this.events.off(l.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(s){this._frozen=!!s}},count:{get:function(){var s=0;for(var r in this.list)this.list[r]!==void 0&&s++;return s}}});h.exports=i},63646:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(45893),i=t(37277),s=t(44594),r=new e({Extends:l,initialize:function(a){l.call(this,a,a.sys.events),this.scene=a,this.systems=a.sys,a.sys.events.once(s.BOOT,this.boot,this),a.sys.events.on(s.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){l.prototype.destroy.call(this),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null}});i.register("DataManagerPlugin",r,"data"),h.exports=r},10700:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="changedata"},93608:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="changedata-"},60883:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="destroy"},69780:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="removedata"},22166:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="setdata"},24882:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}},44965:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}},7098:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(84148),l={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function i(){if(typeof importScripts=="function")return l;l.audioData=!!window.Audio,l.webAudio=!!(window.AudioContext||window.webkitAudioContext);var s=document.createElement("audio"),r=!!s.canPlayType;try{if(r){var o=function(f,v){var c=s.canPlayType("audio/"+f).replace(/^no$/,"");return v?!!(c||s.canPlayType("audio/"+v).replace(/^no$/,"")):!!c};if(l.ogg=o('ogg; codecs="vorbis"'),l.opus=o('ogg; codecs="opus"',"opus"),l.mp3=o("mpeg"),l.wav=o("wav"),l.m4a=o("x-m4a"),l.aac=o("aac"),l.flac=o("flac","x-flac"),l.webm=o('webm; codecs="vorbis"'),s.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(e.edge)l.dolby=!0;else if(e.safari&&e.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var a=parseInt(RegExp.$1,10),u=parseInt(RegExp.$2,10);(a===10&&u>=11||a>10)&&(l.dolby=!0)}}}}catch{}return l}h.exports=i()},84148:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25892),l={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 i(){var s=navigator.userAgent;return/Edg\/\d+/.test(s)?(l.edge=!0,l.es2019=!0):/OPR/.test(s)?(l.opera=!0,l.es2019=!0):/Chrome\/(\d+)/.test(s)&&!e.windowsPhone?(l.chrome=!0,l.chromeVersion=parseInt(RegExp.$1,10),l.es2019=l.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(l.firefox=!0,l.firefoxVersion=parseInt(RegExp.$1,10),l.es2019=l.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(s)&&e.iOS?(l.mobileSafari=!0,l.es2019=!0):/MSIE (\d+\.\d+);/.test(s)?(l.ie=!0,l.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(s)&&!e.windowsPhone?(l.safari=!0,l.safariVersion=parseInt(RegExp.$1,10),l.es2019=l.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(l.ie=!0,l.trident=!0,l.tridentVersion=parseInt(RegExp.$1,10),l.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(l.silk=!0),l}h.exports=i()},89289:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(27919),l={supportInverseAlpha:!1,supportNewBlendModes:!1};function i(){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",a="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",u=new Image;return u.onload=function(){var f=new Image;f.onload=function(){var v=e.create2D(f,6),c=v.getContext("2d",{willReadFrequently:!0});if(c.globalCompositeOperation="multiply",c.drawImage(u,0,0),c.drawImage(f,2,0),!c.getImageData(2,0,1,1))return!1;var g=c.getImageData(2,0,1,1).data;e.remove(f),l.supportNewBlendModes=g[0]===255&&g[1]===0&&g[2]===0},f.src=o+"/wCKxvRF"+a},u.src=o+"AP804Oa6"+a,!1}function s(){var o=e.create2D(this,2),a=o.getContext("2d",{willReadFrequently:!0});a.fillStyle="rgba(10, 20, 30, 0.5)",a.fillRect(0,0,1,1);var u=a.getImageData(0,0,1,1);if(u===null)return!1;a.putImageData(u,1,0);var f=a.getImageData(1,0,1,1),v=f.data[0]===u.data[0]&&f.data[1]===u.data[1]&&f.data[2]===u.data[2]&&f.data[3]===u.data[3];return e.remove(this),v}function r(){return typeof importScripts!="function"&&document!==void 0&&(l.supportNewBlendModes=i(),l.supportInverseAlpha=s()),l}h.exports=r()},89357:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25892),l=t(84148),i=t(27919),s={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 a=new ArrayBuffer(4),u=new Uint8Array(a),f=new Uint32Array(a);return u[0]=161,u[1]=178,u[2]=195,u[3]=212,f[0]===3569595041?!0:f[0]===2712847316?!1:null}function o(){if(typeof importScripts=="function")return s;s.canvas=!!window.CanvasRenderingContext2D;try{s.localStorage=!!localStorage.getItem}catch{s.localStorage=!1}s.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,s.fileSystem=!!window.requestFileSystem;var a=!1,u=function(){if(window.WebGLRenderingContext)try{var f=i.createWebGL(this),v=f.getContext("webgl")||f.getContext("experimental-webgl"),c=i.create2D(this),g=c.getContext("2d",{willReadFrequently:!0}),p=g.createImageData(1,1);return a=p.data instanceof Uint8ClampedArray,i.remove(f),i.remove(c),!!v}catch{return!1}return!1};return s.webGL=u(),s.worker=!!window.Worker,s.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,s.getUserMedia=s.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,l.firefox&&l.firefoxVersion<21&&(s.getUserMedia=!1),!e.iOS&&(l.ie||l.firefox||l.chrome)&&(s.canvasBitBltShift=!0),(l.safari||l.mobileSafari)&&(s.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(s.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(s.littleEndian=r()),s.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&s.littleEndian!==null&&a,s}h.exports=o()},91639:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return d;var e,l="Fullscreen",i="FullScreen",s=["request"+l,"request"+i,"webkitRequest"+l,"webkitRequest"+i,"msRequest"+l,"msRequest"+i,"mozRequest"+i,"mozRequest"+l];for(e=0;e<s.length;e++)if(document.documentElement[s[e]]){d.available=!0,d.request=s[e];break}var r=["cancel"+i,"exit"+l,"webkitCancel"+i,"webkitExit"+l,"msCancel"+i,"msExit"+l,"mozCancel"+i,"mozExit"+l];if(d.available){for(e=0;e<r.length;e++)if(document[r[e]]){d.cancel=r[e];break}}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(d.keyboard=!0),Object.defineProperty(d,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),d}h.exports=t()},31784:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(84148),l={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function i(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(l.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(l.mspointer=!0),navigator.getGamepads&&(l.gamepads=!0),"onwheel"in window||e.ie&&"WheelEvent"in window?l.wheelEvent="wheel":"onmousewheel"in window?l.wheelEvent="mousewheel":e.firefox&&"MouseScrollEvent"in window&&(l.wheelEvent="DOMMouseScroll")),l}h.exports=i()},25892:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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 d;var e=navigator.userAgent;/Windows/.test(e)?d.windows=!0:/Mac OS/.test(e)&&!/like Mac OS/.test(e)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(d.iOS=!0,d.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),d.iOSVersion=parseInt(RegExp.$1,10)):d.macOS=!0:/Android/.test(e)?d.android=!0:/Linux/.test(e)?d.linux=!0:/iP[ao]d|iPhone/i.test(e)?(d.iOS=!0,navigator.appVersion.match(/OS (\d+)/),d.iOSVersion=parseInt(RegExp.$1,10),d.iPhone=e.toLowerCase().indexOf("iphone")!==-1,d.iPad=e.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(e)||/\bKF[A-Z][A-Z]+/.test(e)||/Silk.*Mobile Safari/.test(e)?d.kindle=!0:/CrOS/.test(e)&&(d.chromeOS=!0),(/Windows Phone/i.test(e)||/IEMobile/i.test(e))&&(d.android=!1,d.iOS=!1,d.macOS=!1,d.windows=!0,d.windowsPhone=!0);var l=/Silk/.test(e);return(d.windows||d.macOS||d.linux&&!l||d.chromeOS)&&(d.desktop=!0),(d.windowsPhone||/Windows NT/i.test(e)&&/Touch/i.test(e))&&(d.desktop=!1),navigator.standalone&&(d.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(d.cordova=!0),window.ejecta!==void 0&&(d.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(d.node=!0),d.node&&typeof process.versions=="object"&&(d.nodeWebkit=!!process.versions["node-webkit"],d.electron=!!process.versions.electron),/Crosswalk/.test(e)&&(d.crosswalk=!0),d.pixelRatio=window.devicePixelRatio||1,d}h.exports=t()},43267:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l={h264:!1,hls:!1,mov:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function i(){if(typeof importScripts=="function")return l;var s=document.createElement("video"),r=!!s.canPlayType,o=/^no$/;try{r&&(s.canPlayType('video/ogg; codecs="theora"').replace(o,"")&&(l.ogg=!0),s.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(o,"")&&(l.h264=!0,l.mp4=!0),s.canPlayType('video/quicktime4; codecs="avc1.42E01E"').replace(o,"")&&(l.mov=!0),s.canPlayType("video/x-m4v").replace(o,"")&&(l.m4v=!0),s.canPlayType('video/webm; codecs="vp8, vorbis"').replace(o,"")&&(l.webm=!0),s.canPlayType('video/webm; codecs="vp9"').replace(o,"")&&(l.vp9=!0),s.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(o,"")&&(l.hls=!0))}catch{}return s.parentNode&&s.parentNode.removeChild(s),l.getVideoURL=function(a){Array.isArray(a)||(a=[a]);for(var u=0;u<a.length;u++){var f=e(a[u],"url",a[u]);if(f.indexOf("blob:")===0)return{url:f,type:""};var v;if(f.indexOf("data:")===0?v=f.split(",")[0].match(/\/(.*?);/):v=f.match(/\.([a-zA-Z0-9]+)($|\?)/),v=e(a[u],"type",v?v[1]:"").toLowerCase(),l[v])return{url:f,type:v}}return null},l}h.exports=i()},82264:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new Float32Array(20),i=new e({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(s){return this._matrix.set(s),this._dirty=!0,this},reset:function(){var s=this._matrix;return s.fill(0),s[0]=1,s[6]=1,s[12]=1,s[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var s=this._data;return this._dirty&&(s.set(this._matrix),s[4]/=255,s[9]/=255,s[14]/=255,s[19]/=255,this._dirty=!1),s},brightness:function(s,r){s===void 0&&(s=0),r===void 0&&(r=!1);var o=s;return this.multiply([o,0,0,0,0,0,o,0,0,0,0,0,o,0,0,0,0,0,1,0],r)},saturate:function(s,r){s===void 0&&(s=0),r===void 0&&(r=!1);var o=s*2/3+1,a=(o-1)*-.5;return this.multiply([o,a,a,0,0,a,o,a,0,0,a,a,o,0,0,0,0,0,1,0],r)},desaturate:function(s){return s===void 0&&(s=!1),this.saturate(-1,s)},hue:function(s,r){s===void 0&&(s=0),r===void 0&&(r=!1),s=s/180*Math.PI;var o=Math.cos(s),a=Math.sin(s),u=.213,f=.715,v=.072;return this.multiply([u+o*(1-u)+a*-u,f+o*-f+a*-f,v+o*-v+a*(1-v),0,0,u+o*-u+a*.143,f+o*(1-f)+a*.14,v+o*-v+a*-.283,0,0,u+o*-u+a*-.787,f+o*-f+a*f,v+o*(1-v)+a*v,0,0,0,0,0,1,0],r)},grayscale:function(s,r){return s===void 0&&(s=1),r===void 0&&(r=!1),this.saturate(-s,r)},blackWhite:function(s){return s===void 0&&(s=!1),this.multiply(i.BLACK_WHITE,s)},contrast:function(s,r){s===void 0&&(s=0),r===void 0&&(r=!1);var o=s+1,a=-.5*(o-1);return this.multiply([o,0,0,0,a,0,o,0,0,a,0,0,o,0,a,0,0,0,1,0],r)},negative:function(s){return s===void 0&&(s=!1),this.multiply(i.NEGATIVE,s)},desaturateLuminance:function(s){return s===void 0&&(s=!1),this.multiply(i.DESATURATE_LUMINANCE,s)},sepia:function(s){return s===void 0&&(s=!1),this.multiply(i.SEPIA,s)},night:function(s,r){return s===void 0&&(s=.1),r===void 0&&(r=!1),this.multiply([s*-2,-s,0,0,0,-s,0,s,0,0,0,s,s*2,0,0,0,0,0,1,0],r)},lsd:function(s){return s===void 0&&(s=!1),this.multiply(i.LSD,s)},brown:function(s){return s===void 0&&(s=!1),this.multiply(i.BROWN,s)},vintagePinhole:function(s){return s===void 0&&(s=!1),this.multiply(i.VINTAGE,s)},kodachrome:function(s){return s===void 0&&(s=!1),this.multiply(i.KODACHROME,s)},technicolor:function(s){return s===void 0&&(s=!1),this.multiply(i.TECHNICOLOR,s)},polaroid:function(s){return s===void 0&&(s=!1),this.multiply(i.POLAROID,s)},shiftToBGR:function(s){return s===void 0&&(s=!1),this.multiply(i.SHIFT_BGR,s)},multiply:function(s,r){r===void 0&&(r=!1),r||this.reset();var o=this._matrix,a=l;return a.set(o),o.set([a[0]*s[0]+a[1]*s[5]+a[2]*s[10]+a[3]*s[15],a[0]*s[1]+a[1]*s[6]+a[2]*s[11]+a[3]*s[16],a[0]*s[2]+a[1]*s[7]+a[2]*s[12]+a[3]*s[17],a[0]*s[3]+a[1]*s[8]+a[2]*s[13]+a[3]*s[18],a[0]*s[4]+a[1]*s[9]+a[2]*s[14]+a[3]*s[19]+a[4],a[5]*s[0]+a[6]*s[5]+a[7]*s[10]+a[8]*s[15],a[5]*s[1]+a[6]*s[6]+a[7]*s[11]+a[8]*s[16],a[5]*s[2]+a[6]*s[7]+a[7]*s[12]+a[8]*s[17],a[5]*s[3]+a[6]*s[8]+a[7]*s[13]+a[8]*s[18],a[5]*s[4]+a[6]*s[9]+a[7]*s[14]+a[8]*s[19]+a[9],a[10]*s[0]+a[11]*s[5]+a[12]*s[10]+a[13]*s[15],a[10]*s[1]+a[11]*s[6]+a[12]*s[11]+a[13]*s[16],a[10]*s[2]+a[11]*s[7]+a[12]*s[12]+a[13]*s[17],a[10]*s[3]+a[11]*s[8]+a[12]*s[13]+a[13]*s[18],a[10]*s[4]+a[11]*s[9]+a[12]*s[14]+a[13]*s[19]+a[14],a[15]*s[0]+a[16]*s[5]+a[17]*s[10]+a[18]*s[15],a[15]*s[1]+a[16]*s[6]+a[17]*s[11]+a[18]*s[16],a[15]*s[2]+a[16]*s[7]+a[17]*s[12]+a[18]*s[17],a[15]*s[3]+a[16]*s[8]+a[17]*s[13]+a[18]*s[18],a[15]*s[4]+a[16]*s[9]+a[17]*s[14]+a[18]*s[19]+a[19]]),this._dirty=!0,this}});i.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],i.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],i.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],i.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],i.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],i.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],i.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],i.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],i.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],i.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],i.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],h.exports=i},51767:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(29747),i=new e({initialize:function(r,o,a){this._rgb=[0,0,0],this.onChangeCallback=l,this.dirty=!1,this.set(r,o,a)},set:function(s,r,o){return s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=0),this._rgb=[s,r,o],this.onChange(),this},equals:function(s,r,o){var a=this._rgb;return a[0]===s&&a[1]===r&&a[2]===o},onChange:function(){this.dirty=!0;var s=this._rgb;this.onChangeCallback.call(this,s[0],s[1],s[2])},r:{get:function(){return this._rgb[0]},set:function(s){this._rgb[0]=s,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(s){this._rgb[1]=s,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(s){this._rgb[2]=s,this.onChange()}},destroy:function(){this.onChangeCallback=null}});h.exports=i},60461:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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};h.exports=d},54312:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(35893),i=t(86327),s=t(88417),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)+u),i(o,e(a)+f),o};h.exports=r},46768:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(26541),i=t(86327),s=t(385),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)-u),i(o,e(a)+f),o};h.exports=r},35827:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(54380),i=t(86327),s=t(40136),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)+u),i(o,e(a)+f),o};h.exports=r},46871:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66786),l=t(35893),i=t(7702),s=function(r,o,a,u){return a===void 0&&(a=0),u===void 0&&(u=0),e(r,l(o)+a,i(o)+u),r};h.exports=s},5198:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7702),l=t(26541),i=t(20786),s=t(385),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)-u),i(o,e(a)+f),o};h.exports=r},11879:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(60461),l=[];l[e.BOTTOM_CENTER]=t(54312),l[e.BOTTOM_LEFT]=t(46768),l[e.BOTTOM_RIGHT]=t(35827),l[e.CENTER]=t(46871),l[e.LEFT_CENTER]=t(5198),l[e.RIGHT_CENTER]=t(80503),l[e.TOP_CENTER]=t(89698),l[e.TOP_LEFT]=t(922),l[e.TOP_RIGHT]=t(21373),l[e.LEFT_BOTTOM]=l[e.BOTTOM_LEFT],l[e.LEFT_TOP]=l[e.TOP_LEFT],l[e.RIGHT_BOTTOM]=l[e.BOTTOM_RIGHT],l[e.RIGHT_TOP]=l[e.TOP_RIGHT];var i=function(s,r,o,a,u){return l[o](s,r,a,u)};h.exports=i},80503:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7702),l=t(54380),i=t(20786),s=t(40136),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)+u),i(o,e(a)+f),o};h.exports=r},89698:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35893),l=t(17717),i=t(88417),s=t(66737),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),i(o,e(a)+u),s(o,l(a)-f),o};h.exports=r},922:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26541),l=t(17717),i=t(385),s=t(66737),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),i(o,e(a)-u),s(o,l(a)-f),o};h.exports=r},21373:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(54380),l=t(17717),i=t(40136),s=t(66737),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),i(o,e(a)+u),s(o,l(a)-f),o};h.exports=r},91660:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(60461),l=t(79291),i={In:t(91660),To:t(16694)};i=l(!1,i,e),h.exports=i},21578:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(35893),i=t(88417),s=t(66737),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),i(o,l(a)+u),s(o,e(a)+f),o};h.exports=r},10210:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(26541),i=t(385),s=t(66737),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),i(o,l(a)-u),s(o,e(a)+f),o};h.exports=r},82341:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(54380),i=t(40136),s=t(66737),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),i(o,l(a)+u),s(o,e(a)+f),o};h.exports=r},87958:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(26541),i=t(86327),s=t(40136),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)-u),i(o,e(a)+f),o};h.exports=r},40080:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7702),l=t(26541),i=t(20786),s=t(40136),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)-u),i(o,e(a)+f),o};h.exports=r},88466:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26541),l=t(17717),i=t(40136),s=t(66737),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),i(o,e(a)-u),s(o,l(a)-f),o};h.exports=r},38829:(h,d,t)=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(60461),l=[];l[e.BOTTOM_CENTER]=t(21578),l[e.BOTTOM_LEFT]=t(10210),l[e.BOTTOM_RIGHT]=t(82341),l[e.LEFT_BOTTOM]=t(87958),l[e.LEFT_CENTER]=t(40080),l[e.LEFT_TOP]=t(88466),l[e.RIGHT_BOTTOM]=t(19211),l[e.RIGHT_CENTER]=t(34609),l[e.RIGHT_TOP]=t(48741),l[e.TOP_CENTER]=t(49440),l[e.TOP_LEFT]=t(81288),l[e.TOP_RIGHT]=t(61323);var i=function(s,r,o,a,u){return l[o](s,r,a,u)};h.exports=i},19211:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(54380),i=t(86327),s=t(385),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)+u),i(o,e(a)+f),o};h.exports=r},34609:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7702),l=t(54380),i=t(20786),s=t(385),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,l(a)+u),i(o,e(a)+f),o};h.exports=r},48741:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(54380),l=t(17717),i=t(385),s=t(66737),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),i(o,e(a)+u),s(o,l(a)-f),o};h.exports=r},49440:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35893),l=t(17717),i=t(86327),s=t(88417),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,e(a)+u),i(o,l(a)-f),o};h.exports=r},81288:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26541),l=t(17717),i=t(86327),s=t(385),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,e(a)-u),i(o,l(a)-f),o};h.exports=r},61323:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(54380),l=t(17717),i=t(86327),s=t(40136),r=function(o,a,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),s(o,e(a)+u),i(o,l(a)-f),o};h.exports=r},16694:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(88417),l=t(20786),i=function(s,r,o){return e(s,r),l(s,o)};h.exports=i},62235:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.y+t.height-t.height*t.originY};h.exports=d},72873:(h,d,t)=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62235),l=t(26541),i=t(54380),s=t(17717),r=t(87841),o=function(a,u){u===void 0&&(u=new r);var f=l(a),v=s(a);return u.x=f,u.y=v,u.width=i(a)-f,u.height=e(a)-v,u};h.exports=o},35893:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.x-t.width*t.originX+t.width*.5};h.exports=d},7702:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.y-t.height*t.originY+t.height*.5};h.exports=d},26541:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.x-t.width*t.originX};h.exports=d},87431:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.width*t.originX};h.exports=d},46928:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.height*t.originY};h.exports=d},54380:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.x+t.width-t.width*t.originX};h.exports=d},17717:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.y-t.height*t.originY};h.exports=d},86327:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.y=e-t.height+t.height*t.originY,t};h.exports=d},88417:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.width*t.originX;return t.x=e+l-t.width*.5,t};h.exports=d},20786:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.height*t.originY;return t.y=e+l-t.height*.5,t};h.exports=d},385:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x=e+t.width*t.originX,t};h.exports=d},40136:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x=e-t.width+t.width*t.originX,t};h.exports=d},66737:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.y=e+t.height*t.originY,t};h.exports=d},58724:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setCrisp:function(t){var e=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return e.forEach(function(l){t.style["image-rendering"]=l}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};h.exports=d},27919:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8054),l=t(68703),i=[],s=!1,r=function(){var o=function(C,M,A,R,P){M===void 0&&(M=1),A===void 0&&(A=1),R===void 0&&(R=e.CANVAS),P===void 0&&(P=!1);var L,F=f(R);return F===null?(F={parent:C,canvas:document.createElement("canvas"),type:R},R===e.CANVAS&&i.push(F),L=F.canvas):(F.parent=C,L=F.canvas),P&&(F.parent=L),L.width=M,L.height=A,s&&R===e.CANVAS&&l.disable(L.getContext("2d",{willReadFrequently:!1})),L},a=function(C,M,A){return o(C,M,A,e.CANVAS)},u=function(C,M,A){return o(C,M,A,e.WEBGL)},f=function(C){if(C===void 0&&(C=e.CANVAS),C===e.WEBGL)return null;for(var M=0;M<i.length;M++){var A=i[M];if(!A.parent&&A.type===C)return A}return null},v=function(C){var M=C instanceof HTMLCanvasElement;i.forEach(function(A){(M&&A.canvas===C||!M&&A.parent===C)&&(A.parent=null,A.canvas.width=1,A.canvas.height=1)})},c=function(){var C=0;return i.forEach(function(M){M.parent&&C++}),C},g=function(){return i.length-c()},p=function(){s=!0},T=function(){s=!1};return{create2D:a,create:o,createWebGL:u,disableSmoothing:p,enableSmoothing:T,first:f,free:g,pool:i,remove:v,total:c}};h.exports=r()},68703:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d="",t=function(){var e=function(r){for(var o=["i","webkitI","msI","mozI","oI"],a=0;a<o.length;a++){var u=o[a]+"mageSmoothingEnabled";if(u in r)return u}return null},l=function(r){return d===""&&(d=e(r)),d&&(r[d]=!0),r},i=function(r){return d===""&&(d=e(r)),d&&(r[d]=!1),r},s=function(r){return d!==null?r[d]:null};return{disable:i,enable:l,getPrefix:e,isEnabled:s}};h.exports=t()},65208:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t};h.exports=d},91610:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e="none");var l=["-webkit-","-khtml-","-moz-","-ms-",""];return l.forEach(function(i){t.style[i+"user-select"]=e}),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};h.exports=d},26253:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}},40987:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(37589),i=t(1e3),s=t(7537),r=t(87837),o=new e({initialize:function(u,f,v,c){u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=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(u,f,v,c)},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(a,u,f,v,c){return v===void 0&&(v=255),c===void 0&&(c=!0),this._locked=!0,this.red=a,this.green=u,this.blue=f,this.alpha=v,this._locked=!1,this.update(c)},setGLTo:function(a,u,f,v){return v===void 0&&(v=1),this._locked=!0,this.redGL=a,this.greenGL=u,this.blueGL=f,this.alphaGL=v,this._locked=!1,this.update(!0)},setFromRGB:function(a){return this._locked=!0,this.red=a.r,this.green=a.g,this.blue=a.b,a.hasOwnProperty("a")&&(this.alpha=a.a),this._locked=!1,this.update(!0)},setFromHSV:function(a,u,f){return s(a,u,f,this)},update:function(a){if(a===void 0&&(a=!1),this._locked)return this;var u=this.r,f=this.g,v=this.b,c=this.a;return this._color=l(u,f,v),this._color32=i(u,f,v,c),this._rgba="rgba("+u+","+f+","+v+","+c/255+")",a&&r(u,f,v,this),this},updateHSV:function(){var a=this.r,u=this.g,f=this.b;return r(a,u,f,this),this},clone:function(){return new o(this.r,this.g,this.b,this.a)},gray:function(a){return this.setTo(a,a,a)},random:function(a,u){a===void 0&&(a=0),u===void 0&&(u=255);var f=Math.floor(a+Math.random()*(u-a)),v=Math.floor(a+Math.random()*(u-a)),c=Math.floor(a+Math.random()*(u-a));return this.setTo(f,v,c)},randomGray:function(a,u){a===void 0&&(a=0),u===void 0&&(u=255);var f=Math.floor(a+Math.random()*(u-a));return this.setTo(f,f,f)},saturate:function(a){return this.s+=a/100,this},desaturate:function(a){return this.s-=a/100,this},lighten:function(a){return this.v+=a/100,this},darken:function(a){return this.v-=a/100,this},brighten:function(a){var u=this.r,f=this.g,v=this.b;return u=Math.max(0,Math.min(255,u-Math.round(255*-(a/100)))),f=Math.max(0,Math.min(255,f-Math.round(255*-(a/100)))),v=Math.max(0,Math.min(255,v-Math.round(255*-(a/100)))),this.setTo(u,f,v)},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(a){this.gl[0]=Math.min(Math.abs(a),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(a){this.gl[1]=Math.min(Math.abs(a),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(a){this.gl[2]=Math.min(Math.abs(a),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(a){this.gl[3]=Math.min(Math.abs(a),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(a){a=Math.floor(Math.abs(a)),this.r=Math.min(a,255),this.gl[0]=a/255,this.update(!0)}},green:{get:function(){return this.g},set:function(a){a=Math.floor(Math.abs(a)),this.g=Math.min(a,255),this.gl[1]=a/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(a){a=Math.floor(Math.abs(a)),this.b=Math.min(a,255),this.gl[2]=a/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(a){a=Math.floor(Math.abs(a)),this.a=Math.min(a,255),this.gl[3]=a/255,this.update()}},h:{get:function(){return this._h},set:function(a){this._h=a,s(a,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(a){this._s=a,s(this._h,a,this._v,this)}},v:{get:function(){return this._v},set:function(a){this._v=a,s(this._h,this._s,a,this)}}});h.exports=o},92728:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37589),l=function(i){i===void 0&&(i=1024);var s=[],r=255,o,a=255,u=0,f=0;for(o=0;o<=r;o++)s.push({r:a,g:o,b:f,color:e(a,o,f)});for(u=255,o=r;o>=0;o--)s.push({r:o,g:u,b:f,color:e(o,u,f)});for(a=0,o=0;o<=r;o++,u--)s.push({r:a,g:u,b:o,color:e(a,u,o)});for(u=0,f=255,o=0;o<=r;o++,f--,a++)s.push({r:a,g:u,b:f,color:e(a,u,f)});if(i===1024)return s;var v=[],c=0,g=1024/i;for(o=0;o<i;o++)v.push(s[Math.floor(c)]),c+=g;return v};h.exports=l},91588:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(e.a=t>>>24),e};h.exports=d},62957:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=t.toString(16);return e.length===1?"0"+e:e};h.exports=d},37589:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t<<16|e<<8|l};h.exports=d},1e3:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){return i<<24|t<<16|e<<8|l};h.exports=d},62183:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40987),l=t(89528),i=function(s,r,o){var a=o,u=o,f=o;if(r!==0){var v=o<.5?o*(1+r):o+r-o*r,c=2*o-v;a=l(c,v,s+1/3),u=l(c,v,s),f=l(c,v,s-1/3)}var g=new e;return g.setGLTo(a,u,f,1)};h.exports=i},27939:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7537),l=function(i,s){i===void 0&&(i=1),s===void 0&&(s=1);for(var r=[],o=0;o<=359;o++)r.push(e(o/359,i,s));return r};h.exports=l},7537:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37589);function l(s,r,o,a){var u=(s+r*6)%6,f=Math.min(u,4-u,1);return Math.round(255*(a-a*o*Math.max(0,f)))}var i=function(s,r,o,a){r===void 0&&(r=1),o===void 0&&(o=1);var u=l(5,s,r,o),f=l(3,s,r,o),v=l(1,s,r,o);return a?a.setTo?a.setTo(u,f,v,a.alpha,!0):(a.r=u,a.g=f,a.b=v,a.color=e(u,f,v),a):{r:u,g:f,b:v,color:e(u,f,v)}};h.exports=i},70238:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40987),l=function(i){var s=new e;i=i.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(f,v,c,g){return v+v+c+c+g+g});var r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(i);if(r){var o=parseInt(r[1],16),a=parseInt(r[2],16),u=parseInt(r[3],16);s.setTo(o,a,u)}return s};h.exports=l},89528:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return l<0&&(l+=1),l>1&&(l-=1),l<.16666666666666666?t+(e-t)*6*l:l<.5?e:l<.6666666666666666?t+(e-t)*(.6666666666666666-l)*6:t};h.exports=d},30100:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40987),l=t(90664),i=function(s){var r=l(s);return new e(r.r,r.g,r.b,r.a)};h.exports=i},90664:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=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}};h.exports=d},13699:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(28915),l=t(37589),i=function(o,a,u,f,v,c,g,p){g===void 0&&(g=100),p===void 0&&(p=0);var T=p/g,C=e(o,f,T),M=e(a,v,T),A=e(u,c,T);return{r:C,g:M,b:A,a:255,color:l(C,M,A)}},s=function(o,a,u,f){return u===void 0&&(u=100),f===void 0&&(f=0),i(o.r,o.g,o.b,a.r,a.g,a.b,u,f)},r=function(o,a,u,f,v,c){return v===void 0&&(v=100),c===void 0&&(c=0),i(o.r,o.g,o.b,a,u,f,v,c)};h.exports={RGBWithRGB:i,ColorWithRGB:r,ColorWithColor:s}},68957:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40987),l=function(i){return new e(i.r,i.g,i.b,i.a)};h.exports=l},87388:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40987),l=function(i){var s=new e,r=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(i.toLowerCase());if(r){var o=parseInt(r[1],10),a=parseInt(r[2],10),u=parseInt(r[3],10),f=r[4]!==void 0?parseFloat(r[4]):1;s.setTo(o,a,u,f*255)}return s};h.exports=l},87837:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){i===void 0&&(i={h:0,s:0,v:0}),t/=255,e/=255,l/=255;var s=Math.min(t,e,l),r=Math.max(t,e,l),o=r-s,a=0,u=r===0?0:o/r,f=r;return r!==s&&(r===t?a=(e-l)/o+(e<l?6:0):r===e?a=(l-t)/o+2:r===l&&(a=(t-e)/o+4),a/=6),i.hasOwnProperty("_h")?(i._h=a,i._s=u,i._v=f):(i.h=a,i.s=u,i.v=f),i};h.exports=d},75723:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62957),l=function(i,s,r,o,a){return o===void 0&&(o=255),a===void 0&&(a="#"),a==="#"?"#"+((1<<24)+(i<<16)+(s<<8)+r).toString(16).slice(1,7):"0x"+e(o)+e(i)+e(s)+e(r)};h.exports=l},85386:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(30976),l=t(40987),i=function(s,r){return s===void 0&&(s=0),r===void 0&&(r=255),new l(e(s,r),e(s,r),e(s,r))};h.exports=i},80333:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70238),l=t(30100),i=t(68957),s=t(87388),r=function(o){var a=typeof o;switch(a){case"string":return o.substr(0,3).toLowerCase()==="rgb"?s(o):e(o);case"number":return l(o);case"object":return i(o)}};h.exports=r},3956:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40987);e.ColorSpectrum=t(92728),e.ColorToRGBA=t(91588),e.ComponentToHex=t(62957),e.GetColor=t(37589),e.GetColor32=t(1e3),e.HexStringToColor=t(70238),e.HSLToColor=t(62183),e.HSVColorWheel=t(27939),e.HSVToRGB=t(7537),e.HueToComponent=t(89528),e.IntegerToColor=t(30100),e.IntegerToRGB=t(90664),e.Interpolate=t(13699),e.ObjectToColor=t(68957),e.RandomRGB=t(85386),e.RGBStringToColor=t(87388),e.RGBToHSV=t(87837),e.RGBToString=t(75723),e.ValueToColor=t(80333),h.exports=e},27460:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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)}},80661:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r){this.geometryMask=r},setShape:function(i){return this.geometryMask=i,this},preRenderCanvas:function(i,s,r){var o=this.geometryMask;i.currentContext.save(),o.renderCanvas(i,o,r,null,null,!0),i.currentContext.clip()},postRenderCanvas:function(i){i.currentContext.restore()},destroy:function(){this.geometryMask=null}});h.exports=l},69781:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={GeometryMask:t(80661)}},73894:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o){o===void 0&&(o={}),this.key=s,this.glsl=r,this.metadata=o}});h.exports=l},40366:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l;if(e)typeof e=="string"?l=document.getElementById(e):typeof e=="object"&&e.nodeType===1&&(l=e);else if(t.parentElement||e===null)return t;return l||(l=document.body),l.appendChild(t),t};h.exports=d},83719:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40366),l=function(i){var s=i.config;if(!(!s.parent||!s.domCreateContainer)){var r=document.createElement("div");r.style.cssText=["display: block;","width: "+i.scale.width+"px;","height: "+i.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+s.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),i.domContainer=r,e(r,s.parent)}};h.exports=l},57264:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25892),l=function(i){if(document.readyState==="complete"||document.readyState==="interactive"){i();return}var s=function(){document.removeEventListener("deviceready",s,!0),document.removeEventListener("DOMContentLoaded",s,!0),window.removeEventListener("load",s,!0),i()};document.body?e.cordova?document.addEventListener("deviceready",s,!1):(document.addEventListener("DOMContentLoaded",s,!0),window.addEventListener("load",s,!0)):window.setTimeout(s,20)};h.exports=l},57811:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),l={w:0,h:0},i=document.createElement("div");return i.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(i),l.w=e===90?i.offsetHeight:window.innerWidth,l.h=e===90?window.innerWidth:i.offsetHeight,document.documentElement.removeChild(i),i=null,Math.abs(window.orientation)!==90?l.h:l.w};h.exports=d},45818:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(13560),l=function(i,s){var r=window.screen,o=r?r.orientation||r.mozOrientation||r.msOrientation:!1;if(o&&typeof o.type=="string")return o.type;if(typeof o=="string")return o;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?e.ORIENTATION.PORTRAIT:e.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return e.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return e.ORIENTATION.LANDSCAPE}else return s>i?e.ORIENTATION.PORTRAIT:e.ORIENTATION.LANDSCAPE};h.exports=l},74403:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e;return t!==""&&(typeof t=="string"?e=document.getElementById(t):t&&t.nodeType===1&&(e=t)),e||(e=document.body),e};h.exports=d},56836:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e="";try{if(window.DOMParser){var l=new DOMParser;e=l.parseFromString(t,"text/xml")}else e=new ActiveXObject("Microsoft.XMLDOM"),e.loadXML(t)}catch{e=null}return!e||!e.documentElement||e.getElementsByTagName("parsererror").length?null:e};h.exports=d},35846:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){t.parentNode&&t.parentNode.removeChild(t)};h.exports=d},43092:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(29747),i=new e({initialize:function(){this.isRunning=!1,this.callback=l,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var r=this;this.step=function o(a){r.callback(a),r.isRunning&&(r.timeOutID=window.requestAnimationFrame(o))},this.stepTimeout=function o(){r.isRunning&&(r.timeOutID=window.setTimeout(o,r.delay)),r.callback(window.performance.now())}},start:function(s,r,o){this.isRunning||(this.callback=s,this.isSetTimeOut=r,this.delay=o,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=l}});h.exports=i},84902:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};h.exports=e},47565:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50792),i=t(37277),s=new e({Extends:l,initialize:function(){l.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});i.register("EventEmitter",s,"events"),h.exports=s},93055:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={EventEmitter:t(47565)}},10189:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o){o===void 0&&(o=1),l.call(this,r,"FilterBarrel"),this.amount=o}});h.exports=i},16762:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o,a,u,f){o===void 0&&(o="__WHITE"),a===void 0&&(a=0),u===void 0&&(u=1),f===void 0&&(f=[1,1,1,1]),l.call(this,r,"FilterBlend"),this.glTexture,this.blendMode=a,this.amount=u,this.color=f,this.setTexture(o)},setTexture:function(s){var r=this.camera.scene.sys.textures.getFrame(s);return r&&(this.glTexture=r.glTexture),this}});h.exports=i},37597:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o){l.call(this,r,"FilterBlocky"),this.size={x:4,y:4},this.offset={x:0,y:0},o&&(o.size!==void 0&&(typeof o.size=="number"?(this.size.x=o.size,this.size.y=o.size):(this.size.x=o.size.x,this.size.y=o.size.y)),o.offset!==void 0&&(typeof o.offset=="number"?(this.offset.x=o.offset,this.offset.y=o.offset):(this.offset.x=o.offset.x,this.offset.y=o.offset.y)))}});h.exports=i},88344:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o,a,u,f,v,c){o===void 0&&(o=0),a===void 0&&(a=2),u===void 0&&(u=2),f===void 0&&(f=1),c===void 0&&(c=4),l.call(this,r,"FilterBlur"),this.quality=o,this.x=a,this.y=u,this.strength=f,this.glcolor=[1,1,1],v!=null&&(this.color=v),this.steps=c},color:{get:function(){var s=this.glcolor;return(s[0]*255<<16)+(s[1]*255<<8)+(s[2]*255|0)},set:function(s){var r=this.glcolor;r[0]=(s>>16&255)/255,r[1]=(s>>8&255)/255,r[2]=(s&255)/255}},getPadding:function(){var s=this.paddingOverride;if(s)return this.currentPadding.setTo(s.x,s.y,s.width,s.height),s;var r=this.quality,o=r===0?1.333:r===1?3.2307692308:5.176470588235294,a=this.steps*this.strength*o,u=Math.ceil(this.x*a),f=Math.ceil(this.y*a);return this.currentPadding.setTo(-u,-f,u*2,f*2),this.currentPadding}});h.exports=i},47564:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o,a,u,f,v,c,g){o===void 0&&(o=.5),a===void 0&&(a=1),u===void 0&&(u=.2),f===void 0&&(f=!1),v===void 0&&(v=1),c===void 0&&(c=1),g===void 0&&(g=1),l.call(this,r,"FilterBokeh"),this.radius=o,this.amount=a,this.contrast=u,this.isTiltShift=f,this.blurX=v,this.blurY=c,this.strength=g},getPadding:function(){var s=this.paddingOverride;if(s)return this.currentPadding.setTo(s.x,s.y,s.width,s.height),s;var r=Math.ceil(this.camera.height*this.radius*.021426096060426905);return this.currentPadding.setTo(-r,-r,r*2,r*2),this.currentPadding}});h.exports=i},77011:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=t(89422),s=new e({Extends:l,initialize:function(o){l.call(this,o,"FilterColorMatrix"),this.colorMatrix=new i},destroy:function(){this.colorMatrix=null,l.prototype.destroy.call(this)}});h.exports=s},13045:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(87841),i=new e({initialize:function(r,o){this.active=!0,this.camera=r,this.renderNode=o,this.paddingOverride=new l,this.currentPadding=new l,this.allowBaseDraw=!0,this.ignoreDestroy=!1},getPadding:function(){return this.paddingOverride||this.currentPadding},setPaddingOverride:function(s,r,o,a){return s===null?(this.paddingOverride=null,this):(s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=0),a===void 0&&(a=0),this.paddingOverride=new l(s,r,o-s,a-r),this)},setActive:function(s){return this.active=s,this},destroy:function(){this.active=!1,this.renderNode=null,this.camera=null}});h.exports=i},16898:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o,a,u){o===void 0&&(o="__WHITE"),a===void 0&&(a=.005),u===void 0&&(u=.005),l.call(this,r,"FilterDisplacement"),this.x=a,this.y=u,this.glTexture,this.setTexture(o)},setTexture:function(s){var r=this.camera.scene.sys.textures.getFrame(s);return r&&(this.glTexture=r.glTexture),this},getPadding:function(){var s=this.paddingOverride;if(s)return this.currentPadding.setTo(s.x,s.y,s.width,s.height),s;var r=this.camera,o=Math.ceil(r.width*this.x*.5),a=Math.ceil(r.height*this.y*.5);return this.currentPadding.setTo(-o,-a,o*2,a*2),this.currentPadding}});h.exports=i},42652:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o,a,u,f,v,c,g){a===void 0&&(a=4),u===void 0&&(u=0),f===void 0&&(f=1),v===void 0&&(v=!1),c===void 0&&(c=r.scene.sys.game.config.glowQuality),g===void 0&&(g=r.scene.sys.game.config.glowDistance),l.call(this,r,"FilterGlow"),this.outerStrength=a,this.innerStrength=u,this.scale=f,this.knockout=v,this._quality=Math.max(Math.round(c),1),this._distance=Math.max(Math.round(g),1),this.glcolor=[1,1,1,1],o!==void 0&&(this.color=o)},color:{get:function(){var s=this.glcolor;return(s[0]*255<<16)+(s[1]*255<<8)+(s[2]*255|0)},set:function(s){var r=this.glcolor;r[0]=(s>>16&255)/255,r[1]=(s>>8&255)/255,r[2]=(s&255)/255}},distance:{get:function(){return this._distance}},quality:{get:function(){return this._quality}},getPadding:function(){var s=this.paddingOverride;if(s)return this.currentPadding.setTo(s.x,s.y,s.width,s.height),s;var r=this.currentPadding,o=Math.ceil(this.distance*this.scale);return r.left=-o,r.top=-o,r.right=o,r.bottom=o,r}});h.exports=i},97797:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(45650),i=t(13045),s=new e({Extends:i,initialize:function(o,a,u,f,v,c){a===void 0&&(a="__WHITE"),u===void 0&&(u=!1),c===void 0&&(c=1),i.call(this,o,"FilterMask"),this.glTexture,this._dynamicTexture=null,this.maskGameObject=null,this.invert=u,this.autoUpdate=!0,this.needsUpdate=!1,this.viewTransform=v||"world",this.viewCamera=f,this.scaleFactor=c,typeof a=="string"?this.setTexture(a):this.setGameObject(a)},updateDynamicTexture:function(r,o){var a=this.scaleFactor,u=r*a,f=o*a,v=this.maskGameObject;if(v){if(this._dynamicTexture)this._dynamicTexture.width!==u||this._dynamicTexture.height!==f?this._dynamicTexture.setSize(u,f,!1):this._dynamicTexture.clear();else{var c=this.camera.scene.sys.textures;this._dynamicTexture=c.addDynamicTexture(l(),u,f,!1)}this.glTexture=this._dynamicTexture.get().glTexture;var g=this.viewCamera||v.scene.renderer.currentViewCamera;this._dynamicTexture.capture(v,{transform:this.viewTransform,camera:g}),this._dynamicTexture.render(),this.needsUpdate=!1}},setGameObject:function(r){return this.maskGameObject=r,this.needsUpdate=!0,this},setTexture:function(r){var o=this.camera.scene.sys.textures.getFrame(r);return o&&(this.maskGameObject=null,this.glTexture=o.glTexture),this},destroy:function(){this._dynamicTexture&&this._dynamicTexture.destroy(),this.maskGameObject=null,this._dynamicTexture=null,i.prototype.destroy.call(this)}});h.exports=s},2195:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53427),i=t(13045),s=t(16762),r=new e({Extends:i,initialize:function(a){i.call(this,a,"FilterParallelFilters"),this.top=new l(a),this.bottom=new l(a),this.blend=new s(a)}});h.exports=r},29861:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o){o===void 0&&(o=1),l.call(this,r,"FilterPixelate"),this.amount=o}});h.exports=i},63785:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o,a){a===void 0&&(a=null),l.call(this,r,"FilterSampler"),this.allowBaseDraw=!1,this.callback=o,this.region=a}});h.exports=i},62229:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o,a,u,f,v,c,g){o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=.1),f===void 0&&(f=1),c===void 0&&(c=6),g===void 0&&(g=1),l.call(this,r,"FilterShadow"),this.x=o,this.y=a,this.decay=u,this.power=f,this.glcolor=[0,0,0,1],this.samples=c,this.intensity=g,v!==void 0&&(this.color=v)},color:{get:function(){var s=this.glcolor;return(s[0]*255<<16)+(s[1]*255<<8)+(s[2]*255|0)},set:function(s){var r=this.glcolor;r[0]=(s>>16&255)/255,r[1]=(s>>8&255)/255,r[2]=(s&255)/255}},getPadding:function(){var s=this.paddingOverride;if(s)return this.currentPadding.setTo(s.x,s.y,s.width,s.height),s;var r=this.camera,o=this.decay*this.intensity,a=Math.ceil(Math.abs(this.x)*r.width*o),u=Math.ceil(Math.abs(this.y)*r.height*o);return this.currentPadding.setTo(-a,-u,a*2,u*2),this.currentPadding}});h.exports=i},99534:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13045),i=new e({Extends:l,initialize:function(r,o,a,u){l.call(this,r,"FilterThreshold"),this.edge1=[.5,.5,.5,.5],this.edge2=[.5,.5,.5,.5],this.invert=[!1,!1,!1,!1],this.setEdge(o,a),this.setInvert(u)},setEdge:function(s,r){s===void 0&&(s=.5),typeof s=="number"&&(s=[s,s,s,s]),this.edge1[0]=s[0],this.edge1[1]=s[1],this.edge1[2]=s[2],this.edge1[3]=s[3],r===void 0&&(r=s),typeof r=="number"&&(r=[r,r,r,r]),this.edge2[0]=r[0],this.edge2[1]=r[1],this.edge2[2]=r[2],this.edge2[3]=r[3];for(var o=0;o<4;o++)if(this.edge1[o]>this.edge2[o]){var a=this.edge1[o];this.edge1[o]=this.edge2[o],this.edge2[o]=a}return this},setInvert:function(s){return s===void 0&&(s=!1),typeof s=="boolean"&&(s=[s,s,s,s]),this.invert[0]=s[0],this.invert[1]=s[1],this.invert[2]=s[2],this.invert[3]=s[3],this}});h.exports=i},11889:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={Controller:t(13045),Barrel:t(10189),Blend:t(16762),Blocky:t(37597),Blur:t(88344),Bokeh:t(47564),ColorMatrix:t(77011),Displacement:t(16898),Glow:t(42652),Mask:t(97797),ParallelFilters:t(2195),Pixelate:t(29861),Sampler:t(63785),Shadow:t(62229),Threshold:t(99534)};h.exports=e},25305:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10312),l=t(23568),i=function(s,r,o){r.x=l(o,"x",0),r.y=l(o,"y",0),r.depth=l(o,"depth",0),r.flipX=l(o,"flipX",!1),r.flipY=l(o,"flipY",!1);var a=l(o,"scale",null);typeof a=="number"?r.setScale(a):a!==null&&(r.scaleX=l(a,"x",1),r.scaleY=l(a,"y",1));var u=l(o,"scrollFactor",null);typeof u=="number"?r.setScrollFactor(u):u!==null&&(r.scrollFactorX=l(u,"x",1),r.scrollFactorY=l(u,"y",1)),r.rotation=l(o,"rotation",0);var f=l(o,"angle",null);f!==null&&(r.angle=f),r.alpha=l(o,"alpha",1);var v=l(o,"origin",null);if(typeof v=="number")r.setOrigin(v);else if(v!==null){var c=l(v,"x",.5),g=l(v,"y",.5);r.setOrigin(c,g)}r.blendMode=l(o,"blendMode",e.NORMAL),r.visible=l(o,"visible",!0);var p=l(o,"add",!0);return p&&s.sys.displayList.add(r),r.preUpdate&&s.sys.updateList.add(r),r};h.exports=i},13059:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(23568),l=function(i,s){var r=e(s,"anims",null);if(r===null)return i;if(typeof r=="string")i.anims.play(r);else if(typeof r=="object"){var o=i.anims,a=e(r,"key",void 0);if(a){var u=e(r,"startFrame",void 0),f=e(r,"delay",0),v=e(r,"repeat",0),c=e(r,"repeatDelay",0),g=e(r,"yoyo",!1),p=e(r,"play",!1),T=e(r,"delayedPlay",0),C={key:a,delay:f,repeat:v,repeatDelay:c,yoyo:g,startFrame:u};p?o.play(C):T>0?o.playAfterDelay(C,T):o.load(C)}}return i};h.exports=l},8050:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(73162),i=t(37277),s=t(51708),r=t(44594),o=t(19186),a=new e({Extends:l,initialize:function(f){l.call(this,f),this.sortChildrenFlag=!1,this.scene=f,this.systems=f.sys,this.events=f.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(u){u.displayList&&u.displayList!==this&&u.removeFromDisplayList(),u.parentContainer&&u.parentContainer.remove(u),u.displayList||(this.queueDepthSort(),u.displayList=this,u.emit(s.ADDED_TO_SCENE,u,this.scene),this.events.emit(r.ADDED_TO_SCENE,u,this.scene))},removeChildCallback:function(u){this.queueDepthSort(),u.displayList=null,u.emit(s.REMOVED_FROM_SCENE,u,this.scene),this.events.emit(r.REMOVED_FROM_SCENE,u,this.scene)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(u,f){return u._depth-f._depth},getChildren:function(){return this.list},shutdown:function(){for(var u=this.list,f=u.length;f--;)u[f]&&u[f].destroy(!0);u.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}});i.register("DisplayList",a,"displayList"),h.exports=a},95643:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(31401),i=t(53774),s=t(45893),r=t(50792),o=t(51708),a=t(44594),u=new e({Extends:r,Mixins:[l.Filters,l.RenderSteps],initialize:function(v,c){r.call(this),this.scene=v,this.displayList=null,this.type=c,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.vertexRoundMode="safeAuto",this.input=null,this.body=null,this.ignoreDestroy=!1,this.addRenderStep&&this.addRenderStep(this.renderWebGL),this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),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 s(this)),this},setData:function(f,v){return this.data||(this.data=new s(this)),this.data.set(f,v),this},incData:function(f,v){return this.data||(this.data=new s(this)),this.data.inc(f,v),this},toggleData:function(f){return this.data||(this.data=new s(this)),this.data.toggle(f),this},getData:function(f){return this.data||(this.data=new s(this)),this.data.get(f)},setInteractive:function(f,v,c){return this.scene.sys.input.enable(this,f,v,c),this},disableInteractive:function(f){return f===void 0&&(f=!1),this.scene.sys.input.disable(this,f),this},removeInteractive:function(f){return f===void 0&&(f=!1),this.scene.sys.input.clear(this),f&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return i(this)},willRender:function(f){var v=this.displayList&&this.displayList.active?this.displayList.willRender(f):!0;return!(!v||u.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&f.id)},willRoundVertices:function(f,v){switch(this.vertexRoundMode){case"safe":return v;case"safeAuto":return v&&f.roundPixels;case"full":return!0;case"fullAuto":return f.roundPixels;case"off":default:return!1}},setVertexRoundMode:function(f){return this.vertexRoundMode=f,this},getIndexList:function(){for(var f=this,v=this.parentContainer,c=[];v&&(c.unshift(v.getIndex(f)),f=v,v.parentContainer);)v=v.parentContainer;return this.displayList?c.unshift(this.displayList.getIndex(f)):c.unshift(this.scene.sys.displayList.getIndex(f)),c},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(o.ADDED_TO_SCENE,this,this.scene),f.events.emit(a.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var f=this.displayList||this.scene.sys.displayList;return f&&f.exists(this)&&(f.remove(this,!0),f.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),f.events.emit(a.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var f=null;return this.parentContainer?f=this.parentContainer.list:this.displayList&&(f=this.displayList.list),f},destroy:function(f){!this.scene||this.ignoreDestroy||(f===void 0&&(f=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,f),this.removeAllListeners(),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.filterCamera&&(this.filterCamera.destroy(),this.filterCamera=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});u.RENDER_MASK=15,h.exports=u},44603:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(37277),i=t(44594),s=new e({initialize:function(o){this.scene=o,this.systems=o.sys,this.events=o.sys.events,this.displayList,this.updateList,this.events.once(i.BOOT,this.boot,this),this.events.on(i.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(i.DESTROY,this.destroy,this)},start:function(){this.events.once(i.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(i.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(i.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});s.register=function(r,o){s.prototype.hasOwnProperty(r)||(s.prototype[r]=o)},s.remove=function(r){s.prototype.hasOwnProperty(r)&&delete s.prototype[r]},l.register("GameObjectCreator",s,"make"),h.exports=s},39429:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(37277),i=t(44594),s=new e({initialize:function(o){this.scene=o,this.systems=o.sys,this.events=o.sys.events,this.displayList,this.updateList,this.events.once(i.BOOT,this.boot,this),this.events.on(i.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(i.DESTROY,this.destroy,this)},start:function(){this.events.once(i.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(i.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(i.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});s.register=function(r,o){s.prototype.hasOwnProperty(r)||(s.prototype[r]=o)},s.remove=function(r){s.prototype.hasOwnProperty(r)&&delete s.prototype[r]},l.register("GameObjectFactory",s,"add"),h.exports=s},91296:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=new e,i=new e,s=new e,r=new e,o={camera:l,sprite:i,calc:s,cameraExternal:r},a=function(u,f,v,c){return c?r.loadIdentity():r.copyFrom(f.matrixExternal),l.copyWithScrollFactorFrom(c?f.matrix:f.matrixCombined,f.scrollX,f.scrollY,u.scrollFactorX,u.scrollFactorY),s.copyFrom(l),v&&s.multiply(v),i.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),s.multiply(i),o};h.exports=a},45027:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(25774),i=t(37277),s=t(44594),r=new e({Extends:l,initialize:function(a){l.call(this),this.checkQueue=!0,this.scene=a,this.systems=a.sys,a.sys.events.once(s.BOOT,this.boot,this),a.sys.events.on(s.START,this.start,this)},boot:function(){this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){var o=this.systems.events;o.on(s.PRE_UPDATE,this.update,this),o.on(s.UPDATE,this.sceneUpdate,this),o.once(s.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(o,a){for(var u=this._active,f=u.length,v=0;v<f;v++){var c=u[v];c.active&&c.preUpdate.call(c,o,a)}},shutdown:function(){for(var o=this._active.length;o--;)this._active[o].destroy(!0);for(o=this._pending.length;o--;)this._pending[o].destroy(!0);for(o=this._destroy.length;o--;)this._destroy[o].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var a=this.systems.events;a.off(s.PRE_UPDATE,this.update,this),a.off(s.UPDATE,this.sceneUpdate,this),a.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(s.START,this.start,this),this.scene=null,this.systems=null}});i.register("UpdateList",r,"updateList"),h.exports=r},3217:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={frame:null,uvSource:null},t={quad:new Float32Array(8)},e=function(l,i,s,r,o,a,u,f,v){d.frame=s.frame,d.uvSource=o;var c=r.x-s.displayOriginX+a,g=r.y-s.displayOriginY+u,p=c+r.w,T=g+r.h,C=f.a,M=f.b,A=f.c,R=f.d,P=f.e,L=f.f,F=c*C+g*A+P,w=c*M+g*R+L,O=c*C+T*A+P,B=c*M+T*R+L,I=p*C+T*A+P,D=p*M+T*R+L,N=p*C+g*A+P,z=p*M+g*R+L;t.quad[0]=F,t.quad[1]=w,t.quad[2]=O,t.quad[3]=B,t.quad[4]=I,t.quad[5]=D,t.quad[6]=N,t.quad[7]=z,i.run(l,s,void 0,0,d,t,v)};h.exports=e},53048:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){if(l===void 0&&(l=!1),i===void 0)return i={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},i;var s=t.text,r=s.length,o=t.maxWidth,a=t.wordWrapCharCode,u=Number.MAX_VALUE,f=Number.MAX_VALUE,v=0,c=0,g=t.fontData.chars,p=t.fontData.lineHeight,T=t.letterSpacing,C=t.lineSpacing,M=0,A=0,R=0,P=null,L=t._align,F=0,w=0,O=t.fontSize/t.fontData.size,B=O*t.scaleX,I=O*t.scaleY,D=null,N=0,z=[],V=Number.MAX_VALUE,U=0,G=0,b=0,Y,W,H,X=[],K=[],Z=null,Q=function(Kt,fe){for(var pe=0,le=0;le<Kt.length;le++){var de=Kt.charCodeAt(le),ii=fe.chars[de];ii&&(pe+=ii.xAdvance)}return pe*B};if(o>0){H=s.split(`
|
||
`);var j=[];for(Y=0;Y<H.length;Y++){var J=H[Y],tt="",k="",q="",_="";for(W=0;W<J.length;W++)if(R=J.charCodeAt(W),tt+=J[W],R===a||W===J.length-1){_=q+tt;var rt=Q(_,t.fontData);rt<=o?q=_:(k=k.slice(0,-1),k+=(k?`
|
||
`:"")+q,q=tt),tt=""}k=k.slice(0,-1),k+=(k?`
|
||
`:"")+q,j.push(k)}s=j.join(`
|
||
`),i.wrappedText=s,r=s.length}var at=0;for(Y=0;Y<r;Y++){if(R=s.charCodeAt(Y),R===10){Z!==null&&(X.push({word:Z.word,i:Z.i,x:Z.x*B,y:Z.y*I,w:Z.w*B,h:Z.h*I}),Z=null),D=null,z[G]=b,b>U&&(U=b),b<V&&(V=b),G++,b=0,M=0,A=(p+C)*G;continue}if(P=g[R],!!P){if(F=M,w=A,D!==null){var ht=P.kerning[N];F+=ht!==void 0?ht:0}u>F&&(u=F),f>w&&(f=w);var ot=F+P.xAdvance,nt=w+p;v<ot&&(v=ot),c<nt&&(c=nt);var it=P.xOffset+P.xAdvance+(ht!==void 0?ht:0);R===a?Z!==null&&(X.push({word:Z.word,i:Z.i,x:Z.x*B,y:Z.y*I,w:Z.w*B,h:Z.h*I}),Z=null):(Z===null&&(Z={word:"",i:at,x:M,y:A,w:0,h:p}),Z.word=Z.word.concat(s[Y]),Z.w+=it),K.push({i:at,idx:Y,char:s[Y],code:R,x:(P.xOffset+F)*O,y:(P.yOffset+A)*O,w:P.width*O,h:P.height*O,t:A*O,r:ot*O,b:p*O,line:G,glyph:P}),M+=P.xAdvance+T+(ht!==void 0?ht:0),D=P,N=R,b=ot*O,at++}}if(Z!==null&&X.push({word:Z.word,i:Z.i,x:Z.x*B,y:Z.y*I,w:Z.w*B,h:Z.h*I}),z[G]=b,b>U&&(U=b),b<V&&(V=b),L>0)for(var lt=0;lt<K.length;lt++){var dt=K[lt];if(L===1){var ct=(U-z[dt.line])/2;dt.x+=ct,dt.r+=ct}else if(L===2){var Bt=U-z[dt.line];dt.x+=Bt,dt.r+=Bt}}var Lt=i.local,zt=i.global;return H=i.lines,Lt.x=u*O,Lt.y=f*O,Lt.width=v*O,Lt.height=c*O,zt.x=t.x-t._displayOriginX+u*B,zt.y=t.y-t._displayOriginY+f*I,zt.width=v*B,zt.height=c*I,H.shortest=V,H.longest=U,H.lengths=z,e&&(Lt.x=Math.ceil(Lt.x),Lt.y=Math.ceil(Lt.y),Lt.width=Math.ceil(Lt.width),Lt.height=Math.ceil(Lt.height),zt.x=Math.ceil(zt.x),zt.y=Math.ceil(zt.y),zt.width=Math.ceil(zt.width),zt.height=Math.ceil(zt.height),H.shortest=Math.ceil(V),H.longest=Math.ceil(U)),l&&(t._displayOriginX=t.originX*Lt.width,t._displayOriginY=t.originY*Lt.height,zt.x=t.x-t._displayOriginX*t.scaleX,zt.y=t.y-t._displayOriginY*t.scaleY,e&&(zt.x=Math.ceil(zt.x),zt.y=Math.ceil(zt.y))),i.words=X,i.characters=K,i.lines.height=p,i.scale=O,i.scaleX=t.scaleX,i.scaleY=t.scaleY,i};h.exports=d},61327:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(21859),l=function(i,s,r,o,a,u,f){var v=i.sys.textures.get(r),c=v.get(o),g=i.sys.cache.xml.get(a);if(c&&g){var p=e(g,c,u,f,v);return i.sys.cache.bitmapFont.add(s,{data:p,texture:r,frame:o,fromAtlas:!0}),!0}else return!1};h.exports=l},6925:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35154),l=function(i,s){var r=s.width,o=s.height,a=Math.floor(r/2),u=Math.floor(o/2),f=e(s,"chars","");if(f!==""){var v=e(s,"image",""),c=i.sys.textures.getFrame(v),g=c.cutX,p=c.cutY,T=c.source.width,C=c.source.height,M=e(s,"offset.x",0),A=e(s,"offset.y",0),R=e(s,"spacing.x",0),P=e(s,"spacing.y",0),L=e(s,"lineSpacing",0),F=e(s,"charsPerRow",null);F===null&&(F=T/r,F>f.length&&(F=f.length));for(var w=M,O=A,B={retroFont:!0,font:v,size:r,lineHeight:o+L,chars:{}},I=0,D=0;D<f.length;D++){var N=f.charCodeAt(D),z=(g+w)/T,V=1-(p+O)/C,U=(g+w+r)/T,G=1-(p+O+o)/C;B.chars[N]={x:w,y:O,width:r,height:o,centerX:a,centerY:u,xOffset:0,yOffset:0,xAdvance:r,data:{},kerning:{},u0:z,v0:V,u1:U,v1:G},I++,I===F?(I=0,w=M,O+=o+P):w+=r+R}var b={data:B,frame:null,texture:v};return b}};h.exports=l},21859:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function d(e,l){return parseInt(e.getAttribute(l),10)}var t=function(e,l,i,s,r){i===void 0&&(i=0),s===void 0&&(s=0);var o=l.cutX,a=l.cutY,u=l.source.width,f=l.source.height,v=l.sourceIndex,c={},g=e.getElementsByTagName("info")[0],p=e.getElementsByTagName("common")[0];c.font=g.getAttribute("face"),c.size=d(g,"size"),c.lineHeight=d(p,"lineHeight")+s,c.chars={};var T=e.getElementsByTagName("char"),C=l!==void 0&&l.trimmed;if(C)var M=l.height,A=l.width;for(var R=0;R<T.length;R++){var P=T[R],L=d(P,"id"),F=String.fromCharCode(L),w=d(P,"x"),O=d(P,"y"),B=d(P,"width"),I=d(P,"height");C&&(w<A&&(A=w),O<M&&(M=O)),C&&M!==0&&A!==0&&(w-=l.x,O-=l.y);var D=(o+w)/u,N=1-(a+O)/f,z=(o+w+B)/u,V=1-(a+O+I)/f;if(c.chars[L]={x:w,y:O,width:B,height:I,centerX:Math.floor(B/2),centerY:Math.floor(I/2),xOffset:d(P,"xoffset"),yOffset:d(P,"yoffset"),xAdvance:d(P,"xadvance")+i,data:{},kerning:{},u0:D,v0:N,u1:z,v1:V},r&&B!==0&&I!==0){var U=r.add(F,v,w,O,B,I);U&&U.setUVs(B,I,D,N,z,V)}}var G=e.getElementsByTagName("kerning");for(R=0;R<G.length;R++){var b=G[R],Y=d(b,"first"),W=d(b,"second"),H=d(b,"amount");c.chars[W].kerning[Y]=H}return c};h.exports=t},196:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87662),l=t(79291),i={Parse:t(6925)};i=l(!1,i,e),h.exports=i},87662:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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`};h.exports=d},2638:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(22186),l=t(83419),i=t(12310),s=new l({Extends:e,Mixins:[i],initialize:function(o,a,u,f,v,c,g){e.call(this,o,a,u,f,v,c,g),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,o){return this.cropWidth=r,this.cropHeight=o,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}});h.exports=s},86741:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20926),l=function(i,s,r,o){var a=s._text,u=a.length,f=i.currentContext;if(!(u===0||!e(i,f,s,r,o))){r.addToRenderList(s);var v=s.fromAtlas?s.frame:s.texture.frames.__BASE,c=s.displayCallback,g=s.callbackData,p=s.fontData.chars,T=s.fontData.lineHeight,C=s._letterSpacing,M=0,A=0,R=0,P=null,L=0,F=0,w=0,O=0,B=0,I=0,D=null,N=0,z=s.frame.source.image,V=v.cutX,U=v.cutY,G=0,b=0,Y=s._fontSize/s.fontData.size,W=s._align,H=0,X=0;s.getTextBounds(!1);var K=s._bounds.lines;W===1?X=(K.longest-K.lengths[0])/2:W===2&&(X=K.longest-K.lengths[0]),f.translate(-s.displayOriginX,-s.displayOriginY);var Z=r.roundPixels;s.cropWidth>0&&s.cropHeight>0&&(f.beginPath(),f.rect(0,0,s.cropWidth,s.cropHeight),f.clip());for(var Q=0;Q<u;Q++){if(b=Y,G=0,R=a.charCodeAt(Q),R===10){H++,W===1?X=(K.longest-K.lengths[H])/2:W===2&&(X=K.longest-K.lengths[H]),M=0,A+=T,D=null;continue}if(P=p[R],!!P){if(L=V+P.x,F=U+P.y,w=P.width,O=P.height,B=P.xOffset+M-s.scrollX,I=P.yOffset+A-s.scrollY,D!==null){var j=P.kerning[N];B+=j!==void 0?j:0}if(c){g.index=Q,g.charCode=R,g.x=B,g.y=I,g.scale=b,g.rotation=G,g.data=P.data;var J=c(g);B=J.x,I=J.y,b=J.scale,G=J.rotation}B*=b,I*=b,B+=X,M+=P.xAdvance+C+(j!==void 0?j:0),D=P,N=R,!(w===0||O===0||R===32)&&(Z&&(B=Math.round(B),I=Math.round(I)),f.save(),f.translate(B,I),f.rotate(G),f.scale(b,b),f.drawImage(z,L,F,w,O,0,0,w,O),f.restore())}}f.restore()}};h.exports=l},11164:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(2638),l=t(25305),i=t(44603),s=t(23568);i.register("dynamicBitmapText",function(r,o){r===void 0&&(r={});var a=s(r,"font",""),u=s(r,"text",""),f=s(r,"size",!1),v=new e(this.scene,0,0,a,u,f);return o!==void 0&&(r.add=o),l(this.scene,v,r),v})},72566:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(2638),l=t(39429);l.register("dynamicBitmapText",function(i,s,r,o,a){return this.displayList.add(new e(this.scene,i,s,r,o,a))})},12310:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(73482),i=t(86741),h.exports={renderWebGL:l,renderCanvas:i}},73482:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=t(61340),i=t(70554),s=new l,r={frame:null,uvSource:null},o={tintEffect:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},a=function(u,f,v,c){var g=f.text,p=g.length;if(p!==0){var T=v.camera;T.addToRenderList(f);var C=v,M=f.customRenderNodes.Submitter||f.defaultRenderNodes.Submitter,A=e(f,T,c,!v.useCanvas),R=A.sprite,P=A.calc,L=s,F=f.cropWidth>0||f.cropHeight>0;F&&(C=v.getClone(),C.setScissorEnable(!0),C.setScissorBox(P.tx,P.ty,f.cropWidth*P.scaleX,f.cropHeight*P.scaleY),C.use()),r.frame=f.frame;var w=f.tintFill,O=i.getTintAppendFloatAlpha(f.tintTopLeft,f._alphaTL),B=i.getTintAppendFloatAlpha(f.tintTopRight,f._alphaTR),I=i.getTintAppendFloatAlpha(f.tintBottomLeft,f._alphaBL),D=i.getTintAppendFloatAlpha(f.tintBottomRight,f._alphaBR),N=0,z=0,V=0,U=0,G=f.letterSpacing,b,Y=0,W=0,H,X=f.scrollX,K=f.scrollY,Z=f.fontData,Q=Z.chars,j=Z.lineHeight,J=f.fontSize/Z.size,tt=0,k=f._align,q=0,_=0,rt=f.getTextBounds(!1);f.maxWidth>0&&(g=rt.wrappedText,p=g.length);var at=f._bounds.lines;k===1?_=(at.longest-at.lengths[0])/2:k===2&&(_=at.longest-at.lengths[0]);for(var ht=f.displayCallback,ot=f.callbackData,nt=0;nt<p;nt++){if(V=g.charCodeAt(nt),V===10){q++,k===1?_=(at.longest-at.lengths[q])/2:k===2&&(_=at.longest-at.lengths[q]),N=0,z+=j,H=null;continue}if(b=Q[V],!!b){r.uvSource=b,Y=b.width,W=b.height;var it=b.xOffset+N-X,lt=b.yOffset+z-K;if(H!==null){var dt=b.kerning[U]||0;it+=dt,N+=dt}if(N+=b.xAdvance+G,H=b,U=V,!(Y===0||W===0||V===32)){if(J=f.fontSize/f.fontData.size,tt=0,ht){ot.color=0,ot.tint.topLeft=O,ot.tint.topRight=B,ot.tint.bottomLeft=I,ot.tint.bottomRight=D,ot.index=nt,ot.charCode=V,ot.x=it,ot.y=lt,ot.scale=J,ot.rotation=tt,ot.data=b.data;var ct=ht(ot);it=ct.x,lt=ct.y,J=ct.scale,tt=ct.rotation,ct.color?(O=ct.color,B=ct.color,I=ct.color,D=ct.color):(O=ct.tint.topLeft,B=ct.tint.topRight,I=ct.tint.bottomLeft,D=ct.tint.bottomRight),O=i.getTintAppendFloatAlpha(O,f._alphaTL),B=i.getTintAppendFloatAlpha(B,f._alphaTR),I=i.getTintAppendFloatAlpha(I,f._alphaBL),D=i.getTintAppendFloatAlpha(D,f._alphaBR)}o.tintFill=w,o.tintTopLeft=O,o.tintTopRight=B,o.tintBottomLeft=I,o.tintBottomRight=D,it*=J,lt*=J,it-=f.displayOriginX,lt-=f.displayOriginY,it+=_,L.applyITRS(it,lt,tt,J,J),P.multiply(L,R);var Bt=Y,Lt=W,zt=R.e,Kt=R.f,fe=Lt*R.c+R.e,pe=Lt*R.d+R.f,le=Bt*R.a+Lt*R.c+R.e,de=Bt*R.b+Lt*R.d+R.f,ii=Bt*R.a+R.e,mn=Bt*R.b+R.f;M.run(C,f,void 0,0,r,{quad:[zt,Kt,fe,pe,le,de,ii,mn]},o)}}}F&&v.use()}};h.exports=a},22186:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70972),l=t(83419),i=t(45319),s=t(31401),r=t(95643),o=t(53048),a=t(61327),u=t(21859),f=t(87841),v=t(18658),c=new l({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.GetBounds,s.Lighting,s.Mask,s.Origin,s.RenderNodes,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,v],initialize:function(p,T,C,M,A,R,P){A===void 0&&(A=""),P===void 0&&(P=0),r.call(this,p,"BitmapText"),this.font=M;var L=this.scene.sys.cache.bitmapFont.get(M);L||console.warn("Invalid BitmapText key: "+M),this.fontData=L.data,this._text="",this._fontSize=R||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=P,this._bounds=o(),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=L.fromAtlas,this.setTexture(L.texture,L.frame),this.setPosition(T,C),this.setOrigin(0,0),this.initRenderNodes(this._defaultRenderNodesMap),this.setText(A)},_defaultRenderNodesMap:{get:function(){return e}},setLeftAlign:function(){return this._align=c.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=c.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=c.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(g){return this._fontSize=g,this._dirty=!0,this},setLetterSpacing:function(g){return g===void 0&&(g=0),this._letterSpacing=g,this._dirty=!0,this},setLineSpacing:function(g){return g===void 0&&(g=0),this.lineSpacing=g,this},setText:function(g){return!g&&g!==0&&(g=""),Array.isArray(g)&&(g=g.join(`
|
||
`)),g!==this.text&&(this._text=g.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(g,p,T,C){return g===void 0&&(g=0),p===void 0&&(p=0),T===void 0&&(T=0),C===void 0&&(C=.5),this.dropShadowX=g,this.dropShadowY=p,this.dropShadowColor=T,this.dropShadowAlpha=C,this},setCharacterTint:function(g,p,T,C,M,A,R){g===void 0&&(g=0),p===void 0&&(p=1),T===void 0&&(T=!1),C===void 0&&(C=-1),M===void 0&&(M=C,A=C,R=C);var P=this.text.length;p===-1&&(p=P),g<0&&(g=P+g),g=i(g,0,P-1);for(var L=i(g+p,g,P),F=this.charColors,w=g;w<L;w++){var O=F[w];if(C===-1)F[w]=null;else{var B=T?1:0;O?(O.tintEffect=B,O.tintTL=C,O.tintTR=M,O.tintBL=A,O.tintBR=R):F[w]={tintEffect:B,tintTL:C,tintTR:M,tintBL:A,tintBR:R}}}return this},setWordTint:function(g,p,T,C,M,A,R){p===void 0&&(p=1);for(var P=this.getTextBounds(),L=P.words,F=typeof g=="number",w=0,O=0;O<L.length;O++){var B=L[O];if((F&&O===g||!F&&B.word===g)&&(this.setCharacterTint(B.i,B.word.length,T,C,M,A,R),w++,w===p))return this}return this},getTextBounds:function(g){var p=this._bounds;return(this._dirty||g||this.scaleX!==p.scaleX||this.scaleY!==p.scaleY)&&(o(this,g,!0,p),this._dirty=!1),p},getCharacterAt:function(g,p,T){for(var C=this.getLocalPoint(g,p,null,T),M=this.getTextBounds(),A=M.characters,R=new f,P=0;P<A.length;P++){var L=A[P];if(R.setTo(L.x,L.t,L.r-L.x,L.b),R.contains(C.x,C.y))return L}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(g,p,T){p===void 0&&(p=this._fontSize),T===void 0&&(T=this._align);var C=this.scene.sys.cache.bitmapFont.get(g);return C&&(this.font=g,this.fontData=C.data,this._fontSize=p,this._align=T,this.fromAtlas=C.fromAtlas===!0,this.setTexture(C.texture,C.frame),o(this,!1,!0,this._bounds)),this},setMaxWidth:function(g,p){return this._maxWidth=g,this._dirty=!0,p!==void 0&&(this.wordWrapCharCode=p),this},align:{set:function(g){this._align=g,this._dirty=!0},get:function(){return this._align}},text:{set:function(g){this.setText(g)},get:function(){return this._text}},fontSize:{set:function(g){this._fontSize=g,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(g){this._letterSpacing=g,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(g){this._lineSpacing=g,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(g){this._maxWidth=g,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:{get:function(){return this.width}},displayHeight:{get:function(){return this.height}},toJSON:function(){var g=s.ToJSON(this),p={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return g.data=p,g},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});c.ALIGN_LEFT=0,c.ALIGN_CENTER=1,c.ALIGN_RIGHT=2,c.ParseFromAtlas=a,c.ParseXMLBitmapFont=u,h.exports=c},37289:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20926),l=function(i,s,r,o){var a=s._text,u=a.length,f=i.currentContext;if(!(u===0||!e(i,f,s,r,o))){r.addToRenderList(s);var v=s.fromAtlas?s.frame:s.texture.frames.__BASE,c=s.fontData.chars,g=s.fontData.lineHeight,p=s._letterSpacing,T=s._lineSpacing,C=0,M=0,A=0,R=null,P=0,L=0,F=0,w=0,O=0,B=0,I=null,D=0,N=v.source.image,z=v.cutX,V=v.cutY,U=s._fontSize/s.fontData.size,G=s._align,b=0,Y=0,W=s.getTextBounds(!1);s.maxWidth>0&&(a=W.wrappedText,u=a.length);var H=s._bounds.lines;G===1?Y=(H.longest-H.lengths[0])/2:G===2&&(Y=H.longest-H.lengths[0]),f.translate(-s.displayOriginX,-s.displayOriginY);for(var X=r.roundPixels,K=0;K<u;K++){if(A=a.charCodeAt(K),A===10){b++,G===1?Y=(H.longest-H.lengths[b])/2:G===2&&(Y=H.longest-H.lengths[b]),C=0,M+=g+T,I=null;continue}if(R=c[A],!!R){if(P=z+R.x,L=V+R.y,F=R.width,w=R.height,O=R.xOffset+C,B=R.yOffset+M,I!==null){var Z=R.kerning[D];O+=Z!==void 0?Z:0}O*=U,B*=U,O+=Y,C+=R.xAdvance+p+(Z!==void 0?Z:0),I=R,D=A,!(F===0||w===0||A===32)&&(X&&(O=Math.round(O),B=Math.round(B)),f.save(),f.translate(O,B),f.scale(U,U),f.drawImage(N,P,L,F,w,0,0,F,w),f.restore())}}f.restore()}};h.exports=l},57336:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(22186),l=t(25305),i=t(44603),s=t(23568),r=t(35154);i.register("bitmapText",function(o,a){o===void 0&&(o={});var u=r(o,"font",""),f=s(o,"text",""),v=s(o,"size",!1),c=r(o,"align",0),g=new e(this.scene,0,0,u,f,v,c);return a!==void 0&&(o.add=a),l(this.scene,g,o),g})},34914:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(22186),l=t(39429);l.register("bitmapText",function(i,s,r,o,a,u){return this.displayList.add(new e(this.scene,i,s,r,o,a,u))})},18658:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(33590),i=t(37289),h.exports={renderWebGL:l,renderCanvas:i}},33590:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(3217),l=t(91296),i=t(70554),s={tintEffect:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},r={tintEffect:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},o=function(a,u,f,v){var c=u._text,g=c.length;if(g!==0){var p=f.camera;p.addToRenderList(u);var T=u.customRenderNodes.Submitter||u.defaultRenderNodes.Submitter,C=l(u,p,v,!f.useCanvas).calc,M=u.charColors,A=i.getTintAppendFloatAlpha;s.tintFill=u.tintFill,s.tintTopLeft=A(u.tintTopLeft,u._alphaTL),s.tintTopRight=A(u.tintTopRight,u._alphaTR),s.tintBottomLeft=A(u.tintBottomLeft,u._alphaBL),s.tintBottomRight=A(u.tintBottomRight,u._alphaBR);var R=u.getTextBounds(!1),P,L,F,w=R.characters,O=u.dropShadowX,B=u.dropShadowY,I=O!==0||B!==0;if(I){var D=u.dropShadowColor,N=u.dropShadowAlpha;for(r.tintFill=1,r.tintTopLeft=A(D,N*u._alphaTL),r.tintTopRight=A(D,N*u._alphaTR),r.tintBottomLeft=A(D,N*u._alphaBL),r.tintBottomRight=A(D,N*u._alphaBR),P=0;P<w.length;P++)L=w[P],F=L.glyph,!(L.code===32||F.width===0||F.height===0)&&e(f,T,u,L,F,O,B,C,r)}for(P=0;P<w.length;P++)if(L=w[P],F=L.glyph,!(L.code===32||F.width===0||F.height===0))if(M[L.i]){var z=M[L.i];r.tintFill=z.tintEffect,r.tintTopLeft=A(z.tintTL,u._alphaTL),r.tintTopRight=A(z.tintTR,u._alphaTR),r.tintBottomLeft=A(z.tintBL,u._alphaBL),r.tintBottomRight=A(z.tintBR,u._alphaBR),e(f,T,u,L,F,0,0,C,r)}else e(f,T,u,L,F,0,0,C,s)}};h.exports=o},6107:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(48011),l=t(46590),i=t(98682),s=t(83419),r=t(31401),o=t(4327),a=t(95643),u=t(73162),f=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Lighting,r.Mask,r.RenderNodes,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,e],initialize:function(c,g,p,T,C){a.call(this,c,"Blitter"),this.setTexture(T,C),this.setPosition(g,p),this.initRenderNodes(this._defaultRenderNodesMap),this.children=new u,this.renderList=[],this.dirty=!1},_defaultRenderNodesMap:{get:function(){return i}},create:function(v,c,g,p,T){p===void 0&&(p=!0),T===void 0&&(T=this.children.length),g===void 0?g=this.frame:g instanceof o||(g=this.texture.get(g));var C=new l(this,v,c,g,p);return this.children.addAt(C,T,!1),this.dirty=!0,C},createFromCallback:function(v,c,g,p){for(var T=this.createMultiple(c,g,p),C=0;C<T.length;C++){var M=T[C];v.call(this,M,C)}return T},createMultiple:function(v,c,g){c===void 0&&(c=this.frame.name),g===void 0&&(g=!0),Array.isArray(c)||(c=[c]);var p=[],T=this;return c.forEach(function(C){for(var M=0;M<v;M++)p.push(T.create(0,0,C,g))}),p},childCanRender:function(v){return v.visible&&v.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=[]}});h.exports=f},72396:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=e.getRenderList();if(s.length!==0){var r=t.currentContext,o=l.alpha*e.alpha;if(o!==0){l.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var a=e.x-l.scrollX*e.scrollFactorX,u=e.y-l.scrollY*e.scrollFactorY;r.save(),i&&i.copyToContext(r);for(var f=l.roundPixels,v=0;v<s.length;v++){var c=s[v],g=c.flipX||c.flipY,p=c.frame,T=p.canvasData,C=p.x,M=p.y,A=1,R=1,P=c.alpha*o;P!==0&&(r.globalAlpha=P,g?(c.flipX&&(A=-1,C-=T.width),c.flipY&&(R=-1,M-=T.height),T.width>0&&T.height>0&&(r.save(),r.translate(c.x+a,c.y+u),r.scale(A,R),r.drawImage(p.source.image,T.x,T.y,T.width,T.height,C,M,T.width,T.height),r.restore())):(f&&(C=Math.round(C),M=Math.round(M)),T.width>0&&T.height>0&&r.drawImage(p.source.image,T.x,T.y,T.width,T.height,C+c.x+a,M+c.y+u,T.width,T.height)))}r.restore()}}};h.exports=d},9403:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(6107),l=t(25305),i=t(44603),s=t(23568);i.register("blitter",function(r,o){r===void 0&&(r={});var a=s(r,"key",null),u=s(r,"frame",null),f=new e(this.scene,0,0,a,u);return o!==void 0&&(r.add=o),l(this.scene,f,r),f})},12709:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(6107),l=t(39429);l.register("blitter",function(i,s,r,o){return this.displayList.add(new e(this.scene,i,s,r,o))})},48011:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(99485),i=t(72396),h.exports={renderWebGL:l,renderCanvas:i}},99485:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=t(70554),i=new e,s={quad:new Float32Array(8)},r={},o={},a=function(u,f,v,c){var g=f.getRenderList(),p=v.camera,T=f.alpha;if(!(g.length===0||T===0)){p.addToRenderList(f);var C=i.copyWithScrollFactorFrom(p.getViewMatrix(!v.useCanvas),p.scrollX,p.scrollY,f.scrollFactorX,f.scrollFactorY);c&&C.multiply(c);for(var M=f.x,A=f.y,R=f.customRenderNodes,P=f.defaultRenderNodes,L=0;L<g.length;L++){var F=g[L],w=F.frame,O=F.alpha*T;if(O!==0){var B=w.width,I=w.height,D=M+F.x+w.x,N=A+F.y+w.y;F.flipX&&(B*=-1,D+=w.width),F.flipY&&(I*=-1,N+=w.height),C.setQuad(D,N,D+B,N+I,s.quad),r.frame=w,r.uvSource=w;var z=l.getTintAppendFloatAlpha(F.tint,O);o.tintTopLeft=z,o.tintBottomLeft=z,o.tintTopRight=z,o.tintBottomRight=z,(R.Submitter||P.Submitter).run(v,f,c,0,r,s,o,void 0,0)}}}};h.exports=a},46590:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(4327),i=new e({initialize:function(r,o,a,u,f){this.parent=r,this.x=o,this.y=a,this.frame=u,this.data={},this.tint=16777215,this._visible=f,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(s){return s===void 0?this.frame=this.parent.frame:s instanceof l&&s.texture===this.parent.texture?this.frame=s:this.frame=this.parent.texture.get(s),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(s,r,o){return this.x=s,this.y=r,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,o&&this.setFrame(o),this},setPosition:function(s,r){return this.x=s,this.y=r,this},setFlipX:function(s){return this.flipX=s,this},setFlipY:function(s){return this.flipY=s,this},setFlip:function(s,r){return this.flipX=s,this.flipY=r,this},setVisible:function(s){return this.visible=s,this},setAlpha:function(s){return this.alpha=s,this},setTint:function(s){return this.tint=s,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(s){this.parent.dirty|=this._visible!==s,this._visible=s}},alpha:{get:function(){return this._alpha},set:function(s){this.parent.dirty|=this._alpha>0!=s>0,this._alpha=s}}});h.exports=i},43451:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87774),l=t(30529),i=t(83419),s=t(31401),r=t(95643),o=t(36683),a=new i({Extends:r,Mixins:[s.BlendMode,s.Depth,s.RenderNodes,s.Visible,o],initialize:function(f,v){r.call(this,f,"CaptureFrame");var c=f.renderer;this.drawingContext=new e(c,{width:c.width,height:c.height}),this.captureTexture=f.sys.textures.addGLTexture(v,this.drawingContext.texture),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return l}},setAlpha:function(u){return this},setScrollFactor:function(u,f){return this}});h.exports=a},23675:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(44603),l=t(23568),i=t(43451);e.register("captureFrame",function(s,r){s===void 0&&(s={});var o=l(s,"depth",0),a=l(s,"key",null),u=l(s,"visible",!0),f=new i(this.scene,a);return r!==void 0&&(s.add=r),f.setDepth(o).setVisible(u),s.add&&this.scene.sys.displayList.add(f),f})},20421:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43451),l=t(39429);l.register("captureFrame",function(i){return this.displayList.add(new e(this.scene,i))})},36683:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(82237),h.exports={renderWebGL:l,renderCanvas:i}},82237:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=!1,t=function(e,l,i){if(i.useCanvas){d||(d=!0,console.warn("CaptureFrame: Cannot capture from main canvas. Activate `forceComposite` on the camera to use this feature. This warning will now mute."));return}i.camera.addToRenderList(l);var s=i.width,r=i.height,o=l.customRenderNodes,a=l.defaultRenderNodes;l.drawingContext.resize(s,r),l.drawingContext.use(),(o.BatchHandler||a.BatchHandler).batch(l.drawingContext,i.texture,0,r,0,0,s,r,s,0,0,0,1,1,!1,4294967295,4294967295,4294967295,4294967295,{}),l.drawingContext.release()};h.exports=t},16005:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=2,i={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(s,r,o,a){return s===void 0&&(s=1),r===void 0?this.alpha=s:(this._alphaTL=e(s,0,1),this._alphaTR=e(r,0,1),this._alphaBL=e(o,0,1),this._alphaBR=e(a,0,1)),this},alpha:{get:function(){return this._alpha},set:function(s){var r=e(s,0,1);this._alpha=r,this._alphaTL=r,this._alphaTR=r,this._alphaBL=r,this._alphaBR=r,r===0?this.renderFlags&=~l:this.renderFlags|=l}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(s){var r=e(s,0,1);this._alphaTL=r,r!==0&&(this.renderFlags|=l)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(s){var r=e(s,0,1);this._alphaTR=r,r!==0&&(this.renderFlags|=l)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(s){var r=e(s,0,1);this._alphaBL=r,r!==0&&(this.renderFlags|=l)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(s){var r=e(s,0,1);this._alphaBR=r,r!==0&&(this.renderFlags|=l)}}};h.exports=i},88509:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=2,i={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(s){return s===void 0&&(s=1),this.alpha=s,this},alpha:{get:function(){return this._alpha},set:function(s){var r=e(s,0,1);this._alpha=r,r===0?this.renderFlags&=~l:this.renderFlags|=l}}};h.exports=i},90065:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10312),l={_blendMode:e.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(i){typeof i=="string"&&(i=e[i]),i|=0,i>=-1&&(this._blendMode=i)}},setBlendMode:function(i){return this.blendMode=i,this}};h.exports=l},94215:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};h.exports=d},61683:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,l,i){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,e,l,i,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};h.exports=d},89272:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37105),l={_depth:0,depth:{get:function(){return this._depth},set:function(i){this.displayList&&this.displayList.queueDepthSort(),this._depth=i}},setDepth:function(i){return i===void 0&&(i=0),this.depth=i,this},setToTop:function(){var i=this.getDisplayList();return i&&e.BringToTop(i,this),this},setToBack:function(){var i=this.getDisplayList();return i&&e.SendToBack(i,this),this},setAbove:function(i){var s=this.getDisplayList();return s&&i&&e.MoveAbove(s,this,i),this},setBelow:function(i){var s=this.getDisplayList();return s&&i&&e.MoveBelow(s,this,i),this}};h.exports=l},3248:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={timeElapsed:0,timeElapsedResetPeriod:36e5,timePaused:!1,setTimerResetPeriod:function(t){return this.timeElapsedResetPeriod=t,this},setTimerPaused:function(t){return this.timePaused=!!t,this},resetTimer:function(t){return t===void 0&&(t=0),this.timeElapsed=t,this},updateTimer:function(t,e){return this.timePaused||(this.timeElapsed+=e,this.timeElapsed>=this.timeElapsedResetPeriod&&(this.timeElapsed-=this.timeElapsedResetPeriod)),this}};h.exports=d},53427:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(10189),i=t(16762),s=t(37597),r=t(88344),o=t(47564),a=t(77011),u=t(16898),f=t(42652),v=t(97797),c=null,g=t(29861),p=t(63785),T=t(62229),C=t(99534),M=new e({initialize:function(P){this.camera=P,this.list=[]},clear:function(){for(var R=0;R<this.list.length;R++){var P=this.list[R];P.ignoreDestroy||P.destroy()}return this.list.length=0,this},add:function(R,P){return P===void 0?this.list.push(R):this.list.splice(P,0,R),R},remove:function(R,P){var L=this.list.indexOf(R);return L!==-1&&(this.list.splice(L,1),(!R.ignoreDestroy||P)&&R.destroy()),this},getActive:function(){return this.list.filter(A)},addBarrel:function(R){return this.add(new l(this.camera,R))},addBlend:function(R,P,L,F){return this.add(new i(this.camera,R,P,L,F))},addBlocky:function(R){return this.add(new s(this.camera,R))},addBlur:function(R,P,L,F,w,O){return this.add(new r(this.camera,R,P,L,F,w,O))},addBokeh:function(R,P,L){return this.add(new o(this.camera,R,P,L))},addColorMatrix:function(){return this.add(new a(this.camera))},addDisplacement:function(R,P,L){return this.add(new u(this.camera,R,P,L))},addGlow:function(R,P,L,F,w,O,B){return this.add(new f(this.camera,R,P,L,F,w,O,B))},addMask:function(R,P,L,F,w){return this.add(new v(this.camera,R,P,L,F,w))},addParallelFilters:function(){return c||(c=t(2195)),this.add(new c(this.camera))},addPixelate:function(R){return this.add(new g(this.camera,R))},addSampler:function(R,P){return this.add(new p(this.camera,R,P))},addShadow:function(R,P,L,F,w,O,B){return this.add(new T(this.camera,R,P,L,F,w,O,B))},addThreshold:function(R,P,L){return this.add(new C(this.camera,R,P,L))},addTiltShift:function(R,P,L,F,w,O){return this.add(new o(this.camera,R,P,L,!0,F,w,O))},destroy:function(){this.clear(),this.camera=null}});function A(R){return R.active}h.exports=M},43102:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=null,l=t(26099),i=t(61340),s={};s={filterCamera:null,filters:{get:function(){return this.filterCamera?this.filterCamera.filters:null}},renderFilters:!0,maxFilterSize:null,filtersAutoFocus:!0,filtersFocusContext:!1,filtersForceComposite:!1,_filtersMatrix:null,_filtersViewMatrix:null,willRenderFilters:function(){return this.renderFilters&&this.filters&&(this.filters.internal.getActive().length>0||this.filters.external.getActive().length>0||this.filtersForceComposite)},enableFilters:function(){if(this.filterCamera||!this.scene.renderer.gl)return this;var r=this.scene;if(e||(e=t(38058)),this.filterCamera=new e(0,0,1,1).setScene(r,!1),this.filterCamera.isObjectInversion=!0,r.game.config.roundPixels&&(this.filterCamera.roundPixels=!0),!this.maxFilterSize){var o=r.renderer.getMaxTextureSize();this.maxFilterSize=new l(o,o)}return this._filtersMatrix=new i,this._filtersViewMatrix=new i,(!this.getBounds||this.width===void 0||this.height===void 0||this.width===0||this.height===0)&&(this.filtersFocusContext=!0),this.addRenderStep(this.renderWebGLFilters,0),this},renderWebGLFilters:function(r,o,a,u,f){if(!o.willRenderFilters()){o.renderWebGLStep(r,o,a,u,f+1);return}var v=a.camera,c=o.filtersAutoFocus,g=o.filtersFocusContext;c&&(g?o.focusFiltersOnCamera(v):o.focusFilters());var p=o.filterCamera;if(p.preRender(),c&&g){var T=o.parentContainer;if(T){var C=T.getWorldTransformMatrix();p.matrix.multiply(C)}}var M=o._filtersMatrix,A=o._filtersViewMatrix.copyWithScrollFactorFrom(v.getViewMatrix(!a.useCanvas),v.scrollX,v.scrollY,o.scrollFactorX,o.scrollFactorY);if(u&&A.multiply(u),g)M.loadIdentity();else{if(o.type==="Layer")M.loadIdentity();else{var R=o.flipX?-1:1,P=o.flipY?-1:1;M.applyITRS(o.x,o.y,o.rotation,o.scaleX*R,o.scaleY*P)}var L=p.width,F=p.height;M.translate(-L*p.originX,-F*p.originY),A.multiply(M,M)}var w=o.scrollFactorX,O=o.scrollFactorY;o.scrollFactorX=1,o.scrollFactorY=1,r.cameraRenderNode.run(a,[o],p,M,!0,f+1),o.scrollFactorX=w,o.scrollFactorY=O;for(var B=p.renderList.length,I=0;I<B;I++)v.addToRenderList(p.renderList[I])},focusFilters:function(){var r=this.x,o=this.y,a=this.originX,u=this.originY,f=this.width,v=this.height;if(this.type==="Layer"||isNaN(r)||isNaN(o)||isNaN(f)||isNaN(v)||isNaN(a)||isNaN(u)||f===0||v===0)return this.filtersFocusContext=!0,this;var c=this.rotation,g=this.scaleX,p=this.scaleY;this.flipX&&(g*=-1,a=1-a),this.flipY&&(p*=-1,u=1-u);var T=r+f*(.5-a),C=o+v*(.5-u);return this.setFilterSize(f,v),this.filterCamera.centerOn(T,C).setRotation(-c).setOrigin(a,u).setZoom(1/g,1/p),this},focusFiltersOnCamera:function(r){var o=r.width,a=r.height,u=r.scrollX,f=r.scrollY,v=r.rotation,c=r.zoomX,g=r.zoomY;return this.setFilterSize(o,a),this.filterCamera.setScroll(u,f),this.filterCamera.setRotation(v),this.filterCamera.setZoom(c,g),this},focusFiltersOverride:function(r,o,a,u){var f=this.filterCamera;a===void 0&&(a=f.width),u===void 0&&(u=f.height),r===void 0&&(r=a/2),o===void 0&&(o=u/2);var v=this.x,c=this.y;this.setFilterSize(a,u),f.setScroll(v-r,c-o);var g=r/a,p=o/u;return f.setOrigin(g,p),this.filtersAutoFocus=!1,this},setFilterSize:function(r,o){r=Math.max(1,Math.min(Math.ceil(r),this.maxFilterSize.x)),o=Math.max(1,Math.min(Math.ceil(o),this.maxFilterSize.y));var a=this.filterCamera;return a?(a.setSize(r,o),this):this},setFiltersAutoFocus:function(r){return this.filtersAutoFocus=r,this},setFiltersFocusContext:function(r){return this.filtersFocusContext=r,this},setFiltersForceComposite:function(r){return this.filtersForceComposite=r,this},setRenderFilters:function(r){return this.renderFilters=r,this}},h.exports=s},54434:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};h.exports=d},8004:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=t(11520),i=t(26099),s={prepareBoundsOutput:function(r,o){if(o===void 0&&(o=!1),this.rotation!==0&&l(r,this.x,this.y,this.rotation),o&&this.parentContainer){var a=this.parentContainer.getBoundsTransformMatrix();a.transformPoint(r.x,r.y,r)}return r},getCenter:function(r,o){return r===void 0&&(r=new i),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,o)},getTopLeft:function(r,o){return r||(r=new i),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,o)},getTopCenter:function(r,o){return r||(r=new i),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,o)},getTopRight:function(r,o){return r||(r=new i),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,o)},getLeftCenter:function(r,o){return r||(r=new i),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,o)},getRightCenter:function(r,o){return r||(r=new i),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,o)},getBottomLeft:function(r,o){return r||(r=new i),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,o)},getBottomCenter:function(r,o){return r||(r=new i),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,o)},getBottomRight:function(r,o){return r||(r=new i),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,o)},getBounds:function(r){r===void 0&&(r=new e);var o,a,u,f,v,c,g,p;if(this.parentContainer){var T=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(r),T.transformPoint(r.x,r.y,r),o=r.x,a=r.y,this.getTopRight(r),T.transformPoint(r.x,r.y,r),u=r.x,f=r.y,this.getBottomLeft(r),T.transformPoint(r.x,r.y,r),v=r.x,c=r.y,this.getBottomRight(r),T.transformPoint(r.x,r.y,r),g=r.x,p=r.y}else this.getTopLeft(r),o=r.x,a=r.y,this.getTopRight(r),u=r.x,f=r.y,this.getBottomLeft(r),v=r.x,c=r.y,this.getBottomRight(r),g=r.x,p=r.y;return r.x=Math.min(o,u,v,g),r.y=Math.min(a,f,c,p),r.width=Math.max(o,u,v,g)-r.x,r.height=Math.max(a,f,c,p)-r.y,r}};h.exports=s},73629:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={lighting:!1,selfShadow:{enabled:null,penumbra:.5,diffuseFlatThreshold:.3333333333333333},setLighting:function(t){return this.lighting=t,this},setSelfShadow:function(t,e,l){return t!==void 0&&(t===null?this.selfShadow.enabled=this.scene.sys.game.config.selfShadow:this.selfShadow.enabled=t),e!==void 0&&(this.selfShadow.penumbra=e),l!==void 0&&(this.selfShadow.diffuseFlatThreshold=l),this}};h.exports=d},8573:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8054),l=t(80661),i={mask:null,setMask:function(s){return this.scene.renderer.type===e.WEBGL?(console.warn("Phaser.GameObjects.Components.Mask.setMask: This method is not supported in WebGL. Create a Mask filter instead."),this):(this.mask=s,this)},clearMask:function(s){return s===void 0&&(s=!1),s&&this.mask&&this.mask.destroy(),this.mask=null,this},createGeometryMask:function(s){return s===void 0&&(this.type==="Graphics"||this.geom)&&(s=this),new l(this.scene,s)}};h.exports=i},27387:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return t===void 0&&(t=.5),e===void 0&&(e=t),this.originX=t,this.originY=e,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,e){return t===void 0&&(t=0),e===void 0&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};h.exports=d},37640:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39506),l=t(57355),i=t(35154),s=t(86353),r=t(26099),o={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:s.PLAYING_FORWARD,setPath:function(a,u){u===void 0&&(u=this.pathConfig);var f=this.pathTween;return f&&f.isPlaying()&&f.stop(),this.path=a,u&&this.startFollow(u),this},setRotateToPath:function(a,u){return u===void 0&&(u=0),this.rotateToPath=a,this.pathRotationOffset=u,this},isFollowing:function(){var a=this.pathTween;return a&&a.isPlaying()},startFollow:function(a,u){a===void 0&&(a={}),u===void 0&&(u=0);var f=this.pathTween;f&&f.isPlaying()&&f.stop(),typeof a=="number"&&(a={duration:a}),a.from=i(a,"from",0),a.to=i(a,"to",1);var v=l(a,"positionOnPath",!1);this.rotateToPath=l(a,"rotateToPath",!1),this.pathRotationOffset=i(a,"rotationOffset",0);var c=i(a,"startAt",u);if(c&&(a.onStart=function(p){var T=p.data[0];T.progress=c,T.elapsed=T.duration*c;var C=T.ease(T.progress);T.current=T.start+(T.end-T.start)*C,T.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(),a.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(a),this.path.getStartPoint(this.pathOffset),v&&(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=s.PLAYING_FORWARD,this.rotateToPath){var g=this.path.getPoint(.1);this.rotation=Math.atan2(g.y-this.y,g.x-this.x)+e(this.pathRotationOffset)}return this.pathConfig=a,this},pauseFollow:function(){var a=this.pathTween;return a&&a.isPlaying()&&a.pause(),this},resumeFollow:function(){var a=this.pathTween;return a&&a.isPaused()&&a.resume(),this},stopFollow:function(){var a=this.pathTween;return a&&a.isPlaying()&&a.stop(),this},pathUpdate:function(){var a=this.pathTween;if(a&&a.data){var u=a.data[0],f=this.pathDelta,v=this.pathVector;if(f.copy(v).negate(),u.state===s.COMPLETE){this.path.getPoint(u.end,v),f.add(v),v.add(this.pathOffset),this.setPosition(v.x,v.y);return}else if(u.state!==s.PLAYING_FORWARD&&u.state!==s.PLAYING_BACKWARD)return;this.path.getPoint(a.getValue(),v),f.add(v),v.add(this.pathOffset);var c=this.x,g=this.y;this.setPosition(v.x,v.y);var p=this.x-c,T=this.y-g;if(p===0&&T===0)return;if(u.state!==this._prevDirection){this._prevDirection=u.state;return}this.rotateToPath&&(this.rotation=Math.atan2(T,p)+e(this.pathRotationOffset))}}};h.exports=o},68680:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62644),l={customRenderNodes:null,defaultRenderNodes:null,renderNodeData:null,initRenderNodes:function(i){this.customRenderNodes={},this.defaultRenderNodes={},this.renderNodeData={};var s=this.scene.sys.renderer;if(s){var r=s.renderNodes;if(r&&i){var o=this.defaultRenderNodes;i.each(function(a,u){o[a]=r.getNode(u)})}}},setRenderNodeRole:function(i,s,r,o){var a=this.scene.sys.renderer;if(!a)return this;var u=a.renderNodes;if(!u)return this;if(s!==null){if(typeof s=="string"&&(s=u.getNode(s)),!s)return this;this.customRenderNodes[i]=s,r?this.renderNodeData[s.name]=o?e(r):r:this.renderNodeData[s.name]={}}else{var f=this.customRenderNodes[i];f&&(delete this.renderNodeData[f.name],delete this.customRenderNodes[i])}return this},setRenderNodeData:function(i,s,r){var o=i;typeof i!="string"&&(o=i.name);var a=this.renderNodeData[o];return r===void 0?delete a[s]:a[s]=r,this}};h.exports=l},86038:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={};d={_renderSteps:null,renderWebGLStep:function(t,e,l,i,s,r,o){s===void 0&&(s=0);var a=e._renderSteps[s];a&&(r?o===void 0&&(o=0):(r=[e],o=0),a(t,e,l,i,s,r,o))},addRenderStep:function(t,e){return this._renderSteps||(this._renderSteps=[]),e===void 0?(this._renderSteps.push(t),this):(this._renderSteps.splice(e,0,t),this)}},h.exports=d},80227:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return e===void 0&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};h.exports=d},16736:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={_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 e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};h.exports=d},37726:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(4327),l=8,i={texture:null,frame:null,isCropped:!1,setTexture:function(s,r,o,a){return this.texture=this.scene.sys.textures.get(s),this.setFrame(r,o,a)},setFrame:function(s,r,o){return r===void 0&&(r=!0),o===void 0&&(o=!0),s instanceof e?(this.texture=this.scene.sys.textures.get(s.texture.key),this.frame=s):this.frame=this.texture.get(s),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~l:this.renderFlags|=l,this._sizeComponent&&r&&this.setSizeToFrame(),this._originComponent&&o&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};h.exports=i},79812:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(4327),l=8,i={texture:null,frame:null,isCropped:!1,setCrop:function(s,r,o,a){if(s===void 0)this.isCropped=!1;else if(this.frame){if(typeof s=="number")this.frame.setCropUVs(this._crop,s,r,o,a,this.flipX,this.flipY);else{var u=s;this.frame.setCropUVs(this._crop,u.x,u.y,u.width,u.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(s,r){return this.texture=this.scene.sys.textures.get(s),this.setFrame(r)},setFrame:function(s,r,o){return r===void 0&&(r=!0),o===void 0&&(o=!0),s instanceof e?(this.texture=this.scene.sys.textures.get(s.texture.key),this.frame=s):this.frame=this.texture.get(s),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~l:this.renderFlags|=l,this._sizeComponent&&r&&this.setSizeToFrame(),this._originComponent&&o&&(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}}};h.exports=i},27472:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,l,i){return t===void 0&&(t=16777215),e===void 0&&(e=t,l=t,i=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=l,this.tintBottomRight=i,this.tintFill=!1,this},setTintFill:function(t,e,l,i){return this.setTint(t,e,l,i),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}}};h.exports=d},53774:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e};h.exports=d},16901:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=t(61340),i=t(85955),s=t(86554),r=t(30954),o=t(26099),a=4,u={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(f){this._scaleX=f,this._scaleY=f,f===0?this.renderFlags&=~a:this.renderFlags|=a}},scaleX:{get:function(){return this._scaleX},set:function(f){this._scaleX=f,f===0?this.renderFlags&=~a:this._scaleY!==0&&(this.renderFlags|=a)}},scaleY:{get:function(){return this._scaleY},set:function(f){this._scaleY=f,f===0?this.renderFlags&=~a:this._scaleX!==0&&(this.renderFlags|=a)}},angle:{get:function(){return r(this._rotation*e.RAD_TO_DEG)},set:function(f){this.rotation=r(f)*e.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=s(f)}},setPosition:function(f,v,c,g){return f===void 0&&(f=0),v===void 0&&(v=f),c===void 0&&(c=0),g===void 0&&(g=0),this.x=f,this.y=v,this.z=c,this.w=g,this},copyPosition:function(f){return f.x!==void 0&&(this.x=f.x),f.y!==void 0&&(this.y=f.y),f.z!==void 0&&(this.z=f.z),f.w!==void 0&&(this.w=f.w),this},setRandomPosition:function(f,v,c,g){return f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=this.scene.sys.scale.width),g===void 0&&(g=this.scene.sys.scale.height),this.x=f+Math.random()*c,this.y=v+Math.random()*g,this},setRotation:function(f){return f===void 0&&(f=0),this.rotation=f,this},setAngle:function(f){return f===void 0&&(f=0),this.angle=f,this},setScale:function(f,v){return f===void 0&&(f=1),v===void 0&&(v=f),this.scaleX=f,this.scaleY=v,this},setX:function(f){return f===void 0&&(f=0),this.x=f,this},setY:function(f){return f===void 0&&(f=0),this.y=f,this},setZ:function(f){return f===void 0&&(f=0),this.z=f,this},setW:function(f){return f===void 0&&(f=0),this.w=f,this},getLocalTransformMatrix:function(f){return f===void 0&&(f=new l),f.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(f,v){f===void 0&&(f=new l);var c=this.parentContainer;if(!c)return this.getLocalTransformMatrix(f);var g=!1;for(v||(v=new l,g=!0),f.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);c;)v.applyITRS(c.x,c.y,c._rotation,c._scaleX,c._scaleY),v.multiply(f,f),c=c.parentContainer;return g&&v.destroy(),f},getLocalPoint:function(f,v,c,g){c||(c=new o),g||(g=this.scene.sys.cameras.main);var p=g.scrollX,T=g.scrollY,C=f+p*this.scrollFactorX-p,M=v+T*this.scrollFactorY-T;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(C,M,c):i(C,M,this.x,this.y,this.rotation,this.scaleX,this.scaleY,c),this._originComponent&&(c.x+=this._displayOriginX,c.y+=this._displayOriginY),c},getWorldPoint:function(f,v,c){f===void 0&&(f=new o);var g=this.parentContainer;if(!g)return f.x=this.x,f.y=this.y,f;var p=this.getWorldTransformMatrix(v,c);return f.x=p.tx,f.y=p.ty,f},getParentRotation:function(){for(var f=0,v=this.parentContainer;v;)f+=v.rotation,v=v.parentContainer;return f}};h.exports=u},61340:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(36383),i=t(26099),s=new e({initialize:function(o,a,u,f,v,c){o===void 0&&(o=1),a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=1),v===void 0&&(v=0),c===void 0&&(c=0),this.matrix=new Float32Array([o,a,u,f,v,c,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}},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,o=r[0],a=r[1],u=r[2],f=r[3];return o||a?a>0?Math.acos(o/this.scaleX):-Math.acos(o/this.scaleX):u||f?l.PI_OVER_2-(f>0?Math.acos(-u/this.scaleY):-Math.acos(u/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,o){var a=this.matrix;return a[4]=a[0]*r+a[2]*o+a[4],a[5]=a[1]*r+a[3]*o+a[5],this},scale:function(r,o){var a=this.matrix;return a[0]*=r,a[1]*=r,a[2]*=o,a[3]*=o,this},rotate:function(r){var o=Math.sin(r),a=Math.cos(r),u=this.matrix,f=u[0],v=u[1],c=u[2],g=u[3];return u[0]=f*a+c*o,u[1]=v*a+g*o,u[2]=f*-o+c*a,u[3]=v*-o+g*a,this},multiply:function(r,o){var a=this.matrix,u=r.matrix,f=a[0],v=a[1],c=a[2],g=a[3],p=a[4],T=a[5],C=u[0],M=u[1],A=u[2],R=u[3],P=u[4],L=u[5],F=o===void 0?a:o.matrix;return F[0]=C*f+M*c,F[1]=C*v+M*g,F[2]=A*f+R*c,F[3]=A*v+R*g,F[4]=P*f+L*c+p,F[5]=P*v+L*g+T,F},multiplyWithOffset:function(r,o,a){var u=this.matrix,f=r.matrix,v=u[0],c=u[1],g=u[2],p=u[3],T=u[4],C=u[5],M=o*v+a*g+T,A=o*c+a*p+C,R=f[0],P=f[1],L=f[2],F=f[3],w=f[4],O=f[5];return u[0]=R*v+P*g,u[1]=R*c+P*p,u[2]=L*v+F*g,u[3]=L*c+F*p,u[4]=w*v+O*g+M,u[5]=w*c+O*p+A,this},transform:function(r,o,a,u,f,v){var c=this.matrix,g=c[0],p=c[1],T=c[2],C=c[3],M=c[4],A=c[5];return c[0]=r*g+o*T,c[1]=r*p+o*C,c[2]=a*g+u*T,c[3]=a*p+u*C,c[4]=f*g+v*T+M,c[5]=f*p+v*C+A,this},transformPoint:function(r,o,a){a===void 0&&(a={x:0,y:0});var u=this.matrix,f=u[0],v=u[1],c=u[2],g=u[3],p=u[4],T=u[5];return a.x=r*f+o*c+p,a.y=r*v+o*g+T,a},invert:function(){var r=this.matrix,o=r[0],a=r[1],u=r[2],f=r[3],v=r[4],c=r[5],g=o*f-a*u;return r[0]=f/g,r[1]=-a/g,r[2]=-u/g,r[3]=o/g,r[4]=(u*c-f*v)/g,r[5]=-(o*c-a*v)/g,this},copyFrom:function(r){var o=this.matrix;return o[0]=r.a,o[1]=r.b,o[2]=r.c,o[3]=r.d,o[4]=r.e,o[5]=r.f,this},copyFromArray:function(r){var o=this.matrix;return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o[4]=r[4],o[5]=r[5],this},copyWithScrollFactorFrom:function(r,o,a,u,f){var v=this.matrix;v[0]=r.a,v[1]=r.b,v[2]=r.c,v[3]=r.d;var c=o*(1-u),g=a*(1-f);return v[4]=r.a*c+r.c*g+r.e,v[5]=r.b*c+r.d*g+r.f,this},copyToContext:function(r){var o=this.matrix;return r.transform(o[0],o[1],o[2],o[3],o[4],o[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 o=this.matrix;return r===void 0?r=[o[0],o[1],o[2],o[3],o[4],o[5]]:(r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5]),r},setTransform:function(r,o,a,u,f,v){var c=this.matrix;return c[0]=r,c[1]=o,c[2]=a,c[3]=u,c[4]=f,c[5]=v,this},decomposeMatrix:function(){var r=this.decomposedMatrix,o=this.matrix,a=o[0],u=o[1],f=o[2],v=o[3],c=a*v-u*f;if(r.translateX=o[4],r.translateY=o[5],a||u){var g=Math.sqrt(a*a+u*u);r.rotation=u>0?Math.acos(a/g):-Math.acos(a/g),r.scaleX=g,r.scaleY=c/g}else if(f||v){var p=Math.sqrt(f*f+v*v);r.rotation=Math.PI*.5-(v>0?Math.acos(-f/p):-Math.acos(f/p)),r.scaleX=c/p,r.scaleY=p}else r.rotation=0,r.scaleX=0,r.scaleY=0;return r},applyITRS:function(r,o,a,u,f){var v=this.matrix,c=Math.sin(a),g=Math.cos(a);return v[4]=r,v[5]=o,v[0]=g*u,v[1]=c*u,v[2]=-c*f,v[3]=g*f,this},applyInverse:function(r,o,a){a===void 0&&(a=new i);var u=this.matrix,f=u[0],v=u[1],c=u[2],g=u[3],p=u[4],T=u[5],C=1/(f*g+c*-v);return a.x=g*C*r+-c*C*o+(T*c-p*g)*C,a.y=f*C*o+-v*C*r+(-T*f+p*v)*C,a},setQuad:function(r,o,a,u,f){f===void 0&&(f=this.quad);var v=this.matrix,c=v[0],g=v[1],p=v[2],T=v[3],C=v[4],M=v[5];return f[0]=r*c+o*p+C,f[1]=r*g+o*T+M,f[2]=r*c+u*p+C,f[3]=r*g+u*T+M,f[4]=a*c+u*p+C,f[5]=a*g+u*T+M,f[6]=a*c+o*p+C,f[7]=a*g+o*T+M,f},getX:function(r,o){return r*this.a+o*this.c+this.e},getY:function(r,o){return r*this.b+o*this.d+this.f},getXRound:function(r,o,a){var u=this.getX(r,o);return a&&(u=Math.floor(u+.5)),u},getYRound:function(r,o,a){var u=this.getY(r,o);return a&&(u=Math.floor(u+.5)),u},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}});h.exports=s},59715:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(e){e?(this._visible=!0,this.renderFlags|=d):(this._visible=!1,this.renderFlags&=~d)}},setVisible:function(e){return this.visible=e,this}};h.exports=t},31401:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Alpha:t(16005),AlphaSingle:t(88509),BlendMode:t(90065),ComputedSize:t(94215),Crop:t(61683),Depth:t(89272),ElapseTimer:t(3248),FilterList:t(53427),Filters:t(43102),Flip:t(54434),GetBounds:t(8004),Lighting:t(73629),Mask:t(8573),Origin:t(27387),PathFollower:t(37640),RenderNodes:t(68680),RenderSteps:t(86038),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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37105),l=t(10312),i=t(83419),s=t(31401),r=t(51708),o=t(95643),a=t(87841),u=t(29959),f=t(36899),v=t(26099),c=new s.TransformMatrix,g=new i({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.ComputedSize,s.Depth,s.Mask,s.Transform,s.Visible,u],initialize:function(T,C,M,A){o.call(this,T,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new s.TransformMatrix,this._sortKey="",this._sysEvents=T.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(C,M),this.setBlendMode(l.SKIP_CHECK),A&&this.add(A)},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(p){return p===void 0&&(p=!0),this.exclusive=p,this},getBounds:function(p){if(p===void 0&&(p=new a),p.setTo(this.x,this.y,0,0),this.parentContainer){var T=this.parentContainer.getBoundsTransformMatrix(),C=T.transformPoint(this.x,this.y);p.setTo(C.x,C.y,0,0)}if(this.list.length>0){var M=this.list,A=new a,R=!1;p.setEmpty();for(var P=0;P<M.length;P++){var L=M[P];L.getBounds&&(L.getBounds(A),R?f(A,p,p):(p.setTo(A.x,A.y,A.width,A.height),R=!0))}}return p},addHandler:function(p){p.once(r.DESTROY,this.onChildDestroyed,this),this.exclusive&&(p.parentContainer&&p.parentContainer.remove(p),p.parentContainer=this,p.removeFromDisplayList(),p.addedToScene())},removeHandler:function(p){p.off(r.DESTROY,this.remove,this),this.exclusive&&(p.parentContainer=null,p.removedFromScene(),p.addToDisplayList())},pointToContainer:function(p,T){T===void 0&&(T=new v),this.parentContainer?this.parentContainer.pointToContainer(p,T):(T.x=p.x,T.y=p.y);var C=c;return C.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),C.invert(),C.transformPoint(p.x,p.y,T),T},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(c,this.localTransform)},add:function(p){return e.Add(this.list,p,this.maxSize,this.addHandler,this),this},addAt:function(p,T){return e.AddAt(this.list,p,T,this.maxSize,this.addHandler,this),this},getAt:function(p){return this.list[p]},getIndex:function(p){return this.list.indexOf(p)},sort:function(p,T){return p?(T===void 0&&(T=function(C,M){return C[p]-M[p]}),e.StableSort(this.list,T),this):this},getByName:function(p){return e.GetFirst(this.list,"name",p)},getRandom:function(p,T){return e.GetRandom(this.list,p,T)},getFirst:function(p,T,C,M){return e.GetFirst(this.list,p,T,C,M)},getAll:function(p,T,C,M){return e.GetAll(this.list,p,T,C,M)},count:function(p,T,C,M){return e.CountAllMatching(this.list,p,T,C,M)},swap:function(p,T){return e.Swap(this.list,p,T),this},moveTo:function(p,T){return e.MoveTo(this.list,p,T),this},moveAbove:function(p,T){return e.MoveAbove(this.list,p,T),this},moveBelow:function(p,T){return e.MoveBelow(this.list,p,T),this},remove:function(p,T){var C=e.Remove(this.list,p,this.removeHandler,this);if(T&&C){Array.isArray(C)||(C=[C]);for(var M=0;M<C.length;M++)C[M].destroy()}return this},removeAt:function(p,T){var C=e.RemoveAt(this.list,p,this.removeHandler,this);return T&&C&&C.destroy(),this},removeBetween:function(p,T,C){var M=e.RemoveBetween(this.list,p,T,this.removeHandler,this);if(C)for(var A=0;A<M.length;A++)M[A].destroy();return this},removeAll:function(p){var T=this.list;if(p){for(var C=0;C<T.length;C++)T[C]&&T[C].scene&&(T[C].off(r.DESTROY,this.onChildDestroyed,this),T[C].destroy());this.list=[]}else e.RemoveBetween(T,0,T.length,this.removeHandler,this);return this},bringToTop:function(p){return e.BringToTop(this.list,p),this},sendToBack:function(p){return e.SendToBack(this.list,p),this},moveUp:function(p){return e.MoveUp(this.list,p),this},moveDown:function(p){return e.MoveDown(this.list,p),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return e.Shuffle(this.list),this},replace:function(p,T,C){var M=e.Replace(this.list,p,T);return M&&(this.addHandler(T),this.removeHandler(p),C&&p.destroy()),this},exists:function(p){return this.list.indexOf(p)>-1},setAll:function(p,T,C,M){return e.SetAll(this.list,p,T,C,M),this},each:function(p,T){var C=[null],M,A=this.list.slice(),R=A.length;for(M=2;M<arguments.length;M++)C.push(arguments[M]);for(M=0;M<R;M++)C[0]=A[M],p.apply(T,C);return this},iterate:function(p,T){var C=[null],M;for(M=2;M<arguments.length;M++)C.push(arguments[M]);for(M=0;M<this.list.length;M++)C[0]=this.list[M],p.apply(T,C);return this},setScrollFactor:function(p,T,C){return T===void 0&&(T=p),C===void 0&&(C=!1),this.scrollFactorX=p,this.scrollFactorY=T,C&&(e.SetAll(this.list,"scrollFactorX",p),e.SetAll(this.list,"scrollFactorY",T)),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(p){e.Remove(this.list,p),this.exclusive&&(p.parentContainer=null,p.removedFromScene())}});h.exports=g},53584:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l.addToRenderList(e);var s=e.list;if(s.length!==0){var r=e.localTransform;i?(r.loadIdentity(),r.multiply(i),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=e.blendMode!==-1;o||t.setBlendMode(0);var a=e._alpha,u=e.scrollFactorX,f=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,l);for(var v=0;v<s.length;v++){var c=s[v];if(c.willRender(l)){var g=c.alpha,p=c.scrollFactorX,T=c.scrollFactorY;!o&&c.blendMode!==t.currentBlendMode&&t.setBlendMode(c.blendMode),c.setScrollFactor(p*u,T*f),c.setAlpha(g*a),c.renderCanvas(t,c,l,r),c.setAlpha(g),c.setScrollFactor(p,T)}}e.mask&&e.mask.postRenderCanvas(t)}};h.exports=d},77143:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(31559),i=t(44603),s=t(23568),r=t(95540);i.register("container",function(o,a){o===void 0&&(o={});var u=s(o,"x",0),f=s(o,"y",0),v=r(o,"children",null),c=new l(this.scene,u,f,v);return a!==void 0&&(o.add=a),e(this.scene,c,o),c})},24961:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(31559),l=t(39429);l.register("container",function(i,s,r){return this.displayList.add(new e(this.scene,i,s,r))})},29959:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(72249),i=t(53584),h.exports={renderWebGL:l,renderCanvas:i}},72249:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8054),l=function(i,s,r,o,a,u,f){var v=r.camera;v.addToRenderList(s);var c=s.list,g=c.length;if(g!==0){var p=r,T=s.localTransform;o?(T.loadIdentity(),T.multiply(o),T.translate(s.x,s.y),T.rotate(s.rotation),T.scale(s.scaleX,s.scaleY)):T.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY);var C=s.blendMode!==-1;!C&&p.blendMode!==0&&(p=p.getClone(),p.setBlendMode(0),p.use());for(var M=p,A=s.alpha,R=s.scrollFactorX,P=s.scrollFactorY,L=0;L<g;L++){var F=c[L];if(F.willRender(v)){var w,O,B,I;if(F.alphaTopLeft!==void 0)w=F.alphaTopLeft,O=F.alphaTopRight,B=F.alphaBottomLeft,I=F.alphaBottomRight;else{var D=F.alpha;w=D,O=D,B=D,I=D}var N=F.scrollFactorX,z=F.scrollFactorY;!C&&F.blendMode!==M.blendMode&&F.blendMode!==e.BlendModes.SKIP_CHECK?(M=p.getClone(),M.setBlendMode(F.blendMode),M.use()):M=p,F.setScrollFactor(N*R,z*P),F.setAlpha(w*A,O*A,B*A,I*A),F.renderWebGLStep(i,F,M,T,void 0,c,L),F.setAlpha(w,O,B,I),F.setScrollFactor(N,z)}}M!==r&&M.release()}};h.exports=l},47407:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(31401),i=t(441),s=t(95643),r=t(41212),o=t(35846),a=t(44594),u=t(61369),f=new e({Extends:s,Mixins:[l.AlphaSingle,l.BlendMode,l.Depth,l.Origin,l.ScrollFactor,l.Transform,l.Visible,i],initialize:function(c,g,p,T,C,M){if(s.call(this,c,"DOMElement"),this.parent=c.sys.game.domContainer,!this.parent)throw new Error("No DOM Container set in game config");this.cache=c.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(g,p),typeof T=="string"?T[0]==="#"?this.setElement(T.substr(1),C,M):this.createElement(T,C,M):T&&this.setElement(T,C,M),c.sys.events.on(a.SLEEP,this.handleSceneEvent,this),c.sys.events.on(a.WAKE,this.handleSceneEvent,this),c.sys.events.on(a.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(v){var c=this.node,g=c.style;c&&(g.display=v.settings.visible?"block":"none")},setSkew:function(v,c){return v===void 0&&(v=0),c===void 0&&(c=v),this.skewX=v,this.skewY=c,this},setPerspective:function(v){return this.parent.style.perspective=v+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(v){this.parent.style.perspective=v+"px"}},addListener:function(v){if(this.node){v=v.split(" ");for(var c=0;c<v.length;c++)this.node.addEventListener(v[c],this.handler,!1)}return this},removeListener:function(v){if(this.node){v=v.split(" ");for(var c=0;c<v.length;c++)this.node.removeEventListener(v[c],this.handler)}return this},dispatchNativeEvent:function(v){this.emit(v.type,v)},createElement:function(v,c,g){return this.setElement(document.createElement(v),c,g)},setElement:function(v,c,g){this.removeElement();var p;if(typeof v=="string"?(v[0]==="#"&&(v=v.substr(1)),p=document.getElementById(v)):typeof v=="object"&&v.nodeType===1&&(p=v),!p)return this;if(this.node=p,c&&r(c))for(var T in c)p.style[T]=c[T];else typeof c=="string"&&(p.style=c);return p.style.zIndex="0",p.style.display="inline",p.style.position="absolute",p.phaser=this,this.parent.appendChild(p),g&&(p.innerText=g),this.updateSize()},createFromCache:function(v,c){var g=this.cache.get(v);return g&&this.createFromHTML(g,c),this},createFromHTML:function(v,c){c===void 0&&(c="div"),this.removeElement();var g=document.createElement(c);return this.node=g,g.style.zIndex="0",g.style.display="inline",g.style.position="absolute",g.phaser=this,this.parent.appendChild(g),g.innerHTML=v,this.updateSize()},removeElement:function(){return this.node&&(o(this.node),this.node=null),this},updateSize:function(){var v=this.node;return this.width=v.clientWidth,this.height=v.clientHeight,this.displayWidth=this.width*this.scaleX,this.displayHeight=this.height*this.scaleY,this},getChildByProperty:function(v,c){if(this.node){for(var g=this.node.querySelectorAll("*"),p=0;p<g.length;p++)if(g[p][v]===c)return g[p]}return null},getChildByID:function(v){return this.getChildByProperty("id",v)},getChildByName:function(v){return this.getChildByProperty("name",v)},setClassName:function(v){return this.node&&(this.node.className=v,this.updateSize()),this},setText:function(v){return this.node&&(this.node.innerText=v,this.updateSize()),this},setHTML:function(v){return this.node&&(this.node.innerHTML=v,this.updateSize()),this},preRender:function(){var v=this.parentContainer,c=this.node;c&&v&&!v.willRender()&&(c.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(a.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(a.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(a.PRE_RENDER,this.preRender,this)}});h.exports=f},49381:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(47407),l=t(95643),i=t(61340),s=new i,r=new i,o=new i,a=function(u,f,v,c){if(f.node){v.camera&&(v=v.camera);var g=f.node.style,p=f.scene.sys.settings;if(!g||!p.visible||l.RENDER_MASK!==f.renderFlags||f.cameraFilter!==0&&f.cameraFilter&v.id||f.parentContainer&&!f.parentContainer.willRender()){g.display="none";return}var T=f.parentContainer,C=v.alpha*f.alpha;T&&(C*=T.alpha);var M=s,A=r,R=o,P=f.width*f.originX,L=f.height*f.originY,F="0%",w="0%";M.copyWithScrollFactorFrom(v.matrix,v.scrollX,v.scrollY,f.scrollFactorX,f.scrollFactorY),c?(M.multiply(c),P*=f.scaleX,L*=f.scaleY):(F=100*f.originX+"%",w=100*f.originY+"%"),M.translate(-P,-L),A.applyITRS(f.x,f.y,f.rotation,f.scaleX,f.scaleY),M.multiply(A,R),f.transformOnly||(g.display="block",g.opacity=C,g.zIndex=f._depth,g.pointerEvents=f.pointerEvents,g.mixBlendMode=e[f._blendMode]),g.transform=R.getCSSMatrix()+" skew("+f.skewX+"rad, "+f.skewY+"rad) rotate3d("+f.rotate3d.x+","+f.rotate3d.y+","+f.rotate3d.z+","+f.rotate3d.w+f.rotate3dAngle+")",g.transformOrigin=F+" "+w}};h.exports=a},2611:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(3069),l=t(39429);l.register("dom",function(i,s,r,o,a){var u=new e(this.scene,i,s,r,o,a);return this.displayList.add(u),u})},441:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(49381),i=t(49381),h.exports={renderWebGL:l,renderCanvas:i}},62980:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="addedtoscene"},41337:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="destroy"},44947:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="removedfromscene"},49358:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="complete"},35163:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="created"},97249:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="error"},19483:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="locked"},56059:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="loop"},26772:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="metadata"},64437:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="playing"},83411:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="play"},75780:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="seeked"},67799:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="seeking"},63500:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="stalled"},55541:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="stop"},53208:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="textureready"},4992:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="unlocked"},12:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="unsupported"},51708:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={ADDED_TO_SCENE:t(62980),DESTROY:t(41337),REMOVED_FROM_SCENE:t(44947),VIDEO_COMPLETE:t(49358),VIDEO_CREATED:t(35163),VIDEO_ERROR:t(97249),VIDEO_LOCKED:t(19483),VIDEO_LOOP:t(56059),VIDEO_METADATA:t(26772),VIDEO_PLAY:t(83411),VIDEO_PLAYING:t(64437),VIDEO_SEEKED:t(75780),VIDEO_SEEKING:t(67799),VIDEO_STALLED:t(63500),VIDEO_STOP:t(55541),VIDEO_TEXTURE:t(53208),VIDEO_UNLOCKED:t(4992),VIDEO_UNSUPPORTED:t(12)}},42421:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(31401),i=t(95643),s=t(64993),r=new e({Extends:i,Mixins:[l.Alpha,l.BlendMode,l.Depth,l.Flip,l.Origin,l.ScrollFactor,l.Size,l.Texture,l.Tint,l.Transform,l.Visible,s],initialize:function(a){i.call(this,a,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});h.exports=r},70217:()=>{},56315:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(42421),l=t(39429);l.register("extern",function(){var i=new e(this.scene);return this.displayList.add(i),i})},64993:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(80287),i=t(70217),h.exports={renderWebGL:l,renderCanvas:i}},80287:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=function(i,s,r,o,a,u,f){i.renderNodes.getNode("YieldContext").run(r);var v=e(s,r.camera,o,!r.useCanvas).calc;s.render.call(s,i,r,v,u,f),i.renderNodes.getNode("RebindContext").run(r)};h.exports=l},85592:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(71911),l=t(83419),i=t(85592),s=t(31401),r=t(8497),o=t(95643),a=t(87891),u=t(95540),f=t(35154),v=t(36383),c=t(84503),g=new l({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Lighting,s.Mask,s.RenderNodes,s.Transform,s.Visible,s.ScrollFactor,c],initialize:function(T,C){var M=f(C,"x",0),A=f(C,"y",0);o.call(this,T,"Graphics"),this.setPosition(M,A),this.initRenderNodes(this._defaultRenderNodesMap),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.pathDetailThreshold=-1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(C)},_defaultRenderNodesMap:{get:function(){return a}},setDefaultStyles:function(p){return f(p,"lineStyle",null)&&(this.defaultStrokeWidth=f(p,"lineStyle.width",1),this.defaultStrokeColor=f(p,"lineStyle.color",16777215),this.defaultStrokeAlpha=f(p,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),f(p,"fillStyle",null)&&(this.defaultFillColor=f(p,"fillStyle.color",16777215),this.defaultFillAlpha=f(p,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(p,T,C){return C===void 0&&(C=1),this.commandBuffer.push(i.LINE_STYLE,p,T,C),this._lineWidth=p,this},fillStyle:function(p,T){return T===void 0&&(T=1),this.commandBuffer.push(i.FILL_STYLE,p,T),this},fillGradientStyle:function(p,T,C,M,A,R,P,L){return A===void 0&&(A=1),R===void 0&&(R=A),P===void 0&&(P=A),L===void 0&&(L=A),this.commandBuffer.push(i.GRADIENT_FILL_STYLE,A,R,P,L,p,T,C,M),this},lineGradientStyle:function(p,T,C,M,A,R){return R===void 0&&(R=1),this.commandBuffer.push(i.GRADIENT_LINE_STYLE,p,R,T,C,M,A),this},beginPath:function(){return this.commandBuffer.push(i.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(i.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(i.FILL_PATH),this},fill:function(){return this.commandBuffer.push(i.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(i.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(i.STROKE_PATH),this},fillCircleShape:function(p){return this.fillCircle(p.x,p.y,p.radius)},strokeCircleShape:function(p){return this.strokeCircle(p.x,p.y,p.radius)},fillCircle:function(p,T,C){return this.beginPath(),this.arc(p,T,C,0,v.TAU),this.fillPath(),this},strokeCircle:function(p,T,C){return this.beginPath(),this.arc(p,T,C,0,v.TAU),this.strokePath(),this},fillRectShape:function(p){return this.fillRect(p.x,p.y,p.width,p.height)},strokeRectShape:function(p){return this.strokeRect(p.x,p.y,p.width,p.height)},fillRect:function(p,T,C,M){return this.commandBuffer.push(i.FILL_RECT,p,T,C,M),this},strokeRect:function(p,T,C,M){var A=this._lineWidth/2,R=p-A,P=p+A;return this.beginPath(),this.moveTo(p,T),this.lineTo(p,T+M),this.strokePath(),this.beginPath(),this.moveTo(p+C,T),this.lineTo(p+C,T+M),this.strokePath(),this.beginPath(),this.moveTo(R,T),this.lineTo(P+C,T),this.strokePath(),this.beginPath(),this.moveTo(R,T+M),this.lineTo(P+C,T+M),this.strokePath(),this},fillRoundedRect:function(p,T,C,M,A){A===void 0&&(A=20);var R=A,P=A,L=A,F=A;typeof A!="number"&&(R=u(A,"tl",20),P=u(A,"tr",20),L=u(A,"bl",20),F=u(A,"br",20));var w=R>=0,O=P>=0,B=L>=0,I=F>=0;return R=Math.abs(R),P=Math.abs(P),L=Math.abs(L),F=Math.abs(F),this.beginPath(),this.moveTo(p+R,T),this.lineTo(p+C-P,T),O?this.arc(p+C-P,T+P,P,-v.PI_OVER_2,0):this.arc(p+C,T,P,Math.PI,v.PI_OVER_2,!0),this.lineTo(p+C,T+M-F),I?this.arc(p+C-F,T+M-F,F,0,v.PI_OVER_2):this.arc(p+C,T+M,F,-v.PI_OVER_2,Math.PI,!0),this.lineTo(p+L,T+M),B?this.arc(p+L,T+M-L,L,v.PI_OVER_2,Math.PI):this.arc(p,T+M,L,0,-v.PI_OVER_2,!0),this.lineTo(p,T+R),w?this.arc(p+R,T+R,R,-Math.PI,-v.PI_OVER_2):this.arc(p,T,R,v.PI_OVER_2,0,!0),this.fillPath(),this},strokeRoundedRect:function(p,T,C,M,A){A===void 0&&(A=20);var R=A,P=A,L=A,F=A,w=Math.min(C,M)/2;typeof A!="number"&&(R=u(A,"tl",20),P=u(A,"tr",20),L=u(A,"bl",20),F=u(A,"br",20));var O=R>=0,B=P>=0,I=L>=0,D=F>=0;return R=Math.min(Math.abs(R),w),P=Math.min(Math.abs(P),w),L=Math.min(Math.abs(L),w),F=Math.min(Math.abs(F),w),this.beginPath(),this.moveTo(p+R,T),this.lineTo(p+C-P,T),this.moveTo(p+C-P,T),B?this.arc(p+C-P,T+P,P,-v.PI_OVER_2,0):this.arc(p+C,T,P,Math.PI,v.PI_OVER_2,!0),this.lineTo(p+C,T+M-F),this.moveTo(p+C,T+M-F),D?this.arc(p+C-F,T+M-F,F,0,v.PI_OVER_2):this.arc(p+C,T+M,F,-v.PI_OVER_2,Math.PI,!0),this.lineTo(p+L,T+M),this.moveTo(p+L,T+M),I?this.arc(p+L,T+M-L,L,v.PI_OVER_2,Math.PI):this.arc(p,T+M,L,0,-v.PI_OVER_2,!0),this.lineTo(p,T+R),this.moveTo(p,T+R),O?this.arc(p+R,T+R,R,-Math.PI,-v.PI_OVER_2):this.arc(p,T,R,v.PI_OVER_2,0,!0),this.strokePath(),this},fillPointShape:function(p,T){return this.fillPoint(p.x,p.y,T)},fillPoint:function(p,T,C){return!C||C<1?C=1:(p-=C/2,T-=C/2),this.commandBuffer.push(i.FILL_RECT,p,T,C,C),this},fillTriangleShape:function(p){return this.fillTriangle(p.x1,p.y1,p.x2,p.y2,p.x3,p.y3)},strokeTriangleShape:function(p){return this.strokeTriangle(p.x1,p.y1,p.x2,p.y2,p.x3,p.y3)},fillTriangle:function(p,T,C,M,A,R){return this.commandBuffer.push(i.FILL_TRIANGLE,p,T,C,M,A,R),this},strokeTriangle:function(p,T,C,M,A,R){return this.commandBuffer.push(i.STROKE_TRIANGLE,p,T,C,M,A,R),this},strokeLineShape:function(p){return this.lineBetween(p.x1,p.y1,p.x2,p.y2)},lineBetween:function(p,T,C,M){return this.beginPath(),this.moveTo(p,T),this.lineTo(C,M),this.strokePath(),this},lineTo:function(p,T){return this.commandBuffer.push(i.LINE_TO,p,T),this},moveTo:function(p,T){return this.commandBuffer.push(i.MOVE_TO,p,T),this},strokePoints:function(p,T,C,M){T===void 0&&(T=!1),C===void 0&&(C=!1),M===void 0&&(M=p.length),this.beginPath(),this.moveTo(p[0].x,p[0].y);for(var A=1;A<M;A++)this.lineTo(p[A].x,p[A].y);return T&&this.lineTo(p[0].x,p[0].y),C&&this.closePath(),this.strokePath(),this},fillPoints:function(p,T,C,M){T===void 0&&(T=!1),C===void 0&&(C=!1),M===void 0&&(M=p.length),this.beginPath(),this.moveTo(p[0].x,p[0].y);for(var A=1;A<M;A++)this.lineTo(p[A].x,p[A].y);return T&&this.lineTo(p[0].x,p[0].y),C&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(p,T){T===void 0&&(T=32);var C=p.getPoints(T);return this.strokePoints(C,!0)},strokeEllipse:function(p,T,C,M,A){A===void 0&&(A=32);var R=new r(p,T,C,M),P=R.getPoints(A);return this.strokePoints(P,!0)},fillEllipseShape:function(p,T){T===void 0&&(T=32);var C=p.getPoints(T);return this.fillPoints(C,!0)},fillEllipse:function(p,T,C,M,A){A===void 0&&(A=32);var R=new r(p,T,C,M),P=R.getPoints(A);return this.fillPoints(P,!0)},arc:function(p,T,C,M,A,R,P){return R===void 0&&(R=!1),P===void 0&&(P=0),this.commandBuffer.push(i.ARC,p,T,C,M,A,R,P),this},slice:function(p,T,C,M,A,R,P){return R===void 0&&(R=!1),P===void 0&&(P=0),this.commandBuffer.push(i.BEGIN_PATH),this.commandBuffer.push(i.MOVE_TO,p,T),this.commandBuffer.push(i.ARC,p,T,C,M,A,R,P),this.commandBuffer.push(i.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(i.SAVE),this},restore:function(){return this.commandBuffer.push(i.RESTORE),this},translateCanvas:function(p,T){return this.commandBuffer.push(i.TRANSLATE,p,T),this},scaleCanvas:function(p,T){return this.commandBuffer.push(i.SCALE,p,T),this},rotateCanvas:function(p){return this.commandBuffer.push(i.ROTATE,p),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(p,T,C){var M=this.scene.sys,A=M.game.renderer;T===void 0&&(T=M.scale.width),C===void 0&&(C=M.scale.height),g.TargetCamera.setScene(this.scene),g.TargetCamera.setViewport(0,0,T,C),g.TargetCamera.scrollX=this.x,g.TargetCamera.scrollY=this.y;var R,P,L={willReadFrequently:!0};if(typeof p=="string")if(M.textures.exists(p)){R=M.textures.get(p);var F=R.getSourceImage();F instanceof HTMLCanvasElement&&(P=F.getContext("2d",L))}else R=M.textures.createCanvas(p,T,C),P=R.getSourceImage().getContext("2d",L);else p instanceof HTMLCanvasElement&&(P=p.getContext("2d",L));return P&&(this.renderCanvas(A,this,g.TargetCamera,null,P,!1),R&&R.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});g.TargetCamera=new e,h.exports=g},32768:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(85592),l=t(20926),i=function(s,r,o,a,u,f){var v=r.commandBuffer,c=v.length,g=u||s.currentContext;if(!(c===0||!l(s,g,r,o,a))){o.addToRenderList(r);var p=1,T=1,C=0,M=0,A=1,R=0,P=0,L=0;g.beginPath();for(var F=0;F<c;++F){var w=v[F];switch(w){case e.ARC:g.arc(v[F+1],v[F+2],v[F+3],v[F+4],v[F+5],v[F+6]),F+=7;break;case e.LINE_STYLE:A=v[F+1],C=v[F+2],p=v[F+3],R=(C&16711680)>>>16,P=(C&65280)>>>8,L=C&255,g.strokeStyle="rgba("+R+","+P+","+L+","+p+")",g.lineWidth=A,F+=3;break;case e.FILL_STYLE:M=v[F+1],T=v[F+2],R=(M&16711680)>>>16,P=(M&65280)>>>8,L=M&255,g.fillStyle="rgba("+R+","+P+","+L+","+T+")",F+=2;break;case e.BEGIN_PATH:g.beginPath();break;case e.CLOSE_PATH:g.closePath();break;case e.FILL_PATH:f||g.fill();break;case e.STROKE_PATH:f||g.stroke();break;case e.FILL_RECT:f?g.rect(v[F+1],v[F+2],v[F+3],v[F+4]):g.fillRect(v[F+1],v[F+2],v[F+3],v[F+4]),F+=4;break;case e.FILL_TRIANGLE:g.beginPath(),g.moveTo(v[F+1],v[F+2]),g.lineTo(v[F+3],v[F+4]),g.lineTo(v[F+5],v[F+6]),g.closePath(),f||g.fill(),F+=6;break;case e.STROKE_TRIANGLE:g.beginPath(),g.moveTo(v[F+1],v[F+2]),g.lineTo(v[F+3],v[F+4]),g.lineTo(v[F+5],v[F+6]),g.closePath(),f||g.stroke(),F+=6;break;case e.LINE_TO:g.lineTo(v[F+1],v[F+2]),F+=2;break;case e.MOVE_TO:g.moveTo(v[F+1],v[F+2]),F+=2;break;case e.LINE_FX_TO:g.lineTo(v[F+1],v[F+2]),F+=5;break;case e.MOVE_FX_TO:g.moveTo(v[F+1],v[F+2]),F+=5;break;case e.SAVE:g.save();break;case e.RESTORE:g.restore();break;case e.TRANSLATE:g.translate(v[F+1],v[F+2]),F+=2;break;case e.SCALE:g.scale(v[F+1],v[F+2]),F+=2;break;case e.ROTATE:g.rotate(v[F+1]),F+=1;break;case e.GRADIENT_FILL_STYLE:F+=5;break;case e.GRADIENT_LINE_STYLE:F+=6;break}}g.restore()}};h.exports=i},87079:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(44603),l=t(43831);e.register("graphics",function(i,s){i===void 0&&(i={}),s!==void 0&&(i.add=s);var r=new l(this.scene,i);return i.add&&this.scene.sys.displayList.add(r),r})},1201:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43831),l=t(39429);l.register("graphics",function(i){return this.displayList.add(new e(this.scene,i))})},84503:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(77545),i=t(32768),i=t(32768),h.exports={renderWebGL:l,renderCanvas:i}},77545:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(85592),l=t(91296),i=t(70554),s=t(61340),r=function(T,C,M){this.x=T,this.y=C,this.width=M},o=function(T,C,M){this.points=[],this.points[0]=new r(T,C,M),this.addPoint=function(A,R,P){var L=this.points[this.points.length-1];L.x===A&&L.y===R||this.points.push(new r(A,R,P))}},a=[],u=new s,f=new s,v={TL:0,TR:0,BL:0,BR:0},c={TL:0,TR:0,BL:0,BR:0},g=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],p=function(T,C,M,A){if(C.commandBuffer.length!==0){var R=C.customRenderNodes,P=C.defaultRenderNodes,L=R.Submitter||P.Submitter,F=C.lighting,w=M,O=w.camera;O.addToRenderList(C);for(var B=l(C,O,A,!M.useCanvas).calc,I=u.loadIdentity(),D=C.commandBuffer,N=C.alpha,z=Math.max(C.pathDetailThreshold,T.config.pathDetailThreshold,0),V=1,U=0,G=0,b=0,Y=.01,W=Math.PI*2,H,X=[],K=0,Z=!0,Q=null,j=i.getTintAppendFloatAlpha,J=0;J<D.length;J++)switch(H=D[J],H){case e.BEGIN_PATH:{X.length=0,Q=null,Z=!0;break}case e.CLOSE_PATH:{Z=!1,Q&&Q.points.length&&Q.points.push(Q.points[0]);break}case e.FILL_PATH:{for(B.multiply(I,f),K=0;K<X.length;K++)(R.FillPath||P.FillPath).run(w,f,L,X[K].points,v.TL,v.TR,v.BL,z,F);break}case e.STROKE_PATH:{for(B.multiply(I,f),K=0;K<X.length;K++)(R.StrokePath||P.StrokePath).run(w,L,X[K].points,V,Z,f,c.TL,c.TR,c.BL,c.BR,z,F);break}case e.LINE_STYLE:{V=D[++J];var tt=D[++J],k=D[++J]*N,q=j(tt,k);c.TL=q,c.TR=q,c.BL=q,c.BR=q;break}case e.FILL_STYLE:{var _=D[++J],rt=D[++J]*N,at=j(_,rt);v.TL=at,v.TR=at,v.BL=at,v.BR=at;break}case e.GRADIENT_FILL_STYLE:{var ht=D[++J]*N,ot=D[++J]*N,nt=D[++J]*N,it=D[++J]*N;v.TL=j(D[++J],ht),v.TR=j(D[++J],ot),v.BL=j(D[++J],nt),v.BR=j(D[++J],it);break}case e.GRADIENT_LINE_STYLE:{V=D[++J];var lt=D[++J]*N;c.TL=j(D[++J],lt),c.TR=j(D[++J],lt),c.BL=j(D[++J],lt),c.BR=j(D[++J],lt);break}case e.ARC:{var dt=0,ct=D[++J],Bt=D[++J],Lt=D[++J],zt=D[++J],Kt=D[++J],fe=D[++J],pe=D[++J];for(Kt-=zt,fe?Kt<-W?Kt=-W:Kt>0&&(Kt=-W+Kt%W):Kt>W?Kt=W:Kt<0&&(Kt=W+Kt%W),Q===null&&(Q=new o(ct+Math.cos(zt)*Lt,Bt+Math.sin(zt)*Lt,V),X.push(Q),dt+=Y);dt<1+pe;)b=Kt*dt+zt,U=ct+Math.cos(b)*Lt,G=Bt+Math.sin(b)*Lt,Q.addPoint(U,G,V),dt+=Y;b=Kt+zt,U=ct+Math.cos(b)*Lt,G=Bt+Math.sin(b)*Lt,Q.addPoint(U,G,V);break}case e.FILL_RECT:{B.multiply(I,f),(R.FillRect||P.FillRect).run(w,f,L,D[++J],D[++J],D[++J],D[++J],v.TL,v.TR,v.BL,v.BR,F);break}case e.FILL_TRIANGLE:{B.multiply(I,f),(R.FillTri||P.FillTri).run(w,f,L,D[++J],D[++J],D[++J],D[++J],D[++J],D[++J],v.TL,v.TR,v.BL,F);break}case e.STROKE_TRIANGLE:{B.multiply(I,f),g[0].x=D[++J],g[0].y=D[++J],g[0].width=V,g[1].x=D[++J],g[1].y=D[++J],g[1].width=V,g[2].x=D[++J],g[2].y=D[++J],g[2].width=V,g[3].x=g[0].x,g[3].y=g[0].y,g[3].width=V,(R.StrokePath||P.StrokePath).run(w,L,g,V,!1,f,c.TL,c.TR,c.BL,c.BR,F);break}case e.LINE_TO:{ct=D[++J],Bt=D[++J],Q!==null?Q.addPoint(ct,Bt,V):(Q=new o(ct,Bt,V),X.push(Q));break}case e.MOVE_TO:{Q=new o(D[++J],D[++J],V),X.push(Q);break}case e.SAVE:{a.push(I.copyToArray());break}case e.RESTORE:{I.copyFromArray(a.pop());break}case e.TRANSLATE:{ct=D[++J],Bt=D[++J],I.translate(ct,Bt);break}case e.SCALE:{ct=D[++J],Bt=D[++J],I.scale(ct,Bt);break}case e.ROTATE:{I.rotate(D[++J]);break}}}};h.exports=p},26479:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61061),l=t(83419),i=t(51708),s=t(50792),r=t(46710),o=t(95540),a=t(35154),u=t(97022),f=t(41212),v=t(88492),c=t(68287),g=new l({Extends:s,initialize:function(T,C,M){s.call(this),M?C&&!Array.isArray(C)&&(C=[C]):Array.isArray(C)?f(C[0])&&(M=C,C=null):f(C)&&(M=C,C=null),this.scene=T,this.children=new Set,this.isParent=!0,this.type="Group",this.classType=o(M,"classType",c),this.name=o(M,"name",""),this.active=o(M,"active",!0),this.maxSize=o(M,"maxSize",-1),this.defaultKey=o(M,"defaultKey",null),this.defaultFrame=o(M,"defaultFrame",null),this.runChildUpdate=o(M,"runChildUpdate",!1),this.createCallback=o(M,"createCallback",null),this.removeCallback=o(M,"removeCallback",null),this.createMultipleCallback=o(M,"createMultipleCallback",null),this.internalCreateCallback=o(M,"internalCreateCallback",null),this.internalRemoveCallback=o(M,"internalRemoveCallback",null),C&&this.addMultiple(C),M&&this.createMultiple(M),this.on(i.ADDED_TO_SCENE,this.addedToScene,this),this.on(i.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(p,T,C,M,A,R){if(p===void 0&&(p=0),T===void 0&&(T=0),C===void 0&&(C=this.defaultKey),M===void 0&&(M=this.defaultFrame),A===void 0&&(A=!0),R===void 0&&(R=!0),this.isFull())return null;var P=new this.classType(this.scene,p,T,C,M);return P.addToDisplayList(this.scene.sys.displayList),P.addToUpdateList(),P.visible=A,P.setActive(R),this.add(P),P},createMultiple:function(p){if(this.isFull())return[];Array.isArray(p)||(p=[p]);var T=[];if(p[0].key)for(var C=0;C<p.length;C++){var M=this.createFromConfig(p[C]);T=T.concat(M)}return T},createFromConfig:function(p){if(this.isFull())return[];this.classType=o(p,"classType",this.classType);var T=o(p,"key",void 0),C=o(p,"frame",null),M=o(p,"visible",!0),A=o(p,"active",!0),R=[];if(T===void 0)return R;Array.isArray(T)||(T=[T]),Array.isArray(C)||(C=[C]);var P=o(p,"repeat",0),L=o(p,"randomKey",!1),F=o(p,"randomFrame",!1),w=o(p,"yoyo",!1),O=o(p,"quantity",!1),B=o(p,"frameQuantity",1),I=o(p,"max",0),D=v(T,C,{max:I,qty:O||B,random:L,randomB:F,repeat:P,yoyo:w});p.createCallback&&(this.createCallback=p.createCallback),p.removeCallback&&(this.removeCallback=p.removeCallback),p.internalCreateCallback&&(this.internalCreateCallback=p.internalCreateCallback),p.internalRemoveCallback&&(this.internalRemoveCallback=p.internalRemoveCallback);for(var N=0;N<D.length;N++){var z=this.create(0,0,D[N].a,D[N].b,M,A);if(!z)break;R.push(z)}if(u(p,"setXY")){var V=a(p,"setXY.x",0),U=a(p,"setXY.y",0),G=a(p,"setXY.stepX",0),b=a(p,"setXY.stepY",0);e.SetXY(R,V,U,G,b)}if(u(p,"setRotation")){var Y=a(p,"setRotation.value",0),W=a(p,"setRotation.step",0);e.SetRotation(R,Y,W)}if(u(p,"setScale")){var H=a(p,"setScale.x",1),X=a(p,"setScale.y",H),K=a(p,"setScale.stepX",0),Z=a(p,"setScale.stepY",0);e.SetScale(R,H,X,K,Z)}if(u(p,"setOrigin")){var Q=a(p,"setOrigin.x",.5),j=a(p,"setOrigin.y",Q),J=a(p,"setOrigin.stepX",0),tt=a(p,"setOrigin.stepY",0);e.SetOrigin(R,Q,j,J,tt)}if(u(p,"setAlpha")){var k=a(p,"setAlpha.value",1),q=a(p,"setAlpha.step",0);e.SetAlpha(R,k,q)}if(u(p,"setDepth")){var _=a(p,"setDepth.value",0),rt=a(p,"setDepth.step",0);e.SetDepth(R,_,rt)}if(u(p,"setScrollFactor")){var at=a(p,"setScrollFactor.x",1),ht=a(p,"setScrollFactor.y",at),ot=a(p,"setScrollFactor.stepX",0),nt=a(p,"setScrollFactor.stepY",0);e.SetScrollFactor(R,at,ht,ot,nt)}var it=o(p,"hitArea",null),lt=o(p,"hitAreaCallback",null);it&&e.SetHitArea(R,it,lt);var dt=o(p,"gridAlign",!1);return dt&&e.GridAlign(R,dt),this.createMultipleCallback&&this.createMultipleCallback.call(this,R),R},preUpdate:function(p,T){!this.runChildUpdate||this.children.size===0||this.children.forEach(function(C){C.active&&C.update(p,T)})},add:function(p,T){return T===void 0&&(T=!1),this.isFull()?this:(this.children.add(p),this.internalCreateCallback&&this.internalCreateCallback.call(this,p),this.createCallback&&this.createCallback.call(this,p),T&&(p.addToDisplayList(this.scene.sys.displayList),p.addToUpdateList()),p.on(i.DESTROY,this.remove,this),this)},addMultiple:function(p,T){if(T===void 0&&(T=!1),Array.isArray(p))for(var C=0;C<p.length;C++)this.add(p[C],T);return this},remove:function(p,T,C){return T===void 0&&(T=!1),C===void 0&&(C=!1),this.children.has(p)?(this.children.delete(p),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,p),this.removeCallback&&this.removeCallback.call(this,p),p.off(i.DESTROY,this.remove,this),C?p.destroy():T&&(p.removeFromDisplayList(),p.removeFromUpdateList()),this):this},clear:function(p,T){p===void 0&&(p=!1),T===void 0&&(T=!1);var C=this.children;return C.forEach(function(M){M.off(i.DESTROY,this.remove,this),T?M.destroy():p&&(M.removeFromDisplayList(),M.removeFromUpdateList())},this),C.clear(),this},contains:function(p){return this.children.has(p)},getChildren:function(){return Array.from(this.children)},getLength:function(){return this.children.size},getMatching:function(p,T,C,M){return r(Array.from(this.children),p,T,C,M)},getFirst:function(p,T,C,M,A,R,P){return this.getHandler(!0,1,p,T,C,M,A,R,P)},getFirstNth:function(p,T,C,M,A,R,P,L){return this.getHandler(!0,p,T,C,M,A,R,P,L)},getLast:function(p,T,C,M,A,R,P){return this.getHandler(!1,1,p,T,C,M,A,R,P)},getLastNth:function(p,T,C,M,A,R,P,L){return this.getHandler(!1,p,T,C,M,A,R,P,L)},getHandler:function(p,T,C,M,A,R,P,L,F){C===void 0&&(C=!1),M===void 0&&(M=!1);var w,O,B=0,I=Array.from(this.children);if(p)for(O=0;O<I.length;O++)if(w=I[O],w.active===C){if(B++,B===T)break}else w=null;else for(O=I.length-1;O>=0;O--)if(w=I[O],w.active===C){if(B++,B===T)break}else w=null;return w?(typeof A=="number"&&(w.x=A),typeof R=="number"&&(w.y=R),w):M?this.create(A,R,P,L,F):null},get:function(p,T,C,M,A){return this.getFirst(!1,!0,p,T,C,M,A)},getFirstAlive:function(p,T,C,M,A,R){return this.getFirst(!0,p,T,C,M,A,R)},getFirstDead:function(p,T,C,M,A,R){return this.getFirst(!1,p,T,C,M,A,R)},playAnimation:function(p,T){return e.PlayAnimation(Array.from(this.children),p,T),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(p){p===void 0&&(p=!0);var T=0;return this.children.forEach(function(C){C.active===p&&T++}),T},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var p=this.getTotalUsed(),T=this.maxSize===-1?999999999999:this.maxSize;return T-p},setActive:function(p){return this.active=p,this},setName:function(p){return this.name=p,this},propertyValueSet:function(p,T,C,M,A){return e.PropertyValueSet(Array.from(this.children),p,T,C,M,A),this},propertyValueInc:function(p,T,C,M,A){return e.PropertyValueInc(Array.from(this.children),p,T,C,M,A),this},setX:function(p,T){return e.SetX(Array.from(this.children),p,T),this},setY:function(p,T){return e.SetY(Array.from(this.children),p,T),this},setXY:function(p,T,C,M){return e.SetXY(Array.from(this.children),p,T,C,M),this},incX:function(p,T){return e.IncX(Array.from(this.children),p,T),this},incY:function(p,T){return e.IncY(Array.from(this.children),p,T),this},incXY:function(p,T,C,M){return e.IncXY(Array.from(this.children),p,T,C,M),this},shiftPosition:function(p,T,C){return e.ShiftPosition(Array.from(this.children),p,T,C),this},angle:function(p,T){return e.Angle(Array.from(this.children),p,T),this},rotate:function(p,T){return e.Rotate(Array.from(this.children),p,T),this},rotateAround:function(p,T){return e.RotateAround(Array.from(this.children),p,T),this},rotateAroundDistance:function(p,T,C){return e.RotateAroundDistance(Array.from(this.children),p,T,C),this},setAlpha:function(p,T){return e.SetAlpha(Array.from(this.children),p,T),this},setTint:function(p,T,C,M){return e.SetTint(Array.from(this.children),p,T,C,M),this},setOrigin:function(p,T,C,M){return e.SetOrigin(Array.from(this.children),p,T,C,M),this},scaleX:function(p,T){return e.ScaleX(Array.from(this.children),p,T),this},scaleY:function(p,T){return e.ScaleY(Array.from(this.children),p,T),this},scaleXY:function(p,T,C,M){return e.ScaleXY(Array.from(this.children),p,T,C,M),this},setDepth:function(p,T){return e.SetDepth(Array.from(this.children),p,T),this},setBlendMode:function(p){return e.SetBlendMode(Array.from(this.children),p),this},setHitArea:function(p,T){return e.SetHitArea(Array.from(this.children),p,T),this},shuffle:function(){return e.Shuffle(Array.from(this.children)),this},kill:function(p){this.children.has(p)&&p.setActive(!1)},killAndHide:function(p){this.children.has(p)&&(p.setActive(!1),p.setVisible(!1))},setVisible:function(p,T,C){return e.SetVisible(Array.from(this.children),p,T,C),this},toggleVisible:function(){return e.ToggleVisible(Array.from(this.children)),this},destroy:function(p,T){p===void 0&&(p=!1),T===void 0&&(T=!1),!(!this.scene||this.ignoreDestroy)&&(this.emit(i.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(T,p),this.scene=void 0,this.children=void 0)}});h.exports=g},94975:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(44603),l=t(26479);e.register("group",function(i){return new l(this.scene,null,i)})},3385:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26479),l=t(39429);l.register("group",function(i,s){return this.updateList.add(new e(this.scene,i,s))})},88571:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40939),l=t(83419),i=t(31401),s=t(95643),r=t(59819),o=new l({Extends:s,Mixins:[i.Alpha,i.BlendMode,i.Depth,i.Flip,i.GetBounds,i.Lighting,i.Mask,i.Origin,i.RenderNodes,i.ScrollFactor,i.Size,i.TextureCrop,i.Tint,i.Transform,i.Visible,r],initialize:function(u,f,v,c,g){s.call(this,u,"Image"),this._crop=this.resetCropObject(),this.setTexture(c,g),this.setPosition(f,v),this.setSizeToFrame(),this.setOriginFromFrame(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return e}}});h.exports=o},40652:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l.addToRenderList(e),t.batchSprite(e,e.frame,l,i)};h.exports=d},82459:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(88571);l.register("image",function(r,o){r===void 0&&(r={});var a=i(r,"key",null),u=i(r,"frame",null),f=new s(this.scene,0,0,a,u);return o!==void 0&&(r.add=o),e(this.scene,f,r),f})},2117:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(88571),l=t(39429);l.register("image",function(i,s,r,o){return this.displayList.add(new e(this.scene,i,s,r,o))})},59819:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(99517),i=t(40652),h.exports={renderWebGL:l,renderCanvas:i}},99517:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(l,e,i,0,s.Texturer||r.Texturer,s.Transformer||r.Transformer)};h.exports=d},77856:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={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),Stamp:t(14727),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),Stamp:t(85326),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),Stamp:t(31479),StaticBitmapText:t(57336),Text:t(71259),TileSprite:t(14167),Zone:t(95261),Video:t(11511)}};e.CaptureFrame=t(43451),e.Shader=t(20071),e.NineSlice=t(28103),e.PointLight=t(80321),e.SpriteGPULayer=t(76573),e.Factories.CaptureFrame=t(20421),e.Factories.Shader=t(74177),e.Factories.NineSlice=t(47521),e.Factories.PointLight=t(71255),e.Factories.SpriteGPULayer=t(96019),e.Creators.CaptureFrame=t(23675),e.Creators.Shader=t(54935),e.Creators.NineSlice=t(28279),e.Creators.PointLight=t(39829),e.Creators.SpriteGPULayer=t(16193),e.Light=t(41432),e.LightsManager=t(61356),e.LightsPlugin=t(88992),h.exports=e},93595:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10312),l=t(83419),i=t(31401),s=t(53774),r=t(45893),o=t(50792),a=t(51708),u=t(73162),f=t(33963),v=t(44594),c=t(19186),g=new l({Extends:u,Mixins:[i.AlphaSingle,i.BlendMode,i.Depth,i.Filters,i.Mask,i.RenderSteps,i.Visible,o,f],initialize:function(T,C){u.call(this,T),o.call(this),this.scene=T,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=T.sys,this.events=T.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.clearAlpha(),this.setBlendMode(e.SKIP_CHECK),C&&this.add(C),this.addRenderStep&&this.addRenderStep(this.renderWebGL),T.sys.queueDepthSort()},setActive:function(p){return this.active=p,this},setName:function(p){return this.name=p,this},setState:function(p){return this.state=p,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(p,T){return this.data||(this.data=new r(this)),this.data.set(p,T),this},incData:function(p,T){return this.data||(this.data=new r(this)),this.data.inc(p,T),this},toggleData:function(p){return this.data||(this.data=new r(this)),this.data.toggle(p),this},getData:function(p){return this.data||(this.data=new r(this)),this.data.get(p)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return s(this)},willRender:function(p){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&p.id)},getIndexList:function(){for(var p=this,T=this.parentContainer,C=[];T&&(C.unshift(T.getIndex(p)),p=T,T.parentContainer);)T=T.parentContainer;return C.unshift(this.displayList.getIndex(p)),C},addChildCallback:function(p){var T=p.displayList;T&&T!==this&&p.removeFromDisplayList(),p.displayList||(this.queueDepthSort(),p.displayList=this,p.emit(a.ADDED_TO_SCENE,p,this.scene),this.events.emit(v.ADDED_TO_SCENE,p,this.scene))},removeChildCallback:function(p){this.queueDepthSort(),p.displayList=null,p.emit(a.REMOVED_FROM_SCENE,p,this.scene),this.events.emit(v.REMOVED_FROM_SCENE,p,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(c(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(p,T){return p._depth-T._depth},getChildren:function(){return this.list},addToDisplayList:function(p){return p===void 0&&(p=this.scene.sys.displayList),this.displayList&&this.displayList!==p&&this.removeFromDisplayList(),p.exists(this)||(this.displayList=p,p.add(this,!0),p.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),p.events.emit(v.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var p=this.displayList||this.scene.sys.displayList;return p.exists(this)&&(p.remove(this,!0),p.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),p.events.emit(v.REMOVED_FROM_SCENE,this,this.scene)),this},getDisplayList:function(){var p=null;return this.parentContainer?p=this.parentContainer.list:this.displayList&&(p=this.displayList.list),p},destroy:function(p){if(!(!this.scene||this.ignoreDestroy)){this.emit(a.DESTROY,this);for(var T=this.list;T.length;)T[0].destroy(p);this.removeAllListeners(),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.filterCamera&&(this.filterCamera.destroy(),this.filterCamera=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}}});h.exports=g},2956:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=e.list;if(i.length!==0){e.depthSort();var s=e.blendMode!==-1;s||t.setBlendMode(0);var r=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,l);for(var o=0;o<i.length;o++){var a=i[o];if(a.willRender(l)){var u=a.alpha;!s&&a.blendMode!==t.currentBlendMode&&t.setBlendMode(a.blendMode),a.setAlpha(u*r),a.renderCanvas(t,a,l),a.setAlpha(u)}}e.mask&&e.mask.postRenderCanvas(t)}};h.exports=d},25179:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(93595),i=t(44603),s=t(23568);i.register("layer",function(r,o){r===void 0&&(r={});var a=s(r,"children",null),u=new l(this.scene,a);return o!==void 0&&(r.add=o),e(this.scene,u,r),u})},20005:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(93595),l=t(39429);l.register("layer",function(i){return this.displayList.add(new e(this.scene,i))})},33963:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(15869),i=t(2956),h.exports={renderWebGL:l,renderCanvas:i}},15869:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8054),l=function(i,s,r,o,a,u,f){var v=s.list,c=v.length;if(c!==0){var g=r,p=g.camera;s.depthSort();var T=s.blendMode!==e.BlendModes.SKIP_CHECK;!T&&g.blendMode!==0&&(g=g.getClone(),g.setBlendMode(0),g.use());for(var C=s.alpha,M=0;M<c;M++){var A=v[M];if(A.willRender(p)){var R,P,L,F;if(A.alphaTopLeft!==void 0)R=A.alphaTopLeft,P=A.alphaTopRight,L=A.alphaBottomLeft,F=A.alphaBottomRight;else{var w=A.alpha;R=w,P=w,L=w,F=w}!T&&A.blendMode!==g.blendMode&&A.blendMode!==e.BlendModes.SKIP_CHECK&&(g=g.getClone(),g.setBlendMode(A.blendMode),g.use()),A.setAlpha(R*C,P*C,L*C,F*C),A.renderWebGLStep(i,A,g,void 0,void 0,v,M),A.setAlpha(R,P,L,F)}}g!==r&&g.release()}};h.exports=l},41432:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(96503),l=t(83419),i=t(31401),s=t(51767),r=t(70554),o=new l({Extends:e,Mixins:[i.Origin,i.ScrollFactor,i.Visible],initialize:function(u,f,v,c,g,p,T,C){e.call(this,u,f,v),this.color=new s(c,g,p),this.intensity=T,this.z=C===void 0?v*.1:C,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(v)},displayWidth:{get:function(){return this.diameter},set:function(a){this.diameter=a}},displayHeight:{get:function(){return this.diameter},set:function(a){this.diameter=a}},width:{get:function(){return this.diameter},set:function(a){this.diameter=a}},height:{get:function(){return this.diameter},set:function(a){this.diameter=a}},zNormal:{get:function(){return this.z/this.radius},set:function(a){this.z=a*this.radius}},willRender:function(a){return!(o.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&a.id)},setColor:function(a){var u=r.getFloatsFromUintRGB(a);return this.color.set(u[0],u[1],u[2]),this},setIntensity:function(a){return this.intensity=a,this},setRadius:function(a){return this.radius=a,this},setZ:function(a){return this.z=a,this},setZNormal:function(a){return this.z=a*this.radius,this}});o.RENDER_MASK=15,h.exports=o},61356:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(81491),l=t(83419),i=t(20339),s=t(41432),r=t(80321),o=t(51767),a=t(19133),u=t(19186),f=t(70554),v=new l({initialize:function(){this.lights=[],this.ambientColor=new o(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(c,g,p,T,C,M){return this.systems.displayList.add(new r(this.scene,c,g,p,T,C,M))},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(c){for(var g=this.lights,p=c.worldView,T=[],C=0;C<g.length;C++){var M=g[C];M.willRender(c)&&e(M,p)&&T.push({light:M,distance:i(M.x,M.y,p.centerX,p.centerY)})}return T.length>this.maxLights&&(u(T,this.sortByDistance),T=T.slice(0,this.maxLights)),this.visibleLights=T.length,T},sortByDistance:function(c,g){return c.distance>=g.distance},setAmbientColor:function(c){var g=f.getFloatsFromUintRGB(c);return this.ambientColor.set(g[0],g[1],g[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(c,g,p,T,C,M){c===void 0&&(c=0),g===void 0&&(g=0),p===void 0&&(p=128),T===void 0&&(T=16777215),C===void 0&&(C=1),M===void 0&&(M=p*.1);var A=f.getFloatsFromUintRGB(T),R=new s(c,g,p,A[0],A[1],A[2],C,M);return this.lights.push(R),R},removeLight:function(c){var g=this.lights.indexOf(c);return g>=0&&a(this.lights,g),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});h.exports=v},88992:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(61356),i=t(37277),s=t(44594),r=new e({Extends:l,initialize:function(a){this.scene=a,this.systems=a.sys,a.sys.settings.isBooted||a.sys.events.once(s.BOOT,this.boot,this),l.call(this)},boot:function(){var o=this.systems.events;o.on(s.SHUTDOWN,this.shutdown,this),o.on(s.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});i.register("LightsPlugin",r,"lights"),h.exports=r},28103:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(30529),l=t(83419),i=t(31401),s=t(95643),r=t(78023),o=t(82513),a=new l({Extends:s,Mixins:[i.AlphaSingle,i.BlendMode,i.Depth,i.GetBounds,i.Mask,i.Origin,i.RenderNodes,i.ScrollFactor,i.Texture,i.Transform,i.Visible,r],initialize:function(f,v,c,g,p,T,C,M,A,R,P){s.call(this,f,"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 L=f.textures.getFrame(g,p);this.is3Slice=!R&&!P,L&&L.scale9&&(this.is3Slice=L.is3Slice);for(var F=this.is3Slice?18:54,w=0;w<F;w++)this.vertices.push(new o);this.setPosition(v,c),this.setTexture(g,p),this.setSlices(T,C,M,A,R,P,!1),this.updateDisplayOrigin(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return e}},setSlices:function(u,f,v,c,g,p,T){v===void 0&&(v=10),c===void 0&&(c=10),g===void 0&&(g=0),p===void 0&&(p=0),T===void 0&&(T=!1);var C=this.frame,M=!1;if(this.is3Slice&&T&&g!==0&&p!==0&&(M=!0),M)console.warn("Cannot change 9 slice to 3 slice");else{if(C&&C.scale9&&!T){var A=C.data.scale9Borders,R=A.x,P=A.y;v=R,c=C.width-A.w-R,g=P,p=C.height-A.h-P,u===void 0&&(u=C.width),f===void 0&&(f=C.height)}else u===void 0&&(u=256),f===void 0&&(f=256);this._width=u,this._height=f,this.leftWidth=v,this.rightWidth=c,this.topHeight=g,this.bottomHeight=p,this.is3Slice&&(f=C.height,this._height=f,this.topHeight=f,this.bottomHeight=0),this.updateVertices(),this.updateUVs()}return this},updateUVs:function(){var u=this.leftWidth,f=this.rightWidth,v=this.topHeight,c=this.bottomHeight,g=this.frame.width,p=this.frame.height;this.updateQuadUVs(0,0,0,u/g,v/p),this.updateQuadUVs(6,u/g,0,1-f/g,v/p),this.updateQuadUVs(12,1-f/g,0,1,v/p),this.is3Slice||(this.updateQuadUVs(18,0,v/p,u/g,1-c/p),this.updateQuadUVs(24,u/g,v/p,1-f/g,1-c/p),this.updateQuadUVs(30,1-f/g,v/p,1,1-c/p),this.updateQuadUVs(36,0,1-c/p,u/g,1),this.updateQuadUVs(42,u/g,1-c/p,1-f/g,1),this.updateQuadUVs(48,1-f/g,1-c/p,1,1))},updateVertices:function(){var u=this.leftWidth,f=this.rightWidth,v=this.topHeight,c=this.bottomHeight,g=this.width,p=this.height;this.updateQuad(0,-.5,.5,-.5+u/g,.5-v/p),this.updateQuad(6,-.5+u/g,.5,.5-f/g,.5-v/p),this.updateQuad(12,.5-f/g,.5,.5,.5-v/p),this.is3Slice||(this.updateQuad(18,-.5,.5-v/p,-.5+u/g,-.5+c/p),this.updateQuad(24,-.5+u/g,.5-v/p,.5-f/g,-.5+c/p),this.updateQuad(30,.5-f/g,.5-v/p,.5,-.5+c/p),this.updateQuad(36,-.5,-.5+c/p,-.5+u/g,-.5),this.updateQuad(42,-.5+u/g,-.5+c/p,.5-f/g,-.5),this.updateQuad(48,.5-f/g,-.5+c/p,.5,-.5))},updateQuad:function(u,f,v,c,g){var p=this.width,T=this.height,C=this.originX,M=this.originY,A=this.vertices;A[u+0].resize(f,v,p,T,C,M),A[u+1].resize(f,g,p,T,C,M),A[u+2].resize(c,v,p,T,C,M),A[u+3].resize(f,g,p,T,C,M),A[u+4].resize(c,g,p,T,C,M),A[u+5].resize(c,v,p,T,C,M)},updateQuadUVs:function(u,f,v,c,g){var p=this.vertices,T=this.frame,C=T.u0,M=T.v0,A=T.u1,R=T.v1;if(C!==0||A!==1){var P=A-C;f=C+f*P,c=C+c*P}if(M!==0||R!==1){var L=R-M;v=M+v*L,g=M+g*L}p[u+0].setUVs(f,v),p[u+1].setUVs(f,g),p[u+2].setUVs(c,v),p[u+3].setUVs(f,g),p[u+4].setUVs(c,g),p[u+5].setUVs(c,v)},clearTint:function(){return this.setTint(16777215),this},setTint:function(u){return u===void 0&&(u=16777215),this.tint=u,this.tintFill=!1,this},setTintFill:function(u){return this.setTint(u),this.tintFill=!0,this},isTinted:{get:function(){return this.tint!==16777215}},width:{get:function(){return this._width},set:function(u){this._width=Math.max(u,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(u){this.is3Slice||(this._height=Math.max(u,this.topHeight+this.bottomHeight),this.updateVertices())}},displayWidth:{get:function(){return this.scaleX*this.width},set:function(u){this.scaleX=u/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(u){this.scaleY=u/this.height}},setSize:function(u,f){this.width=u,this.height=f,this.updateDisplayOrigin();var v=this.input;return v&&!v.customHitArea&&(v.hitArea.width=this.width,v.hitArea.height=this.height),this},setDisplaySize:function(u,f){return this.displayWidth=u,this.displayHeight=f,this},originX:{get:function(){return this._originX},set:function(u){this._originX=u,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(u){this._originY=u,this.updateVertices()}},setOrigin:function(u,f){return u===void 0&&(u=.5),f===void 0&&(f=u),this._originX=u,this._originY=f,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var u=this.frame.height;this._height=u,this.topHeight=u,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}});h.exports=a},28279:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(35154),r=t(28103);l.register("nineslice",function(o,a){o===void 0&&(o={});var u=i(o,"key",null),f=i(o,"frame",null),v=s(o,"width",256),c=s(o,"height",256),g=s(o,"leftWidth",10),p=s(o,"rightWidth",10),T=s(o,"topHeight",0),C=s(o,"bottomHeight",0),M=new r(this.scene,0,0,u,f,v,c,g,p,T,C);return a!==void 0&&(o.add=a),e(this.scene,M,o),M})},47521:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(28103),l=t(39429);l.register("nineslice",function(i,s,r,o,a,u,f,v,c,g){return this.displayList.add(new e(this.scene,i,s,r,o,a,u,f,v,c,g))})},78023:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(52230),h.exports={renderWebGL:l,renderCanvas:i}},82513:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(26099),i=new e({Extends:l,initialize:function(r,o,a,u){l.call(this,r,o),this.vx=0,this.vy=0,this.u=a,this.v=u},setUVs:function(s,r){return this.u=s,this.v=r,this},resize:function(s,r,o,a,u,f){return this.x=s,this.y=r,this.vx=this.x*o,this.vy=-this.y*a,u<.5?this.vx+=o*(.5-u):u>.5&&(this.vx-=o*(u-.5)),f<.5?this.vy+=a*(.5-f):f>.5&&(this.vy-=a*(f-.5)),this}});h.exports=i},52230:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=t(70554),i={multiTexturing:!0},s=function(r,o,a,u){var f=o.vertices,v=f.length;if(v!==0){var c=a.camera;c.addToRenderList(o);for(var g=o.alpha,p=o.customRenderNodes.BatchHandler||o.defaultRenderNodes.BatchHandler,T=e(o,c,u,!a.useCanvas).calc,C=l.getTintAppendFloatAlpha(o.tint,g),M=o.frame.source.glTexture,A=o.tintFill,R,P,L,F=0;F<v;F+=6)P=f[F+1],L=f[F+2],R=T.setQuad(P.vx,P.vy,L.vx,L.vy),p.batch(a,M,R[0],R[1],R[2],R[3],R[6],R[7],R[4],R[5],P.u,P.v,L.u-P.u,L.v-P.v,A,C,C,C,C,i)}};h.exports=s},76472:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(44777),i=t(37589),s=t(6113),r=t(91389),o=t(90664),a=new e({Extends:l,initialize:function(f){l.call(this,f,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 u=this.propertyValue,f=u,v=this.defaultEmit,c=this.defaultUpdate;if(this.method===9){this.start=u[0],this.ease=s("Linear"),this.interpolation=r("linear"),v=this.easedValueEmit,c=this.easeValueUpdate,f=u[0],this.active=!0,this.r.length=0,this.g.length=0,this.b.length=0;for(var g=0;g<u.length;g++){var p=o(u[g]);this.r.push(p.r),this.g.push(p.g),this.b.push(p.b)}}return this.onEmit=v,this.onUpdate=c,this.current=f,this},setEase:function(u){this.easeName=u,this.ease=s(u)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(u,f,v){var c=this.ease(v),g=this.interpolation(this.r,c),p=this.interpolation(this.g,c),T=this.interpolation(this.b,c),C=i(g,p,T);return this.current=C,C}});h.exports=a},44777:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(30976),l=t(45319),i=t(83419),s=t(99472),r=t(6113),o=t(95540),a=t(91389),u=t(77720),f=t(15994),v=new i({initialize:function(g,p,T){T===void 0&&(T=!1),this.propertyKey=g,this.propertyValue=p,this.defaultValue=p,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=T,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(c,g){c===void 0&&(c={}),g&&(this.propertyKey=g),this.propertyValue=o(c,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(c){var g;switch(this.method){case 1:case 3:case 8:g=c;break;case 2:this.propertyValue.indexOf(c)>=0&&(g=c);break;case 4:var p=(this.end-this.start)/this.steps;g=u(c,p),this.counter=g;break;case 5:case 6:case 7:g=l(c,this.start,this.end);break;case 9:g=this.start[0];break}return this.current=g,this},getMethod:function(){var c=this.propertyValue;if(c===null)return 0;var g=typeof c;if(g==="number")return 1;if(Array.isArray(c))return 2;if(g==="function")return 3;if(g==="object"){if(this.hasBoth(c,"start","end"))return this.has(c,"steps")?4:5;if(this.hasBoth(c,"min","max"))return 6;if(this.has(c,"random"))return 7;if(this.hasEither(c,"onEmit","onUpdate"))return 8;if(this.hasEither(c,"values","interpolation"))return 9}return 0},setMethods:function(){var c=this.propertyValue,g=c,p=this.defaultEmit,T=this.defaultUpdate;switch(this.method){case 1:p=this.staticValueEmit;break;case 2:p=this.randomStaticValueEmit,g=c[0];break;case 3:this._onEmit=c,p=this.proxyEmit,g=this.defaultValue;break;case 4:this.start=c.start,this.end=c.end,this.steps=c.steps,this.counter=this.start,this.yoyo=this.has(c,"yoyo")?c.yoyo:!1,this.direction=0,p=this.steppedEmit,g=this.start;break;case 5:this.start=c.start,this.end=c.end;var C=this.has(c,"ease")?c.ease:"Linear";this.ease=r(C,c.easeParams),p=this.has(c,"random")&&c.random?this.randomRangedValueEmit:this.easedValueEmit,T=this.easeValueUpdate,g=this.start;break;case 6:this.start=c.min,this.end=c.max,p=this.has(c,"int")&&c.int?this.randomRangedIntEmit:this.randomRangedValueEmit,g=this.start;break;case 7:var M=c.random;Array.isArray(M)&&(this.start=M[0],this.end=M[1]),p=this.randomRangedIntEmit,g=this.start;break;case 8:this._onEmit=this.has(c,"onEmit")?c.onEmit:this.defaultEmit,this._onUpdate=this.has(c,"onUpdate")?c.onUpdate:this.defaultUpdate,p=this.proxyEmit,T=this.proxyUpdate,g=this.defaultValue;break;case 9:this.start=c.values;var A=this.has(c,"ease")?c.ease:"Linear";this.ease=r(A,c.easeParams),this.interpolation=a(c.interpolation),p=this.easedValueEmit,T=this.easeValueUpdate,g=this.start[0];break}return this.onEmit=p,this.onUpdate=T,this.current=g,this},has:function(c,g){return c.hasOwnProperty(g)},hasBoth:function(c,g,p){return c.hasOwnProperty(g)&&c.hasOwnProperty(p)},hasEither:function(c,g,p){return c.hasOwnProperty(g)||c.hasOwnProperty(p)},defaultEmit:function(){return this.defaultValue},defaultUpdate:function(c,g,p,T){return T},proxyEmit:function(c,g,p){var T=this._onEmit(c,g,p);return this.current=T,T},proxyUpdate:function(c,g,p,T){var C=this._onUpdate(c,g,p,T);return this.current=C,C},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var c=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[c],this.current},randomRangedValueEmit:function(c,g){var p=s(this.start,this.end);return c&&c.data[g]&&(c.data[g].min=p,c.data[g].max=this.end),this.current=p,p},randomRangedIntEmit:function(c,g){var p=e(this.start,this.end);return c&&c.data[g]&&(c.data[g].min=p,c.data[g].max=this.end),this.current=p,p},steppedEmit:function(){var c=this.counter,g=c,p=(this.end-this.start)/this.steps;if(this.yoyo){var T;this.direction===0?(g+=p,g>=this.end&&(T=g-this.end,g=this.end-T,this.direction=1)):(g-=p,g<=this.start&&(T=this.start-g,g=this.start+T,this.direction=0)),this.counter=g}else this.counter=f(g+p,this.start,this.end);return this.current=c,c},easedValueEmit:function(c,g){if(c&&c.data[g]){var p=c.data[g];p.min=this.start,p.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(c,g,p){var T=c.data[g],C,M=this.ease(p);return this.interpolation?C=this.interpolation(this.start,M):C=(T.max-T.min)*M+T.min,this.current=C,C},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});h.exports=v},24502:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(95540),i=t(20286),s=new e({Extends:i,initialize:function(o,a,u,f,v){if(typeof o=="object"){var c=o;o=l(c,"x",0),a=l(c,"y",0),u=l(c,"power",0),f=l(c,"epsilon",100),v=l(c,"gravity",50)}else o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=100),v===void 0&&(v=50);i.call(this,o,a,!0),this._gravity=v,this._power=u*v,this._epsilon=f*f},update:function(r,o){var a=this.x-r.x,u=this.y-r.y,f=a*a+u*u;if(f!==0){var v=Math.sqrt(f);f<this._epsilon&&(f=this._epsilon);var c=this._power*o/(f*v)*100;r.velocityX+=a*c,r.velocityY+=u*c}},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 o=this.power;this._gravity=r,this.power=o}}});h.exports=s},56480:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(9674),l=t(45319),i=t(83419),s=t(39506),r=t(87841),o=t(11520),a=t(26099),u=new i({initialize:function(v){this.emitter=v,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new a,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=v.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new e(this)),this.bounds=new r},emit:function(f,v,c,g,p,T){return this.emitter.emit(f,v,c,g,p,T)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(f,v){f===void 0&&(f=0),v===void 0&&(v=0),this.x=f,this.y=v},fire:function(f,v){var c=this.emitter,g=c.ops,p=c.getAnim();if(p?this.anims.play(p):(this.frame=c.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(c.getEmitZone(this),f===void 0?this.x+=g.x.onEmit(this,"x"):g.x.steps>0?this.x+=f+g.x.onEmit(this,"x"):this.x+=f,v===void 0?this.y+=g.y.onEmit(this,"y"):g.y.steps>0?this.y+=v+g.y.onEmit(this,"y"):this.y+=v,this.life=g.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=g.delay.onEmit(this,"delay"),this.holdCurrent=g.hold.onEmit(this,"hold"),this.scaleX=g.scaleX.onEmit(this,"scaleX"),this.scaleY=g.scaleY.active?g.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=g.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),c.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&c.getDeathZone(this))return this.lifeCurrent=0,!1;var T=g.speedX.onEmit(this,"speedX"),C=g.speedY.active?g.speedY.onEmit(this,"speedY"):T;if(c.radial){var M=s(g.angle.onEmit(this,"angle"));this.velocityX=Math.cos(M)*Math.abs(T),this.velocityY=Math.sin(M)*Math.abs(C)}else if(c.moveTo){var A=g.moveToX.onEmit(this,"moveToX"),R=g.moveToY.onEmit(this,"moveToY"),P=this.life/1e3;this.velocityX=(A-this.x)/P,this.velocityY=(R-this.y)/P}else this.velocityX=T,this.velocityY=C;return c.acceleration&&(this.accelerationX=g.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=g.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=g.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=g.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=g.bounce.onEmit(this,"bounce"),this.alpha=g.alpha.onEmit(this,"alpha"),g.color.active?this.tint=g.color.onEmit(this,"tint"):this.tint=g.tint.onEmit(this,"tint"),!0},update:function(f,v,c){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=f,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=f,!1;this.anims&&this.anims.update(0,f);var g=this.emitter,p=g.ops,T=1-this.lifeCurrent/this.life;if(this.lifeT=T,this.x=p.x.onUpdate(this,"x",T,this.x),this.y=p.y.onUpdate(this,"y",T,this.y),g.moveTo){var C=p.moveToX.onUpdate(this,"moveToX",T,g.moveToX),M=p.moveToY.onUpdate(this,"moveToY",T,g.moveToY),A=this.lifeCurrent/1e3;this.velocityX=(C-this.x)/A,this.velocityY=(M-this.y)/A}return this.computeVelocity(g,f,v,c,T),this.scaleX=p.scaleX.onUpdate(this,"scaleX",T,this.scaleX),p.scaleY.active?this.scaleY=p.scaleY.onUpdate(this,"scaleY",T,this.scaleY):this.scaleY=this.scaleX,this.angle=p.rotate.onUpdate(this,"rotate",T,this.angle),this.rotation=s(this.angle),g.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=l(p.alpha.onUpdate(this,"alpha",T,this.alpha),0,1),p.color.active?this.tint=p.color.onUpdate(this,"color",T,this.tint):this.tint=p.tint.onUpdate(this,"tint",T,this.tint),this.lifeCurrent-=f,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(f,v,c,g,p){var T=f.ops,C=this.velocityX,M=this.velocityY,A=T.accelerationX.onUpdate(this,"accelerationX",p,this.accelerationX),R=T.accelerationY.onUpdate(this,"accelerationY",p,this.accelerationY),P=T.maxVelocityX.onUpdate(this,"maxVelocityX",p,this.maxVelocityX),L=T.maxVelocityY.onUpdate(this,"maxVelocityY",p,this.maxVelocityY);this.bounce=T.bounce.onUpdate(this,"bounce",p,this.bounce),C+=f.gravityX*c+A*c,M+=f.gravityY*c+R*c,C=l(C,-P,P),M=l(M,-L,L),this.velocityX=C,this.velocityY=M,this.x+=C*c,this.y+=M*c,f.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var F=0;F<g.length;F++){var w=g[F];w.active&&w.update(this,v,c,p)}},setSizeToFrame:function(){},getBounds:function(f){f===void 0&&(f=this.emitter.getWorldTransformMatrix());var v=Math.abs(f.scaleX)*this.scaleX,c=Math.abs(f.scaleY)*this.scaleY,g=this.x,p=this.y,T=this.rotation,C=this.frame.width*v/2,M=this.frame.height*c/2,A=this.bounds,R=new a(g-C,p-M),P=new a(g+C,p-M),L=new a(g-C,p+M),F=new a(g+C,p+M);return T!==0&&(o(R,g,p,T),o(P,g,p,T),o(L,g,p,T),o(F,g,p,T)),f.transformPoint(R.x,R.y,R),f.transformPoint(P.x,P.y,P),f.transformPoint(L.x,L.y,L),f.transformPoint(F.x,F.y,F),A.x=Math.min(R.x,P.x,L.x,F.x),A.y=Math.min(R.y,P.y,L.y,F.y),A.width=Math.max(R.x,P.x,L.x,F.x)-A.x,A.height=Math.max(R.y,P.y,L.y,F.y)-A.y,A},destroy:function(){this.anims&&this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});h.exports=u},69601:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(20286),i=t(87841),s=new e({Extends:l,initialize:function(o,a,u,f,v,c,g,p){v===void 0&&(v=!0),c===void 0&&(c=!0),g===void 0&&(g=!0),p===void 0&&(p=!0),l.call(this,o,a,!0),this.bounds=new i(o,a,u,f),this.collideLeft=v,this.collideRight=c,this.collideTop=g,this.collideBottom=p},update:function(r){var o=this.bounds,a=-r.bounce,u=r.worldPosition;u.x<o.x&&this.collideLeft?(r.x+=o.x-u.x,r.velocityX*=a):u.x>o.right&&this.collideRight&&(r.x-=u.x-o.right,r.velocityX*=a),u.y<o.y&&this.collideTop?(r.y+=o.y-u.y,r.velocityY*=a):u.y>o.bottom&&this.collideBottom&&(r.y-=u.y-o.bottom,r.velocityY*=a)}});h.exports=s},31600:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(68668),l=t(83419),i=t(31401),s=t(53774),r=t(43459),o=t(26388),a=t(19909),u=t(76472),f=t(44777),v=t(20696),c=t(95643),g=t(95540),p=t(26546),T=t(24502),C=t(69036),M=t(1985),A=t(97022),R=t(86091),P=t(73162),L=t(20074),F=t(269),w=t(56480),O=t(69601),B=t(68875),I=t(87841),D=t(59996),N=t(72905),z=t(90668),V=t(19186),U=t(61340),G=t(26099),b=t(15994),Y=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],W=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],H=new l({Extends:c,Mixins:[i.AlphaSingle,i.BlendMode,i.Depth,i.Lighting,i.Mask,i.RenderNodes,i.ScrollFactor,i.Texture,i.Transform,i.Visible,z],initialize:function(K,Z,Q,j,J){c.call(this,K,"ParticleEmitter"),this.particleClass=w,this.config=null,this.ops={accelerationX:new f("accelerationX",0),accelerationY:new f("accelerationY",0),alpha:new f("alpha",1),angle:new f("angle",{min:0,max:360},!0),bounce:new f("bounce",0),color:new u("color"),delay:new f("delay",0,!0),hold:new f("hold",0,!0),lifespan:new f("lifespan",1e3,!0),maxVelocityX:new f("maxVelocityX",1e4),maxVelocityY:new f("maxVelocityY",1e4),moveToX:new f("moveToX",0),moveToY:new f("moveToY",0),quantity:new f("quantity",1,!0),rotate:new f("rotate",0),scaleX:new f("scaleX",1),scaleY:new f("scaleY",1),speedX:new f("speedX",0,!0),speedY:new f("speedY",0,!0),tint:new f("tint",16777215),x:new f("x",0),y:new f("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 G,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 U,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new P(this),this.tintFill=!1,this.initRenderNodes(this._defaultRenderNodesMap),this.setPosition(Z,Q),this.setTexture(j),J&&this.setConfig(J)},_defaultRenderNodesMap:{get:function(){return e}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(X){if(!X)return this;this.config=X;var K=0,Z="",Q=this.ops;for(K=0;K<W.length;K++)Z=W[K],Q[Z].loadConfig(X);for(K=0;K<Y.length;K++)Z=Y[K],A(X,Z)&&(this[Z]=g(X,Z));if(this.acceleration=this.accelerationX!==0||this.accelerationY!==0,this.moveTo=C(X,["moveToX","moveToY"]),A(X,"speed")&&(Q.speedX.loadConfig(X,"speed"),Q.speedY.active=!1),(M(X,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),A(X,"scale")&&(Q.scaleX.loadConfig(X,"scale"),Q.scaleY.active=!1),A(X,"callbackScope")){var j=g(X,"callbackScope",null);this.emitCallbackScope=j,this.deathCallbackScope=j}if(A(X,"emitZone")&&this.addEmitZone(X.emitZone),A(X,"deathZone")&&this.addDeathZone(X.deathZone),A(X,"bounds")){var J=this.addParticleBounds(X.bounds);J.collideLeft=g(X,"collideLeft",!0),J.collideRight=g(X,"collideRight",!0),J.collideTop=g(X,"collideTop",!0),J.collideBottom=g(X,"collideBottom",!0)}return A(X,"followOffset")&&this.followOffset.setFromObject(g(X,"followOffset",0)),A(X,"texture")&&this.setTexture(X.texture),A(X,"frame")?this.setEmitterFrame(X.frame):A(X,"anim")&&this.setAnim(X.anim),A(X,"reserve")&&this.reserve(X.reserve),A(X,"advance")&&this.fastForward(X.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit(v.START,this),this},updateConfig:function(X){return X&&(this.config?this.setConfig(F(this.config,X)):this.setConfig(X)),this},toJSON:function(){var X=s(this),K=0,Z="";for(K=0;K<Y.length;K++)Z=Y[K],X[Z]=this[Z];var Q=this.ops;for(K=0;K<W.length;K++)Z=W[K],Q[Z]&&(X[Z]=Q[Z].toJSON());return Q.speedY.active||(delete X.speedX,X.speed=Q.speedX.toJSON()),this.scaleX===this.scaleY&&(delete X.scaleX,delete X.scaleY,X.scale=Q.scaleX.toJSON()),X},resetCounters:function(X,K){var Z=this.counters;Z.fill(0),Z[0]=X,K&&(Z[5]=1)},startFollow:function(X,K,Z,Q){return K===void 0&&(K=0),Z===void 0&&(Z=0),Q===void 0&&(Q=!1),this.follow=X,this.followOffset.set(K,Z),this.trackVisible=Q,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var X=this.frames,K=X.length,Z;return K===1?Z=X[0]:this.randomFrame?Z=p(X):(Z=X[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===K&&(this.currentFrame=0))),this.texture.get(Z)},setEmitterFrame:function(X,K,Z){K===void 0&&(K=!0),Z===void 0&&(Z=1),this.randomFrame=K,this.frameQuantity=Z,this.currentFrame=0;var Q=typeof X;if(this.frames.length=0,Array.isArray(X))this.frames=this.frames.concat(X);else if(Q==="string"||Q==="number")this.frames.push(X);else if(Q==="object"){var j=X;X=g(j,"frames",null),X&&(this.frames=this.frames.concat(X));var J=g(j,"cycle",!1);this.randomFrame=!J,this.frameQuantity=g(j,"quantity",Z)}return this.frames.length===1&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var X=this.anims,K=X.length;if(K===0)return null;if(K===1)return X[0];if(this.randomAnim)return p(X);var Z=X[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=b(this.currentAnim+1,0,K)),Z},setAnim:function(X,K,Z){K===void 0&&(K=!0),Z===void 0&&(Z=1),this.randomAnim=K,this.animQuantity=Z,this.currentAnim=0;var Q=typeof X;if(this.anims.length=0,Array.isArray(X))this.anims=this.anims.concat(X);else if(Q==="string")this.anims.push(X);else if(Q==="object"){var j=X;X=g(j,"anims",null),X&&(this.anims=this.anims.concat(X));var J=g(j,"cycle",!1);this.randomAnim=!J,this.animQuantity=g(j,"quantity",Z)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(X){return X===void 0&&(X=!0),this.radial=X,this},addParticleBounds:function(X,K,Z,Q,j,J,tt,k){if(typeof X=="object"){var q=X;X=q.x,K=q.y,Z=A(q,"w")?q.w:q.width,Q=A(q,"h")?q.h:q.height}return this.addParticleProcessor(new O(X,K,Z,Q,j,J,tt,k))},setParticleSpeed:function(X,K){return K===void 0&&(K=X),this.ops.speedX.onChange(X),X===K?this.ops.speedY.active=!1:this.ops.speedY.onChange(K),this.radial=!0,this},setParticleScale:function(X,K){return X===void 0&&(X=1),K===void 0&&(K=X),this.ops.scaleX.onChange(X),this.ops.scaleY.onChange(K),this},setParticleGravity:function(X,K){return this.gravityX=X,this.gravityY=K,this},setParticleAlpha:function(X){return this.ops.alpha.onChange(X),this},setParticleTint:function(X){return this.ops.tint.onChange(X),this},setEmitterAngle:function(X){return this.ops.angle.onChange(X),this},setParticleLifespan:function(X){return this.ops.lifespan.onChange(X),this},setQuantity:function(X){return this.quantity=X,this},setFrequency:function(X,K){return this.frequency=X,this.flowCounter=X>0?X:0,K&&(this.quantity=K),this},addDeathZone:function(X){Array.isArray(X)||(X=[X]);for(var K,Z=[],Q=0;Q<X.length;Q++)if(K=X[Q],K instanceof o)Z.push(K);else if(typeof K.contains=="function")K=new o(K,!0),Z.push(K);else{var j=g(K,"type","onEnter"),J=g(K,"source",null);if(J&&typeof J.contains=="function"){var tt=j==="onEnter";K=new o(J,tt),Z.push(K)}}return this.deathZones=this.deathZones.concat(Z),Z},removeDeathZone:function(X){return N(this.deathZones,X),this},clearDeathZones:function(){return this.deathZones.length=0,this},addEmitZone:function(X){Array.isArray(X)||(X=[X]);for(var K,Z=[],Q=0;Q<X.length;Q++)if(K=X[Q],K instanceof B||K instanceof a)Z.push(K);else{var j=g(K,"source",null);if(j){var J=g(K,"type","random");if(J==="random"&&typeof j.getRandomPoint=="function")K=new B(j),Z.push(K);else if(J==="edge"&&typeof j.getPoints=="function"){var tt=g(K,"quantity",1),k=g(K,"stepRate",0),q=g(K,"yoyo",!1),_=g(K,"seamless",!0),rt=g(K,"total",-1);K=new a(j,tt,k,q,_,rt),Z.push(K)}}}return this.emitZones=this.emitZones.concat(Z),Z},removeEmitZone:function(X){return N(this.emitZones,X),this.zoneIndex=0,this},clearEmitZones:function(){return this.emitZones.length=0,this.zoneIndex=0,this},getEmitZone:function(X){var K=this.emitZones,Z=K.length;if(Z!==0){var Q=K[this.zoneIndex];Q.getPoint(X),Q.total>-1&&(this.zoneTotal++,this.zoneTotal===Q.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===Z&&(this.zoneIndex=0)))}},getDeathZone:function(X){for(var K=this.deathZones,Z=0;Z<K.length;Z++){var Q=K[Z];if(Q.willKill(X))return this.emit(v.DEATH_ZONE,this,X,Q),!0}return!1},setEmitZone:function(X){var K;return isFinite(X)?K=X:K=this.emitZones.indexOf(X),K>=0&&(this.zoneIndex=K),this},addParticleProcessor:function(X){return this.processors.exists(X)||(X.emitter&&X.emitter.removeParticleProcessor(X),this.processors.add(X),X.emitter=this),X},removeParticleProcessor:function(X){return this.processors.exists(X)&&(this.processors.remove(X,!0),X.emitter=null),X},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(X){return this.addParticleProcessor(new T(X))},reserve:function(X){var K=this.dead;if(this.maxParticles>0){var Z=this.getParticleCount();Z+X>this.maxParticles&&(X=this.maxParticles-(Z+X))}for(var Q=0;Q<X;Q++)K.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(X,K){return X===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof X=="function"&&(this.emitCallback=X,K&&(this.emitCallbackScope=K)),this},onParticleDeath:function(X,K){return X===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof X=="function"&&(this.deathCallback=X,K&&(this.deathCallbackScope=K)),this},killAll:function(){for(var X=this.dead,K=this.alive;K.length>0;)X.push(K.pop());return this},forEachAlive:function(X,K){for(var Z=this.alive,Q=Z.length,j=0;j<Q;j++)X.call(K,Z[j],this);return this},forEachDead:function(X,K){for(var Z=this.dead,Q=Z.length,j=0;j<Q;j++)X.call(K,Z[j],this);return this},start:function(X,K){return X===void 0&&(X=0),this.emitting||(X>0&&this.fastForward(X),this.emitting=!0,this.resetCounters(this.frequency,!0),K!==void 0&&(this.duration=Math.abs(K)),this.emit(v.START,this)),this},stop:function(X){return X===void 0&&(X=!1),this.emitting&&(this.emitting=!1,X&&this.killAll(),this.emit(v.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(X,K){return X===void 0&&(X=""),K===void 0&&(K=this.true),this.sortProperty=X,this.sortOrderAsc=K,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(X){return this.sortProperty!==""?X=this.depthSortCallback:X=null,this.sortCallback=X,this},depthSort:function(){return V(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(X,K){var Z=this.sortProperty;return this.sortOrderAsc?X[Z]-K[Z]:K[Z]-X[Z]},flow:function(X,K,Z){return K===void 0&&(K=1),this.emitting=!1,this.frequency=X,this.quantity=K,Z!==void 0&&(this.stopAfter=Z),this.start()},explode:function(X,K,Z){this.frequency=-1,this.resetCounters(-1,!0);var Q=this.emitParticle(X,K,Z);return this.emit(v.EXPLODE,this,Q),Q},emitParticleAt:function(X,K,Z){return this.emitParticle(Z,X,K)},emitParticle:function(X,K,Z){if(!this.atLimit()){X===void 0&&(X=this.ops.quantity.onEmit());for(var Q=this.dead,j=this.stopAfter,J=this.follow?this.follow.x+this.followOffset.x:K,tt=this.follow?this.follow.y+this.followOffset.y:Z,k=0;k<X;k++){var q=Q.pop();if(q||(q=new this.particleClass(this)),q.fire(J,tt)?(this.particleBringToTop?this.alive.push(q):this.alive.unshift(q),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,q,this)):this.dead.push(q),j>0&&(this.stopCounter++,this.stopCounter>=j)||this.atLimit())break}return q}},fastForward:function(X,K){K===void 0&&(K=1e3/60);var Z=0;for(this.skipping=!0;Z<Math.abs(X);)this.preUpdate(0,K),Z+=K;return this.skipping=!1,this},preUpdate:function(X,K){K*=this.timeScale;var Z=K/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var Q=this.getProcessors(),j=this.alive,J=this.dead,tt=0,k=[],q=j.length;for(tt=0;tt<q;tt++){var _=j[tt];_.update(K,Z,Q)&&k.push({index:tt,particle:_})}if(q=k.length,q>0){var rt=this.deathCallback,at=this.deathCallbackScope;for(tt=q-1;tt>=0;tt--){var ht=k[tt];j.splice(ht.index,1),J.push(ht.particle),rt&&rt.call(at,ht.particle),ht.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&j.length===0&&(this.completeFlag=0,this.emit(v.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=K;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=K,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(X){for(var K=this.getWorldTransformMatrix(),Z=this.alive,Q=Z.length,j=[],J=0;J<Q;J++){var tt=Z[J];D(X,tt.getBounds(K))&&j.push(tt)}return j},getBounds:function(X,K,Z,Q){X===void 0&&(X=0),K===void 0&&(K=0),Z===void 0&&(Z=1e3/60),Q===void 0&&(Q=new I);var j=this.getWorldTransformMatrix(),J,tt,k=this.alive,q=!1;if(Q.setTo(0,0,0,0),K>0){var _=0;for(this.skipping=!0;_<Math.abs(K);){for(this.preUpdate(0,Z),J=0;J<k.length;J++)tt=k[J].getBounds(j),q?L(Q,tt):(q=!0,r(tt,Q));_+=Z}this.skipping=!1}else for(J=0;J<k.length;J++)tt=k[J].getBounds(j),q?L(Q,tt):(q=!0,r(tt,Q));return X>0&&R(Q,X,X),Q},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(X){this.ops.x.onChange(X)}},particleY:{get:function(){return this.ops.y.current},set:function(X){this.ops.y.onChange(X)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(X){this.ops.accelerationX.onChange(X)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(X){this.ops.accelerationY.onChange(X)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(X){this.ops.maxVelocityX.onChange(X)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(X){this.ops.maxVelocityY.onChange(X)}},speed:{get:function(){return this.ops.speedX.current},set:function(X){this.ops.speedX.onChange(X),this.ops.speedY.onChange(X)}},speedX:{get:function(){return this.ops.speedX.current},set:function(X){this.ops.speedX.onChange(X)}},speedY:{get:function(){return this.ops.speedY.current},set:function(X){this.ops.speedY.onChange(X)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(X){this.ops.moveToX.onChange(X)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(X){this.ops.moveToY.onChange(X)}},bounce:{get:function(){return this.ops.bounce.current},set:function(X){this.ops.bounce.onChange(X)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(X){this.ops.scaleX.onChange(X)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(X){this.ops.scaleY.onChange(X)}},particleColor:{get:function(){return this.ops.color.current},set:function(X){this.ops.color.onChange(X)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(X){this.ops.color.setEase(X)}},particleTint:{get:function(){return this.ops.tint.current},set:function(X){this.ops.tint.onChange(X)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(X){this.ops.alpha.onChange(X)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(X){this.ops.lifespan.onChange(X)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(X){this.ops.angle.onChange(X)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(X){this.ops.rotate.onChange(X)}},quantity:{get:function(){return this.ops.quantity.current},set:function(X){this.ops.quantity.onChange(X)}},delay:{get:function(){return this.ops.delay.current},set:function(X){this.ops.delay.onChange(X)}},hold:{get:function(){return this.ops.hold.current},set:function(X){this.ops.hold.onChange(X)}},flowCounter:{get:function(){return this.counters[0]},set:function(X){this.counters[0]=X}},frameCounter:{get:function(){return this.counters[1]},set:function(X){this.counters[1]=X}},animCounter:{get:function(){return this.counters[2]},set:function(X){this.counters[2]=X}},elapsed:{get:function(){return this.counters[3]},set:function(X){this.counters[3]=X}},stopCounter:{get:function(){return this.counters[4]},set:function(X){this.counters[4]=X}},completeFlag:{get:function(){return this.counters[5]},set:function(X){this.counters[5]=X}},zoneIndex:{get:function(){return this.counters[6]},set:function(X){this.counters[6]=X}},zoneTotal:{get:function(){return this.counters[7]},set:function(X){this.counters[7]=X}},currentFrame:{get:function(){return this.counters[8]},set:function(X){this.counters[8]=X}},currentAnim:{get:function(){return this.counters[9]},set:function(X){this.counters[9]=X}},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 X,K=this.ops;for(X=0;X<W.length;X++){var Z=W[X];K[Z].destroy()}for(X=0;X<this.alive.length;X++)this.alive[X].destroy();for(X=0;X<this.dead.length;X++)this.dead[X].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}});h.exports=H},9871:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(59996),l=t(61340),i=new l,s=new l,r=new l,o=new l,a=function(u,f,v,c){v.addToRenderList(f),i.copyWithScrollFactorFrom(v.matrix,v.scrollX,v.scrollY,f.scrollFactorX,f.scrollFactorY),c&&i.multiply(c),o.applyITRS(f.x,f.y,f.rotation,f.scaleX,f.scaleY),i.multiply(o);var g=u.currentContext,p=v.roundPixels,T=v.alpha,C=f.alpha,M=f.alive,A=M.length,R=f.viewBounds;if(!(!f.visible||A===0||R&&!e(R,v.worldView))){f.sortCallback&&f.depthSort(),g.save(),g.globalCompositeOperation=u.blendModes[f.blendMode];for(var P=0;P<A;P++){var L=M[P],F=L.alpha*C*T;if(!(F<=0||L.scaleX===0||L.scaleY===0)){r.applyITRS(L.x,L.y,L.rotation,L.scaleX,L.scaleY),i.multiply(r,s);var w=L.frame,O=w.canvasData;if(O.width>0&&O.height>0){var B=-w.halfWidth,I=-w.halfHeight;g.globalAlpha=F,g.save(),s.setToContext(g),p&&(B=Math.round(B),I=Math.round(I)),g.imageSmoothingEnabled=!w.source.scaleMode,g.drawImage(w.source.image,O.x,O.y,O.width,O.height,B,I,O.width,O.height),g.restore()}}}g.restore()}};h.exports=a},92730:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(95540),r=t(31600);l.register("particles",function(o,a){o===void 0&&(o={});var u=i(o,"key",null),f=s(o,"config",null),v=new r(this.scene,0,0,u);return a!==void 0&&(o.add=a),e(this.scene,v,o),f&&v.setConfig(f),v})},676:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(31600);e.register("particles",function(i,s,r,o){return i!==void 0&&typeof i=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new l(this.scene,i,s,r,o))})},90668:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(21188),i=t(9871),h.exports={renderWebGL:l,renderCanvas:i}},21188:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(59996),l=t(61340),i=t(70554),s=new l,r=new l,o=new l,a=new l,u={},f={},v={quad:new Float32Array(8)},c=function(g,p,T,C){var M=T.camera;M.addToRenderList(p),s.copyWithScrollFactorFrom(M.getViewMatrix(!T.useCanvas),M.scrollX,M.scrollY,p.scrollFactorX,p.scrollFactorY),C&&s.multiply(C),a.applyITRS(p.x,p.y,p.rotation,p.scaleX,p.scaleY),s.multiply(a);var A=i.getTintAppendFloatAlpha,R=p.alpha,P=p.alive,L=P.length,F=p.viewBounds;if(!(L===0||F&&!e(F,M.worldView))){p.sortCallback&&p.depthSort();for(var w=p.tintFill,O=0;O<L;O++){var B=P[O],I=B.alpha*R;if(!(I<=0||B.scaleX===0||B.scaleY===0)){o.applyITRS(B.x,B.y,B.rotation,B.scaleX,B.scaleY),s.multiply(o,r);var D=B.frame,N=-D.halfWidth,z=-D.halfHeight;r.setQuad(N,z,N+D.width,z+D.height,v.quad),u.frame!==D&&(u.frame=D,u.uvSource=D);var V=A(B.tint,I);f.tintTopLeft=V,f.tintBottomLeft=V,f.tintTopRight=V,f.tintBottomRight=V,f.tintFill=w;var U,G;if(p.lighting&&(B.texture&&(U=D.texture.dataSource[D.sourceIndex]),G=B.rotation,p.parentContainer)){var b=p.getWorldTransformMatrix(s,r).rotate(B.rotation);G=b.rotationNormalized}var Y=p.customRenderNodes,W=p.defaultRenderNodes;(Y.Submitter||W.Submitter).run(T,p,C,0,u,v,f,U,G)}}}};h.exports=c},20286:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o){s===void 0&&(s=0),r===void 0&&(r=0),o===void 0&&(o=!0),this.emitter,this.x=s,this.y=r,this.active=o},update:function(){},destroy:function(){this.emitter=null}});h.exports=l},9774:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="complete"},812:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="deathzone"},30522:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="explode"},96695:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="start"},18677:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="stop"},20696:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}},18404:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r){this.source=s,this.killOnEnter=r},willKill:function(i){var s=i.worldPosition,r=this.source.contains(s.x,s.y);return r&&this.killOnEnter||!r&&!this.killOnEnter}});h.exports=l},19909:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o,a,u,f){a===void 0&&(a=!1),u===void 0&&(u=!0),f===void 0&&(f=-1),this.source=s,this.points=[],this.quantity=r,this.stepRate=o,this.yoyo=a,this.counter=-1,this.seamless=u,this._length=0,this._direction=0,this.total=f,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var i=this.points[0],s=this.points[this.points.length-1];i.x===s.x&&i.y===s.y&&this.points.pop()}var r=this._length;return this._length=this.points.length,this._length<r&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(i){return this.source=i,this.updateSource()},getPoint:function(i){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 s=this.points[this.counter];s&&(i.x=s.x,i.y=s.y)}});h.exports=l},68875:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(26099),i=new e({initialize:function(r){this.source=r,this._tempVec=new l,this.total=-1},getPoint:function(s){var r=this._tempVec;this.source.getRandomPoint(r),s.x=r.x,s.y=r.y}});h.exports=i},21024:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}},1159:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(31401),i=t(68287),s=new e({Extends:i,Mixins:[l.PathFollower],initialize:function(o,a,u,f,v,c){i.call(this,o,u,f,v,c),this.path=a},preUpdate:function(r,o){this.anims.update(r,o),this.pathUpdate(r)}});h.exports=s},90145:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(1159);e.register("follower",function(i,s,r,o,a){var u=new l(this.scene,i,s,r,o,a);return this.displayList.add(u),this.updateList.add(u),u})},80321:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43246),l=t(83419),i=t(31401),s=t(95643),r=t(30100),o=t(67277),a=new l({Extends:s,Mixins:[i.AlphaSingle,i.BlendMode,i.Depth,i.Mask,i.RenderNodes,i.ScrollFactor,i.Transform,i.Visible,o],initialize:function(f,v,c,g,p,T,C){g===void 0&&(g=16777215),p===void 0&&(p=128),T===void 0&&(T=1),C===void 0&&(C=.1),s.call(this,f,"PointLight"),this.initRenderNodes(this._defaultRenderNodesMap),this.setPosition(v,c),this.color=r(g),this.intensity=T,this.attenuation=C,this.width=p*2,this.height=p*2,this._radius=p},_defaultRenderNodesMap:{get:function(){return e}},radius:{get:function(){return this._radius},set:function(u){this._radius=u,this.width=u*2,this.height=u*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});h.exports=a},39829:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(80321);l.register("pointlight",function(r,o){r===void 0&&(r={});var a=i(r,"color",16777215),u=i(r,"radius",128),f=i(r,"intensity",1),v=i(r,"attenuation",.1),c=new s(this.scene,0,0,a,u,f,v);return o!==void 0&&(r.add=o),e(this.scene,c,r),c})},71255:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(80321);e.register("pointlight",function(i,s,r,o,a,u){return this.displayList.add(new l(this.scene,i,s,r,o,a,u))})},67277:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(57787),h.exports={renderWebGL:l,renderCanvas:i}},57787:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=function(i,s,r,o){var a=r.camera;a.addToRenderList(s);var u=e(s,a,o,!r.useCanvas).calc,f=s.width,v=s.height,c=-s._radius,g=-s._radius,p=c+f,T=g+v,C=u.getX(0,0),M=u.getY(0,0),A=u.getX(c,g),R=u.getY(c,g),P=u.getX(c,T),L=u.getY(c,T),F=u.getX(p,T),w=u.getY(p,T),O=u.getX(p,g),B=u.getY(p,g);(s.customRenderNodes.BatchHandler||s.defaultRenderNodes.BatchHandler).batch(r,s,A,R,P,L,O,B,F,w,C,M)};h.exports=l},591:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(45650),i=t(88571),s=t(83999),r=t(58855),o=new e({Extends:i,Mixins:[s],initialize:function(u,f,v,c,g,p){f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=32),g===void 0&&(g=32),p===void 0&&(p=!0);var T=u.sys.textures.addDynamicTexture(l(),c,g,p);i.call(this,u,f,v,T),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1,this.renderMode=r.RENDER,this.isCurrentlyRendering=!1},setSize:function(a,u){this.width=a,this.height=u,this.updateDisplayOrigin();var f=this.input;return f&&!f.customHitArea&&(f.hitArea.width=a,f.hitArea.height=u),this},resize:function(a,u,f){return this.texture.setSize(a,u,f),this.setSize(this.texture.width,this.texture.height),this},saveTexture:function(a){var u=this.texture;return u.key=a,u.manager.addDynamicTexture(u)&&(this._saved=!0),u},setRenderMode:function(a,u){return this.renderMode=a,u&&this.texture.preserve(!0),this},render:function(){return this.texture.render(),this},fill:function(a,u,f,v,c,g){return this.texture.fill(a,u,f,v,c,g),this},clear:function(a,u,f,v){return this.texture.clear(a,u,f,v),this},stamp:function(a,u,f,v,c){return this.texture.stamp(a,u,f,v,c),this},erase:function(a,u,f){return this.texture.erase(a,u,f),this},draw:function(a,u,f,v,c){return this.texture.draw(a,u,f,v,c),this},capture:function(a,u){return this.texture.capture(a,u),this},repeat:function(a,u,f,v,c,g,p){return this.texture.repeat(a,u,f,v,c,g,p),this},preserve:function(a){return this.texture.preserve(a),this},callback:function(a){return this.texture.callback(a),this},snapshotArea:function(a,u,f,v,c,g,p){return this.texture.snapshotArea(a,u,f,v,c,g,p),this},snapshot:function(a,u,f){return this.texture.snapshot(a,u,f)},snapshotPixel:function(a,u,f){return this.texture.snapshotPixel(a,u,f)},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});h.exports=o},97272:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40652),l=t(58855),i=function(s,r,o,a){var u=!0,f=!0;r.renderMode===l.REDRAW?f=!1:r.renderMode===l.RENDER&&(u=!1),u&&r.render(),f&&e(s,r,o,a)};h.exports=i},34495:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(591);l.register("renderTexture",function(r,o){r===void 0&&(r={});var a=i(r,"x",0),u=i(r,"y",0),f=i(r,"width",32),v=i(r,"height",32),c=new s(this.scene,a,u,f,v);return o!==void 0&&(r.add=o),e(this.scene,c,r),c})},60505:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(591);e.register("renderTexture",function(i,s,r,o){return this.displayList.add(new l(this.scene,i,s,r,o))})},83999:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(53937),i=t(97272),h.exports={renderWebGL:l,renderCanvas:i}},58855:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={RENDER:"render",REDRAW:"redraw",ALL:"all"}},53937:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(99517),l=t(58855),i=function(s,r,o,a){if(!r.isCurrentlyRendering){r.isCurrentlyRendering=!0;var u=!0,f=!0;r.renderMode===l.REDRAW?f=!1:r.renderMode===l.RENDER&&(u=!1),u&&r.render(),f&&e(s,r,o,a),r.isCurrentlyRendering=!1}};h.exports=i},77757:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(9674),l=t(85760),i=t(83419),s=t(31401),r=t(95643),o=t(38745),a=t(26099),u=new i({Extends:r,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Flip,s.Mask,s.RenderNodes,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(v,c,g,p,T,C,M,A,R){p===void 0&&(p="__DEFAULT"),C===void 0&&(C=2),M===void 0&&(M=!0),r.call(this,v,"Rope"),this.anims=new e(this),this.points=C,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=p==="__DEFAULT",this.dirty=!1,this.horizontal=M,this._flipX=!1,this._flipY=!1,this._perp=new a,this.debugCallback=null,this.debugGraphic=null,this.setTexture(p,T),this.setPosition(c,g),this.setSizeToFrame(),this.initRenderNodes(this._defaultRenderNodesMap),Array.isArray(C)&&this.resizeArrays(C.length),this.setPoints(C,A,R),this.updateVertices()},_defaultRenderNodesMap:{get:function(){return l}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(f,v){var c=this.anims.currentFrame;this.anims.update(f,v),this.anims.currentFrame!==c&&(this.updateUVs(),this.updateVertices())},play:function(f,v,c){return this.anims.play(f,v,c),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(f,v,c){return f===void 0&&(f=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(f,v,c))},setVertical:function(f,v,c){return f===void 0&&(f=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(f,v,c)):this},setTintFill:function(f){return f===void 0&&(f=!1),this.tintFill=f,this},setAlphas:function(f,v){var c=this.points.length;if(c<1)return this;var g=this.alphas;f===void 0?f=[1]:!Array.isArray(f)&&v===void 0&&(f=[f]);var p,T=0;if(v!==void 0)for(p=0;p<c;p++)T=p*2,g[T]=f,g[T+1]=v;else if(f.length===c)for(p=0;p<c;p++)T=p*2,g[T]=f[p],g[T+1]=f[p];else{var C=f[0];for(p=0;p<c;p++)T=p*2,f.length>T&&(C=f[T]),g[T]=C,f.length>T+1&&(C=f[T+1]),g[T+1]=C}return this},setColors:function(f){var v=this.points.length;if(v<1)return this;var c=this.colors;f===void 0?f=[16777215]:Array.isArray(f)||(f=[f]);var g,p=0;if(f.length===v)for(g=0;g<v;g++)p=g*2,c[p]=f[g],c[p+1]=f[g];else{var T=f[0];for(g=0;g<v;g++)p=g*2,f.length>p&&(T=f[p]),c[p]=T,f.length>p+1&&(T=f[p+1]),c[p+1]=T}return this},setPoints:function(f,v,c){if(f===void 0&&(f=2),typeof f=="number"){var g=f;g<2&&(g=2),f=[];var p,T,C;if(this.horizontal)for(C=-this.frame.halfWidth,T=this.frame.width/(g-1),p=0;p<g;p++)f.push({x:C+p*T,y:0});else for(C=-this.frame.halfHeight,T=this.frame.height/(g-1),p=0;p<g;p++)f.push({x:0,y:C+p*T})}var M=f.length,A=this.points.length;return M<1?(console.warn("Rope: Not enough points given"),this):(M===1&&(f.unshift({x:0,y:0}),M++),A!==M&&this.resizeArrays(M),this.dirty=!0,this.points=f,this.updateUVs(),v!=null&&this.setColors(v),c!=null&&this.setAlphas(c),this)},updateUVs:function(){for(var f=this.uv,v=this.points.length,c=this.frame.u0,g=this.frame.v0,p=this.frame.u1,T=this.frame.v1,C=(p-c)/(v-1),M=(T-g)/(v-1),A=0;A<v;A++){var R=A*4,P,L,F,w;this.horizontal?(this._flipX?(P=p-A*C,F=p-A*C):(P=c+A*C,F=c+A*C),this._flipY?(L=T,w=g):(L=g,w=T)):(this._flipX?(P=c,F=p):(P=p,F=c),this._flipY?(L=T-A*M,w=T-A*M):(L=g+A*M,w=g+A*M)),f[R+0]=P,f[R+1]=L,f[R+2]=F,f[R+3]=w}return this},resizeArrays:function(f){var v=this.colors,c=this.alphas;this.vertices=new Float32Array(f*4),this.uv=new Float32Array(f*4),v=new Uint32Array(f*2),c=new Float32Array(f*2);for(var g=0;g<f*2;g++)v[g]=16777215,c[g]=1;return this.colors=v,this.alphas=c,this.dirty=!0,this},updateVertices:function(){var f=this._perp,v=this.points,c=this.vertices,g=v.length;if(this.dirty=!1,!(g<1)){for(var p,T=v[0],C=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,M=0;M<g;M++){var A=v[M],R=M*4;M<g-1?p=v[M+1]:p=A,f.x=p.y-T.y,f.y=-(p.x-T.x);var P=f.length();f.x/=P,f.y/=P,f.x*=C,f.y*=C,c[R]=A.x+f.x,c[R+1]=A.y+f.y,c[R+2]=A.x-f.x,c[R+3]=A.y-f.y,T=A}return this}},setDebug:function(f,v){return this.debugGraphic=f,!f&&!v?this.debugCallback=null:v?this.debugCallback=v:this.debugCallback=this.renderDebugVerts,this},renderDebugVerts:function(f,v,c){var g=f.debugGraphic,p=c[0],T=c[1],C=c[2],M=c[3];g.lineBetween(p,T,C,M);for(var A=4;A<v;A+=4){var R=c[A+0],P=c[A+1],L=c[A+2],F=c[A+3];g.lineBetween(p,T,R,P),g.lineBetween(C,M,L,F),g.lineBetween(C,M,R,P),g.lineBetween(R,P,L,F),p=R,T=P,C=L,M=F}},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(f){return this._flipX=f,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(f){return this._flipY=f,this.updateUVs()}}});h.exports=u},95262:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(){};h.exports=d},26209:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(35154),r=t(77757);l.register("rope",function(o,a){o===void 0&&(o={});var u=i(o,"key",null),f=i(o,"frame",null),v=i(o,"horizontal",!0),c=s(o,"points",void 0),g=s(o,"colors",void 0),p=s(o,"alphas",void 0),T=new r(this.scene,0,0,u,f,c,v,g,p);return a!==void 0&&(o.add=a),e(this.scene,T,o),T})},96819:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(77757),l=t(39429);l.register("rope",function(i,s,r,o,a,u,f,v){return this.displayList.add(new e(this.scene,i,s,r,o,a,u,f,v))})},38745:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(20439),i=t(95262),h.exports={renderWebGL:l,renderCanvas:i}},20439:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l={multiTexturing:!1,smoothPixelArt:!1},i=function(s,r,o,a){var u=o.camera;u.addToRenderList(r);var f=e(r,u,a,!o.useCanvas).calc;r.dirty&&r.updateVertices();var v,c=r.texture;c&&c.smoothPixelArt!==null?v=c.smoothPixelArt:v=r.scene.sys.game.config.smoothPixelArt,l.smoothPixelArt=v,(r.customRenderNodes.BatchHandler||r.defaultRenderNodes.BatchHandler).batchStrip(o,r,f,r.texture.source[0].glTexture,r.vertices,r.uv,r.colors,r.alphas,r.alpha,r.tintFill,l,r.debugCallback)};h.exports=i},20071:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(71911),l=t(26099),i=t(55403),s=t(87774),r=t(83419),o=t(95540),a=t(31401),u=t(95643),f=t(25479),v=new r({Extends:u,Mixins:[a.BlendMode,a.ComputedSize,a.Depth,a.GetBounds,a.Origin,a.ScrollFactor,a.Transform,a.Visible,f],initialize:function(g,p,T,C,M,A,R){p===void 0&&(p={}),typeof p=="string"&&(p={fragmentKey:p}),T===void 0&&(T=0),C===void 0&&(C=0),M===void 0&&(M=128),A===void 0&&(A=128),u.call(this,g,"Shader");var P=g.sys.renderer;this.textures=[],this.renderNode=new i(P.renderNodes,p),this.setupUniforms=o(p,"setupUniforms",function(){}),p.updateShaderConfig&&(this.renderNode.updateShaderConfig=p.updateShaderConfig);var L=o(p,"initialUniforms",{});Object.entries(L).forEach(function(F){this.setUniform(F[0],F[1])},this),this.drawingContext=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.textureCoordinateTopLeft=new l(0,1),this.textureCoordinateTopRight=new l(1,1),this.textureCoordinateBottomLeft=new l(0,0),this.textureCoordinateBottomRight=new l(1,0),this.setTextures(R),this.setPosition(T,C),this.setSize(M,A),this.setOrigin(.5,.5)},getUniform:function(c){return this.renderNode.programManager.uniforms[c]},setUniform:function(c,g){return this.renderNode.programManager.setUniform(c,g),this},setTextures:function(c){c===void 0&&(c=[]),this.textures.length=0;for(var g=0;g<c.length;g++){var p=c[g];typeof p=="string"&&(p=this.scene.textures.get(p)),this.textures.push(p)}return this},setRenderToTexture:function(c){if(this.renderToTexture)return this;var g=this.width,p=this.height,T=this.scene.sys.renderer,C=this.scene,M=new e(0,0,g,p).setScene(C.game.scene.systemScene,!1);return this.drawingContext=new s(T,{width:g,height:p,camera:M}),this.glTexture=this.drawingContext.texture,c&&(this.texture=C.sys.textures.addGLTexture(c,this.glTexture)),this.renderToTexture=!0,this.renderWebGLStep(T,this,this.drawingContext),this},renderImmediate:function(){return this.renderWebGLStep(this.scene.renderer,this,this.drawingContext),this},setupUniforms:function(c,g){},setAlpha:function(){return this},setTextureCoordinates:function(c,g,p,T,C,M,A,R){return c===void 0&&(c=0),g===void 0&&(g=1),p===void 0&&(p=1),T===void 0&&(T=1),C===void 0&&(C=0),M===void 0&&(M=0),A===void 0&&(A=1),R===void 0&&(R=0),this.textureCoordinateTopLeft.set(c,g),this.textureCoordinateTopRight.set(p,T),this.textureCoordinateBottomLeft.set(C,M),this.textureCoordinateBottomRight.set(A,R),this},setTextureCoordinatesFromFrame:function(c,g){typeof c=="string"&&(g?typeof g=="string"&&(g=this.scene.textures.get(g)):g=this.textures[0],c=g.get(c));var p=c.u0,T=c.v0,C=c.u1,M=c.v1;this.setTextureCoordinates(p,T,C,T,p,M,C,M)},preDestroy:function(){this.renderNode=null,this.textures.length=0,this.drawingContext&&(this.drawingContext.destroy(),this.texture&&this.texture.destroy(),this.drawingContext=null,this.glTexture=null,this.texture=null)}});h.exports=v},80464:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(){};h.exports=d},54935:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(20071);l.register("shader",function(r,o){r===void 0&&(r={});var a=i(r,"config",null),u=i(r,"x",0),f=i(r,"y",0),v=i(r,"width",128),c=i(r,"height",128),g=new s(this.scene,a,u,f,v,c);return o!==void 0&&(r.add=o),e(this.scene,g,r),g})},74177:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20071),l=t(39429);l.register("shader",function(i,s,r,o,a,u,f){return this.displayList.add(new e(this.scene,i,s,r,o,a,u,f))})},25479:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(19257),i=t(80464),h.exports={renderWebGL:l,renderCanvas:i}},19257:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=l.camera;if(s.addToRenderList(e),e.renderToTexture){if(l=e.drawingContext,l.width!==e.width||l.height!==e.height){var r=e.width,o=e.height;l.resize(r,o),l.camera.setSize(r,o)}l.use()}e.renderNode.run(l,e,i),e.renderToTexture&&l.release()};h.exports=d},10441:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70554),l=function(i,s,r,o,a,u,f){var v=e.getTintAppendFloatAlpha(o.fillColor,o.fillAlpha*a),c=o.pathData,g=o.pathIndexes,p=c.length,T,C,M,A,R,P=Array(p*2),L=Array(p),F=0,w=0;for(T=0;T<p;T+=2)C=c[T]-u,M=c[T+1]-f,A=r.getX(C,M),R=r.getY(C,M),P[F++]=A,P[F++]=R,L[w++]=v;s.batch(i,g,P,L)};h.exports=l},65960:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=l||e.fillColor,r=i||e.fillAlpha,o=(s&16711680)>>>16,a=(s&65280)>>>8,u=s&255;t.fillStyle="rgba("+o+","+a+","+u+","+r+")"};h.exports=d},75177:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=l||e.strokeColor,r=i||e.strokeAlpha,o=(s&16711680)>>>16,a=(s&65280)>>>8,u=s&255;t.strokeStyle="rgba("+o+","+a+","+u+","+r+")",t.lineWidth=e.lineWidth};h.exports=d},17803:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87891),l=t(83419),i=t(31401),s=t(95643),r=t(23031),o=new l({Extends:s,Mixins:[i.AlphaSingle,i.BlendMode,i.Depth,i.GetBounds,i.Lighting,i.Mask,i.Origin,i.RenderNodes,i.ScrollFactor,i.Transform,i.Visible],initialize:function(u,f,v){f===void 0&&(f="Shape"),s.call(this,u,f),this.geom=v,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.width=0,this.height=0,this.enableFilters&&(this.filtersFocusContext=!0),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return e}},setFillStyle:function(a,u){return u===void 0&&(u=1),a===void 0?this.isFilled=!1:(this.fillColor=a,this.fillAlpha=u,this.isFilled=!0),this},setStrokeStyle:function(a,u,f){return f===void 0&&(f=1),a===void 0?this.isStroked=!1:(this.lineWidth=a,this.strokeColor=u,this.strokeAlpha=f,this.isStroked=!0),this},setClosePath:function(a){return this.closePath=a,this},setSize:function(a,u){return this.width=a,this.height=u,this},setDisplaySize:function(a,u){return this.displayWidth=a,this.displayHeight=u,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(a){this.scaleX=a/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(a){this.scaleY=a/this.height}}});h.exports=o},34682:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70554),l=function(i,s,r,o,a,u,f){var v=e.getTintAppendFloatAlpha(o.strokeColor,o.strokeAlpha*a),c=o.pathData,g=c.length-1,p=o.lineWidth,T=!o.closePath,C=o.customRenderNodes.StrokePath||o.defaultRenderNodes.StrokePath,M=[];T&&(g-=2);for(var A=0;A<g;A+=2){var R=c[A]-u,P=c[A+1]-f;A>0&&R===c[A-2]&&P===c[A-1]||M.push({x:R,y:P,width:p})}C.run(i,s,M,p,T,r,v,v,v,v)};h.exports=l},23629:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(13609),l=t(83419),i=t(39506),s=t(94811),r=t(96503),o=t(36383),a=t(17803),u=new l({Extends:a,Mixins:[e],initialize:function(v,c,g,p,T,C,M,A,R){c===void 0&&(c=0),g===void 0&&(g=0),p===void 0&&(p=128),T===void 0&&(T=0),C===void 0&&(C=360),M===void 0&&(M=!1),a.call(this,v,"Arc",new r(0,0,p)),this._startAngle=T,this._endAngle=C,this._anticlockwise=M,this._iterations=.01,this.setPosition(c,g);var P=this.geom.radius*2;this.setSize(P,P),A!==void 0&&this.setFillStyle(A,R),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(f){this._iterations=f,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(f){this.geom.radius=f;var v=f*2;this.setSize(v,v),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(f){this._startAngle=f,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(f){this._endAngle=f,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(f){this._anticlockwise=f,this.updateData()}},setRadius:function(f){return this.radius=f,this},setIterations:function(f){return f===void 0&&(f=.01),this.iterations=f,this},setStartAngle:function(f,v){return this._startAngle=f,v!==void 0&&(this._anticlockwise=v),this.updateData()},setEndAngle:function(f,v){return this._endAngle=f,v!==void 0&&(this._anticlockwise=v),this.updateData()},updateData:function(){var f=this._iterations,v=f,c=this.geom.radius,g=i(this._startAngle),p=i(this._endAngle),T=this._anticlockwise,C=c,M=c;p-=g,T?p<-o.TAU?p=-o.TAU:p>0&&(p=-o.TAU+p%o.TAU):p>o.TAU?p=o.TAU:p<0&&(p=o.TAU+p%o.TAU);for(var A=[C+Math.cos(g)*c,M+Math.sin(g)*c],R;v<1;)R=p*v+g,A.push(C+Math.cos(R)*c,M+Math.sin(R)*c),v+=f;return R=p+g,A.push(C+Math.cos(R)*c,M+Math.sin(R)*c),A.push(C+Math.cos(g)*c,M+Math.sin(g)*c),this.pathIndexes=s(A),this.pathData=A,this}});h.exports=u},42542:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39506),l=t(65960),i=t(75177),s=t(20926),r=function(o,a,u,f){u.addToRenderList(a);var v=o.currentContext;if(s(o,v,a,u,f)){var c=a.radius;v.beginPath(),v.arc(c-a.originX*(c*2),c-a.originY*(c*2),c,e(a._startAngle),e(a._endAngle),a.anticlockwise),a.closePath&&v.closePath(),a.isFilled&&(l(v,a),v.fill()),a.isStroked&&(i(v,a),v.stroke()),v.restore()}};h.exports=r},42563:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(23629),l=t(39429);l.register("arc",function(i,s,r,o,a,u,f,v){return this.displayList.add(new e(this.scene,i,s,r,o,a,u,f,v))}),l.register("circle",function(i,s,r,o,a){return this.displayList.add(new e(this.scene,i,s,r,0,360,!1,o,a))})},13609:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(41447),i=t(42542),h.exports={renderWebGL:l,renderCanvas:i}},41447:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=t(10441),i=t(34682),s=function(r,o,a,u){var f=a.camera;f.addToRenderList(o);var v=e(o,f,u,!a.useCanvas).calc,c=o._displayOriginX,g=o._displayOriginY,p=o.alpha,T=o.customRenderNodes.Submitter||o.defaultRenderNodes.Submitter;o.isFilled&&l(a,T,v,o,p,c,g),o.isStroked&&i(a,T,v,o,p,c,g)};h.exports=s},89:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(33141),i=t(94811),s=t(87841),r=t(17803),o=new e({Extends:r,Mixins:[l],initialize:function(u,f,v,c,g,p){f===void 0&&(f=0),v===void 0&&(v=0),r.call(this,u,"Curve",c),this._smoothness=32,this._curveBounds=new s,this.closePath=!1,this.setPosition(f,v),g!==void 0&&this.setFillStyle(g,p),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(a){this._smoothness=a,this.updateData()}},setSmoothness:function(a){return this._smoothness=a,this.updateData()},updateData:function(){var a=this._curveBounds,u=this._smoothness;this.geom.getBounds(a,u),this.setSize(a.width,a.height),this.updateDisplayOrigin();for(var f=[],v=this.geom.getPoints(u),c=0;c<v.length;c++)f.push(v[c].x,v[c].y);return f.push(v[0].x,v[0].y),this.pathIndexes=i(f),this.pathData=f,this}});h.exports=o},3170:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(75177),i=t(20926),s=function(r,o,a,u){a.addToRenderList(o);var f=r.currentContext;if(i(r,f,o,a,u)){var v=o._displayOriginX+o._curveBounds.x,c=o._displayOriginY+o._curveBounds.y,g=o.pathData,p=g.length-1,T=g[0]-v,C=g[1]-c;f.beginPath(),f.moveTo(T,C),o.closePath||(p-=2);for(var M=2;M<p;M+=2){var A=g[M]-v,R=g[M+1]-c;f.lineTo(A,R)}o.closePath&&f.closePath(),o.isFilled&&(e(f,o),f.fill()),o.isStroked&&(l(f,o),f.stroke()),f.restore()}};h.exports=s},40511:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(89);e.register("curve",function(i,s,r,o,a){return this.displayList.add(new l(this.scene,i,s,r,o,a))})},33141:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(53987),i=t(3170),h.exports={renderWebGL:l,renderCanvas:i}},53987:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10441),l=t(91296),i=t(34682),s=function(r,o,a,u){var f=a.camera;f.addToRenderList(o);var v=l(o,f,u,!a.useCanvas).calc,c=o._displayOriginX+o._curveBounds.x,g=o._displayOriginY+o._curveBounds.y,p=o.alpha,T=o.customRenderNodes.Submitter||o.defaultRenderNodes.Submitter;o.isFilled&&e(a,T,v,o,p,c,g),o.isStroked&&i(a,T,v,o,p,c,g)};h.exports=s},19921:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(94811),i=t(54205),s=t(8497),r=t(17803),o=new e({Extends:r,Mixins:[i],initialize:function(u,f,v,c,g,p,T){f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=128),g===void 0&&(g=128),r.call(this,u,"Ellipse",new s(c/2,g/2,c,g)),this._smoothness=64,this.setPosition(f,v),this.width=c,this.height=g,p!==void 0&&this.setFillStyle(p,T),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(a){this._smoothness=a,this.updateData()}},setSize:function(a,u){return this.width=a,this.height=u,this.geom.setPosition(a/2,u/2),this.geom.setSize(a,u),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(a){return this._smoothness=a,this.updateData()},updateData:function(){for(var a=[],u=this.geom.getPoints(this._smoothness),f=0;f<u.length;f++)a.push(u[f].x,u[f].y);return a.push(u[0].x,u[0].y),this.pathIndexes=l(a),this.pathData=a,this}});h.exports=o},7930:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(75177),i=t(20926),s=function(r,o,a,u){a.addToRenderList(o);var f=r.currentContext;if(i(r,f,o,a,u)){var v=o._displayOriginX,c=o._displayOriginY,g=o.pathData,p=g.length-1,T=g[0]-v,C=g[1]-c;f.beginPath(),f.moveTo(T,C),o.closePath||(p-=2);for(var M=2;M<p;M+=2){var A=g[M]-v,R=g[M+1]-c;f.lineTo(A,R)}f.closePath(),o.isFilled&&(e(f,o),f.fill()),o.isStroked&&(l(f,o),f.stroke()),f.restore()}};h.exports=s},1543:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19921),l=t(39429);l.register("ellipse",function(i,s,r,o,a,u){return this.displayList.add(new e(this.scene,i,s,r,o,a,u))})},54205:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(19467),i=t(7930),h.exports={renderWebGL:l,renderCanvas:i}},19467:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10441),l=t(91296),i=t(34682),s=function(r,o,a,u){var f=a.camera;f.addToRenderList(o);var v=l(o,f,u,!a.useCanvas).calc,c=o._displayOriginX,g=o._displayOriginY,p=o.alpha,T=o.customRenderNodes.Submitter||o.defaultRenderNodes.Submitter;o.isFilled&&e(a,T,v,o,p,c,g),o.isStroked&&i(a,T,v,o,p,c,g)};h.exports=s},30479:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(17803),i=t(26015),s=new e({Extends:l,Mixins:[i],initialize:function(o,a,u,f,v,c,g,p,T,C,M){a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=128),v===void 0&&(v=128),c===void 0&&(c=32),g===void 0&&(g=32),l.call(this,o,"Grid",null),this.cellWidth=c,this.cellHeight=g,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.cellPadding=.5,this.strokeOutside=!1,this.strokeOutsideIncomplete=!0,this.setPosition(a,u),this.setSize(f,v),this.setFillStyle(p,T),C!==void 0&&this.setStrokeStyle(1,C,M),this.updateDisplayOrigin()},setAltFillStyle:function(r,o){return o===void 0&&(o=1),r===void 0?this.showAltCells=!1:(this.altFillColor=r,this.altFillAlpha=o,this.showAltCells=!0),this},setCellPadding:function(r){return this.cellPadding=r||0,this},setStrokeOutside:function(r,o){return this.strokeOutside=r,o!==void 0&&(this.strokeOutsideIncomplete=o),this}});h.exports=s},49912:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(75177),i=t(20926),s=function(r,o,a,u){a.addToRenderList(o);var f=r.currentContext;if(i(r,f,o,a,u)){var v=-o._displayOriginX,c=-o._displayOriginY,g=a.alpha*o.alpha,p=o.width,T=o.height,C=o.cellWidth,M=o.cellHeight,A=Math.ceil(p/C),R=Math.ceil(T/M),P=C,L=M,F=C-(A*C-p),w=M-(R*M-T),O=o.isFilled,B=o.showAltCells,I=o.isStroked,D=o.cellPadding,N=o.lineWidth,z=N/2,V=0,U=0,G=0,b=0,Y=0;if(D&&(P-=D*2,L-=D*2,F-=D*2,w-=D*2),O&&o.fillAlpha>0)for(e(f,o),U=0;U<R;U++)for(B&&(G=U%2),V=0;V<A;V++){if(B&&G){G=0;continue}G++,b=V<A-1?P:F,Y=U<R-1?L:w,b>0&&Y>0&&f.fillRect(v+V*C+D,c+U*M+D,b,Y)}if(B&&o.altFillAlpha>0)for(e(f,o,o.altFillColor,o.altFillAlpha*g),U=0;U<R;U++)for(B&&(G=U%2),V=0;V<A;V++){if(B&&!G){G=1;continue}G=0,b=V<A-1?P:F,Y=U<R-1?L:w,b>0&&Y>0&&f.fillRect(v+V*C+D,c+U*M+D,b,Y)}if(I&&o.strokeAlpha>0){l(f,o,o.strokeColor,o.strokeAlpha*g);var W=o.strokeOutside?0:1;for(V=W;V<A;V++){var H=V*C;f.beginPath(),f.moveTo(H+v,c),f.lineTo(H+v,T+c),f.stroke()}for(U=W;U<R;U++){var X=U*M;f.beginPath(),f.moveTo(v,X+c),f.lineTo(v+p,X+c),f.stroke()}o.strokeOutside&&(p>z&&(f.beginPath(),f.moveTo(p+v,c),f.lineTo(p+v,T+c),f.stroke()),T>z&&(f.beginPath(),f.moveTo(v,T+c),f.lineTo(p+v,T+c),f.stroke()))}f.restore()}};h.exports=s},34137:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(30479);e.register("grid",function(i,s,r,o,a,u,f,v,c,g){return this.displayList.add(new l(this.scene,i,s,r,o,a,u,f,v,c,g))})},26015:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(46161),i=t(49912),h.exports={renderWebGL:l,renderCanvas:i}},46161:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=t(70554),i=function(s,r,o,a){var u=o.camera;u.addToRenderList(r);var f=r.customRenderNodes.FillRect||r.defaultRenderNodes.FillRect,v=r.customRenderNodes.Submitter||r.defaultRenderNodes.Submitter,c=e(r,u,a,!o.useCanvas).calc;c.translate(-r._displayOriginX,-r._displayOriginY);var g=r.alpha,p=r.width,T=r.height,C=r.cellWidth,M=r.cellHeight,A=Math.ceil(p/C),R=Math.ceil(T/M),P=C,L=M,F=C-(A*C-p),w=M-(R*M-T),O,B=r.isFilled,I=r.showAltCells,D=r.isStroked,N=r.cellPadding,z=r.lineWidth,V=z/2,U=0,G=0,b=0,Y=0,W=0;if(N&&(P-=N*2,L-=N*2,F-=N*2,w-=N*2),B&&r.fillAlpha>0)for(O=l.getTintAppendFloatAlpha(r.fillColor,r.fillAlpha*g),G=0;G<R;G++)for(I&&(b=G%2),U=0;U<A;U++){if(I&&b){b=0;continue}b++,Y=U<A-1?P:F,W=G<R-1?L:w,Y>0&&W>0&&f.run(o,c,v,U*C+N,G*M+N,Y,W,O,O,O,O)}if(I&&r.altFillAlpha>0)for(O=l.getTintAppendFloatAlpha(r.altFillColor,r.altFillAlpha*g),G=0;G<R;G++)for(I&&(b=G%2),U=0;U<A;U++){if(I&&!b){b=1;continue}b=0,Y=U<A-1?P:F,W=G<R-1?L:w,Y>0&&W>0&&f.run(o,c,v,U*C+N,G*M+N,Y,W,O,O,O,O)}if(D&&r.strokeAlpha>0){var H=l.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*g),X=r.strokeOutside?0:1;for(U=X;U<A;U++){var K=U*C-V;f.run(o,c,v,K,0,z,T,H,H,H,H)}for(G=X;G<R;G++){var Z=G*M-V;f.run(o,c,v,0,Z,p,z,H,H,H,H)}r.strokeOutside&&r.strokeOutsideIncomplete&&(p>V&&f.run(o,c,v,p-V,0,z,T,H,H,H,H),T>V&&f.run(o,c,v,0,T-V,p,z,H,H,H,H))}};h.exports=i},61475:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(99651),l=t(83419),i=t(17803),s=new l({Extends:i,Mixins:[e],initialize:function(o,a,u,f,v,c,g,p){a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=48),v===void 0&&(v=32),c===void 0&&(c=15658734),g===void 0&&(g=10066329),p===void 0&&(p=13421772),i.call(this,o,"IsoBox",null),this.projection=4,this.fillTop=c,this.fillLeft=g,this.fillRight=p,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(a,u),this.setSize(f,v),this.updateDisplayOrigin()},setProjection:function(r){return this.projection=r,this},setFaces:function(r,o,a){return r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=!0),this.showTop=r,this.showLeft=o,this.showRight=a,this},setFillStyle:function(r,o,a){return this.fillTop=r,this.fillLeft=o,this.fillRight=a,this.isFilled=!0,this}});h.exports=s},11508:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(20926),i=function(s,r,o,a){o.addToRenderList(r);var u=s.currentContext;if(l(s,u,r,o,a)&&r.isFilled){var f=r.width,v=r.height,c=f/2,g=f/r.projection;r.showTop&&(e(u,r,r.fillTop),u.beginPath(),u.moveTo(-c,-v),u.lineTo(0,-g-v),u.lineTo(c,-v),u.lineTo(c,-1),u.lineTo(0,g-1),u.lineTo(-c,-1),u.lineTo(-c,-v),u.fill()),r.showLeft&&(e(u,r,r.fillLeft),u.beginPath(),u.moveTo(-c,0),u.lineTo(0,g),u.lineTo(0,g-v),u.lineTo(-c,-v),u.lineTo(-c,0),u.fill()),r.showRight&&(e(u,r,r.fillRight),u.beginPath(),u.moveTo(c,0),u.lineTo(0,g),u.lineTo(0,g-v),u.lineTo(c,-v),u.lineTo(c,0),u.fill()),u.restore()}};h.exports=i},3933:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(61475);e.register("isobox",function(i,s,r,o,a,u,f){return this.displayList.add(new l(this.scene,i,s,r,o,a,u,f))})},99651:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(68149),i=t(11508),h.exports={renderWebGL:l,renderCanvas:i}},68149:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=t(70554),i=function(s,r,o,a){if(r.isFilled){var u=o.camera;u.addToRenderList(r);var f=r.customRenderNodes.FillTri||r.defaultRenderNodes.FillTri,v=r.customRenderNodes.Submitter||r.defaultRenderNodes.Submitter,c=e(r,u,a,!o.useCanvas).calc,g=r.width,p=r.height,T=g/2,C=g/r.projection,M=r.alpha,A,R,P,L,F,w,O,B,I;r.showTop&&(A=l.getTintAppendFloatAlpha(r.fillTop,M),R=-T,P=-p,L=0,F=-C-p,w=T,O=-p,B=0,I=C-p,f.run(o,c,v,R,P,L,F,w,O,A,A,A),f.run(o,c,v,w,O,B,I,R,P,A,A,A)),r.showLeft&&(A=l.getTintAppendFloatAlpha(r.fillLeft,M),R=-T,P=0,L=0,F=C,w=0,O=C-p,B=-T,I=-p,f.run(o,c,v,R,P,L,F,w,O,A,A,A),f.run(o,c,v,w,O,B,I,R,P,A,A,A)),r.showRight&&(A=l.getTintAppendFloatAlpha(r.fillRight,M),R=T,P=0,L=0,F=C,w=0,O=C-p,B=T,I=-p,f.run(o,c,v,R,P,L,F,w,O,A,A,A),f.run(o,c,v,w,O,B,I,R,P,A,A,A))}};h.exports=i},16933:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(60561),i=t(17803),s=new e({Extends:i,Mixins:[l],initialize:function(o,a,u,f,v,c,g,p,T){a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f=48),v===void 0&&(v=32),c===void 0&&(c=!1),g===void 0&&(g=15658734),p===void 0&&(p=10066329),T===void 0&&(T=13421772),i.call(this,o,"IsoTriangle",null),this.projection=4,this.fillTop=g,this.fillLeft=p,this.fillRight=T,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=c,this.isFilled=!0,this.setPosition(a,u),this.setSize(f,v),this.updateDisplayOrigin()},setProjection:function(r){return this.projection=r,this},setReversed:function(r){return this.isReversed=r,this},setFaces:function(r,o,a){return r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=!0),this.showTop=r,this.showLeft=o,this.showRight=a,this},setFillStyle:function(r,o,a){return this.fillTop=r,this.fillLeft=o,this.fillRight=a,this.isFilled=!0,this}});h.exports=s},79590:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(20926),i=function(s,r,o,a){o.addToRenderList(r);var u=s.currentContext;if(l(s,u,r,o,a)&&r.isFilled){var f=r.width,v=r.height,c=f/2,g=f/r.projection,p=r.isReversed;r.showTop&&p&&(e(u,r,r.fillTop),u.beginPath(),u.moveTo(-c,-v),u.lineTo(0,-g-v),u.lineTo(c,-v),u.lineTo(0,g-v),u.fill()),r.showLeft&&(e(u,r,r.fillLeft),u.beginPath(),p?(u.moveTo(-c,-v),u.lineTo(0,g),u.lineTo(0,g-v)):(u.moveTo(-c,0),u.lineTo(0,g),u.lineTo(0,g-v)),u.fill()),r.showRight&&(e(u,r,r.fillRight),u.beginPath(),p?(u.moveTo(c,-v),u.lineTo(0,g),u.lineTo(0,g-v)):(u.moveTo(c,0),u.lineTo(0,g),u.lineTo(0,g-v)),u.fill()),u.restore()}};h.exports=i},49803:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(16933);e.register("isotriangle",function(i,s,r,o,a,u,f,v){return this.displayList.add(new l(this.scene,i,s,r,o,a,u,f,v))})},60561:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(51503),i=t(79590),h.exports={renderWebGL:l,renderCanvas:i}},51503:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=t(70554),i=function(s,r,o,a){if(r.isFilled){var u=o.camera;u.addToRenderList(r);var f=r.customRenderNodes.FillTri||r.defaultRenderNodes.FillTri,v=r.customRenderNodes.Submitter||r.defaultRenderNodes.Submitter,c=e(r,u,a,!o.useCanvas).calc,g=r.width,p=r.height,T=g/2,C=g/r.projection,M=r.isReversed,A=r.alpha,R,P,L,F,w,O,B;if(r.showTop&&M){R=l.getTintAppendFloatAlpha(r.fillTop,A),P=-T,L=-p,F=0,w=-C-p,O=T,B=-p;var I=0,D=C-p;f.run(o,c,v,P,L,F,w,O,B,R,R,R),f.run(o,c,v,O,B,I,D,P,L,R,R,R)}r.showLeft&&(R=l.getTintAppendFloatAlpha(r.fillLeft,A),M?(P=-T,L=-p,F=0,w=C,O=0,B=C-p):(P=-T,L=0,F=0,w=C,O=0,B=C-p),f.run(o,c,v,P,L,F,w,O,B,R,R,R)),r.showRight&&(R=l.getTintAppendFloatAlpha(r.fillRight,A),M?(P=T,L=-p,F=0,w=C,O=0,B=C-p):(P=T,L=0,F=0,w=C,O=0,B=C-p),f.run(o,c,v,P,L,F,w,O,B,R,R,R))}};h.exports=i},57847:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(17803),i=t(23031),s=t(36823),r=new e({Extends:l,Mixins:[s],initialize:function(a,u,f,v,c,g,p,T,C){u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=128),p===void 0&&(p=0),l.call(this,a,"Line",new i(v,c,g,p));var M=Math.max(1,this.geom.right-this.geom.left),A=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(u,f),this.setSize(M,A),T!==void 0&&this.setStrokeStyle(1,T,C),this.updateDisplayOrigin()},setLineWidth:function(o,a){return a===void 0&&(a=o),this._startWidth=o,this._endWidth=a,this.lineWidth=o,this},setTo:function(o,a,u,f){return this.geom.setTo(o,a,u,f),this}});h.exports=r},17440:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(75177),l=t(20926),i=function(s,r,o,a){o.addToRenderList(r);var u=s.currentContext;if(l(s,u,r,o,a)){var f=r._displayOriginX,v=r._displayOriginY;r.isStroked&&(e(u,r),u.beginPath(),u.moveTo(r.geom.x1-f,r.geom.y1-v),u.lineTo(r.geom.x2-f,r.geom.y2-v),u.stroke()),u.restore()}};h.exports=i},2481:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(57847);e.register("line",function(i,s,r,o,a,u,f,v){return this.displayList.add(new l(this.scene,i,s,r,o,a,u,f,v))})},36823:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(77385),i=t(17440),h.exports={renderWebGL:l,renderCanvas:i}},77385:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=t(70554),i=[{x:0,y:0,width:0},{x:0,y:0,width:0}],s=function(r,o,a,u){var f=a.camera;f.addToRenderList(o);var v=e(o,f,u,!a.useCanvas).calc,c=o._displayOriginX,g=o._displayOriginY,p=o.alpha;if(o.isStroked){var T=l.getTintAppendFloatAlpha(o.strokeColor,o.strokeAlpha*p);i[0].x=o.geom.x1-c,i[0].y=o.geom.y1-g,i[0].width=o._startWidth,i[1].x=o.geom.x2-c,i[1].y=o.geom.y2-g,i[1].width=o._endWidth,(o.customRenderNodes.StrokePath||o.defaultRenderNodes.StrokePath).run(a,o.customRenderNodes.Submitter||o.defaultRenderNodes.Submitter,i,1,!0,v,T,T,T,T)}};h.exports=s},24949:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90273),l=t(83419),i=t(94811),s=t(13829),r=t(25717),o=t(17803),a=t(5469),u=new l({Extends:o,Mixins:[e],initialize:function(v,c,g,p,T,C){c===void 0&&(c=0),g===void 0&&(g=0),o.call(this,v,"Polygon",new r(p));var M=s(this.geom);this.setPosition(c,g),this.setSize(M.width,M.height),T!==void 0&&this.setFillStyle(T,C),this.updateDisplayOrigin(),this.updateData()},smooth:function(f){f===void 0&&(f=1);for(var v=0;v<f;v++)a(this.geom);return this.updateData()},setTo:function(f){this.geom.setTo(f);var v=s(this.geom);return this.setSize(v.width,v.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var f=[],v=this.geom.points,c=0;c<v.length;c++)f.push(v[c].x,v[c].y);return f.push(v[0].x,v[0].y),this.pathIndexes=i(f),this.pathData=f,this}});h.exports=u},38710:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(75177),i=t(20926),s=function(r,o,a,u){a.addToRenderList(o);var f=r.currentContext;if(i(r,f,o,a,u)){var v=o._displayOriginX,c=o._displayOriginY,g=o.pathData,p=g.length-1,T=g[0]-v,C=g[1]-c;f.beginPath(),f.moveTo(T,C),o.closePath||(p-=2);for(var M=2;M<p;M+=2){var A=g[M]-v,R=g[M+1]-c;f.lineTo(A,R)}o.closePath&&f.closePath(),o.isFilled&&(e(f,o),f.fill()),o.isStroked&&(l(f,o),f.stroke()),f.restore()}};h.exports=s},64827:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(24949);e.register("polygon",function(i,s,r,o,a){return this.displayList.add(new l(this.scene,i,s,r,o,a))})},90273:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(73695),i=t(38710),h.exports={renderWebGL:l,renderCanvas:i}},73695:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10441),l=t(91296),i=t(34682),s=function(r,o,a,u){var f=a.camera;f.addToRenderList(o);var v=l(o,f,u,!a.useCanvas).calc,c=o._displayOriginX,g=o._displayOriginY,p=o.alpha,T=o.customRenderNodes.Submitter||o.defaultRenderNodes.Submitter;o.isFilled&&e(a,T,v,o,p,c,g),o.isStroked&&i(a,T,v,o,p,c,g)};h.exports=s},74561:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(94811),i=t(87841),s=t(17803),r=t(95597),o=new e({Extends:s,Mixins:[r],initialize:function(u,f,v,c,g,p,T){f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=128),g===void 0&&(g=128),s.call(this,u,"Rectangle",new i(0,0,c,g)),this.radius=20,this.isRounded=!1,this.setPosition(f,v),this.setSize(c,g),p!==void 0&&this.setFillStyle(p,T),this.updateDisplayOrigin(),this.updateData()},setRounded:function(a){return a===void 0&&(a=16),this.radius=a,this.isRounded=a>0,this.updateRoundedData()},setSize:function(a,u){this.width=a,this.height=u,this.geom.setSize(a,u),this.updateData(),this.updateDisplayOrigin();var f=this.input;return f&&!f.customHitArea&&(f.hitArea.width=a,f.hitArea.height=u),this},updateData:function(){if(this.isRounded)return this.updateRoundedData();var a=[],u=this.geom,f=this._tempLine;return u.getLineA(f),a.push(f.x1,f.y1,f.x2,f.y2),u.getLineB(f),a.push(f.x2,f.y2),u.getLineC(f),a.push(f.x2,f.y2),u.getLineD(f),a.push(f.x2,f.y2),this.pathData=a,this},updateRoundedData:function(){var a=[],u=this.width/2,f=this.height/2,v=Math.min(u,f),c=Math.min(this.radius,v),g=u,p=f,T=Math.max(4,Math.min(16,Math.ceil(c/2)));return this.arcTo(a,g-u+c,p-f+c,c,Math.PI,Math.PI*1.5,T),a.push(g+u-c,p-f),this.arcTo(a,g+u-c,p-f+c,c,Math.PI*1.5,Math.PI*2,T),a.push(g+u,p+f-c),this.arcTo(a,g+u-c,p+f-c,c,0,Math.PI*.5,T),a.push(g-u+c,p+f),this.arcTo(a,g-u+c,p+f-c,c,Math.PI*.5,Math.PI,T),a.push(g-u,p-f+c),this.pathIndexes=l(a),this.pathData=a,this},arcTo:function(a,u,f,v,c,g,p){for(var T=(g-c)/p,C=0;C<=p;C++){var M=c+T*C;a.push(u+Math.cos(M)*v,f+Math.sin(M)*v)}}});h.exports=o},48682:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(75177),i=t(20926),s=function(o,a,u,f,v,c){var g=Math.min(f/2,v/2),p=Math.min(c,g);if(p===0){o.rect(a,u,f,v);return}o.moveTo(a+p,u),o.lineTo(a+f-p,u),o.arcTo(a+f,u,a+f,u+p,p),o.lineTo(a+f,u+v-p),o.arcTo(a+f,u+v,a+f-p,u+v,p),o.lineTo(a+p,u+v),o.arcTo(a,u+v,a,u+v-p,p),o.lineTo(a,u+p),o.arcTo(a,u,a+p,u,p),o.closePath()},r=function(o,a,u,f){u.addToRenderList(a);var v=o.currentContext;if(i(o,v,a,u,f)){var c=a._displayOriginX,g=a._displayOriginY;a.isFilled&&(e(v,a),a.isRounded?(v.beginPath(),s(v,-c,-g,a.width,a.height,a.radius),v.fill()):v.fillRect(-c,-g,a.width,a.height)),a.isStroked&&(l(v,a),v.beginPath(),a.isRounded?s(v,-c,-g,a.width,a.height,a.radius):v.rect(-c,-g,a.width,a.height),v.stroke()),v.restore()}};h.exports=r},87959:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(74561);e.register("rectangle",function(i,s,r,o,a,u){return this.displayList.add(new l(this.scene,i,s,r,o,a,u))})},95597:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(52059),i=t(48682),h.exports={renderWebGL:l,renderCanvas:i}},52059:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10441),l=t(91296),i=t(34682),s=t(70554),r=function(o,a,u,f){var v=u.camera;v.addToRenderList(a);var c=l(a,v,f,!u.useCanvas).calc,g=a._displayOriginX,p=a._displayOriginY,T=a.alpha,C=a.customRenderNodes,M=a.defaultRenderNodes,A=C.Submitter||M.Submitter;if(a.isFilled)if(a.isRounded)e(u,A,c,a,T,g,p);else{var R=s.getTintAppendFloatAlpha(a.fillColor,a.fillAlpha*T);(C.FillRect||M.FillRect).run(u,c,A,-g,-p,a.width,a.height,R,R,R,R)}a.isStroked&&i(u,A,c,a,T,g,p)};h.exports=r},55911:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(81991),l=t(83419),i=t(94811),s=t(17803),r=new l({Extends:s,Mixins:[e],initialize:function(a,u,f,v,c,g,p,T){u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=5),c===void 0&&(c=32),g===void 0&&(g=64),s.call(this,a,"Star",null),this._points=v,this._innerRadius=c,this._outerRadius=g,this.setPosition(u,f),this.setSize(g*2,g*2),p!==void 0&&this.setFillStyle(p,T),this.updateDisplayOrigin(),this.updateData()},setPoints:function(o){return this._points=o,this.updateData()},setInnerRadius:function(o){return this._innerRadius=o,this.updateData()},setOuterRadius:function(o){return this._outerRadius=o,this.updateData()},points:{get:function(){return this._points},set:function(o){this._points=o,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(o){this._innerRadius=o,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(o){this._outerRadius=o,this.updateData()}},updateData:function(){var o=[],a=this._points,u=this._innerRadius,f=this._outerRadius,v=Math.PI/2*3,c=Math.PI/a,g=f,p=f;o.push(g,p+-f);for(var T=0;T<a;T++)o.push(g+Math.cos(v)*f,p+Math.sin(v)*f),v+=c,o.push(g+Math.cos(v)*u,p+Math.sin(v)*u),v+=c;return o.push(g,p+-f),this.pathIndexes=i(o),this.pathData=o,this}});h.exports=r},64272:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(75177),i=t(20926),s=function(r,o,a,u){a.addToRenderList(o);var f=r.currentContext;if(i(r,f,o,a,u)){var v=o._displayOriginX,c=o._displayOriginY,g=o.pathData,p=g.length-1,T=g[0]-v,C=g[1]-c;f.beginPath(),f.moveTo(T,C),o.closePath||(p-=2);for(var M=2;M<p;M+=2){var A=g[M]-v,R=g[M+1]-c;f.lineTo(A,R)}f.closePath(),o.isFilled&&(e(f,o),f.fill()),o.isStroked&&(l(f,o),f.stroke()),f.restore()}};h.exports=s},93697:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(55911),l=t(39429);l.register("star",function(i,s,r,o,a,u,f){return this.displayList.add(new e(this.scene,i,s,r,o,a,u,f))})},81991:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(57017),i=t(64272),h.exports={renderWebGL:l,renderCanvas:i}},57017:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10441),l=t(91296),i=t(34682),s=function(r,o,a,u){var f=a.camera;f.addToRenderList(o);var v=l(o,f,u,!a.useCanvas).calc,c=o._displayOriginX,g=o._displayOriginY,p=o.alpha,T=o.customRenderNodes.Submitter||o.defaultRenderNodes.Submitter;o.isFilled&&e(a,T,v,o,p,c,g),o.isStroked&&i(a,T,v,o,p,c,g)};h.exports=s},36931:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(17803),i=t(16483),s=t(96195),r=new e({Extends:l,Mixins:[s],initialize:function(a,u,f,v,c,g,p,T,C,M,A){u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=128),g===void 0&&(g=64),p===void 0&&(p=0),T===void 0&&(T=128),C===void 0&&(C=128),l.call(this,a,"Triangle",new i(v,c,g,p,T,C));var R=this.geom.right-this.geom.left,P=this.geom.bottom-this.geom.top;this.setPosition(u,f),this.setSize(R,P),M!==void 0&&this.setFillStyle(M,A),this.updateDisplayOrigin(),this.updateData()},setTo:function(o,a,u,f,v,c){return this.geom.setTo(o,a,u,f,v,c),this.updateData()},updateData:function(){var o=[],a=this.geom,u=this._tempLine;return a.getLineA(u),o.push(u.x1,u.y1,u.x2,u.y2),a.getLineB(u),o.push(u.x2,u.y2),a.getLineC(u),o.push(u.x2,u.y2),this.pathData=o,this}});h.exports=r},85172:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(65960),l=t(75177),i=t(20926),s=function(r,o,a,u){a.addToRenderList(o);var f=r.currentContext;if(i(r,f,o,a,u)){var v=o._displayOriginX,c=o._displayOriginY,g=o.geom.x1-v,p=o.geom.y1-c,T=o.geom.x2-v,C=o.geom.y2-c,M=o.geom.x3-v,A=o.geom.y3-c;f.beginPath(),f.moveTo(g,p),f.lineTo(T,C),f.lineTo(M,A),f.closePath(),o.isFilled&&(e(f,o),f.fill()),o.isStroked&&(l(f,o),f.stroke()),f.restore()}};h.exports=s},45245:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(36931);e.register("triangle",function(i,s,r,o,a,u,f,v,c,g){return this.displayList.add(new l(this.scene,i,s,r,o,a,u,f,v,c,g))})},96195:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(83253),i=t(85172),h.exports={renderWebGL:l,renderCanvas:i}},83253:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=t(34682),i=t(70554),s=function(r,o,a,u){var f=a.camera;f.addToRenderList(o);var v=e(o,f,u,!a.useCanvas).calc,c=o._displayOriginX,g=o._displayOriginY,p=o.alpha,T=o.customRenderNodes,C=o.defaultRenderNodes,M=T.Submitter||C.Submitter;if(o.isFilled){var A=i.getTintAppendFloatAlpha(o.fillColor,o.fillAlpha*p),R=o.geom.x1-c,P=o.geom.y1-g,L=o.geom.x2-c,F=o.geom.y2-g,w=o.geom.x3-c,O=o.geom.y3-g;(T.FillTri||C.FillTri).run(a,v,M,R,P,L,F,w,O,A,A,A)}o.isStroked&&l(a,M,v,o,p,c,g)};h.exports=s},68287:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(9674),l=t(40939),i=t(83419),s=t(31401),r=t(95643),o=t(92751),a=new i({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Lighting,s.Mask,s.Origin,s.RenderNodes,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(f,v,c,g,p){r.call(this,f,"Sprite"),this._crop=this.resetCropObject(),this.anims=new e(this),this.setTexture(g,p),this.setPosition(v,c),this.setSizeToFrame(),this.setOriginFromFrame(),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return l}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(u,f){this.anims.update(u,f)},play:function(u,f){return this.anims.play(u,f)},playReverse:function(u,f){return this.anims.playReverse(u,f)},playAfterDelay:function(u,f){return this.anims.playAfterDelay(u,f)},playAfterRepeat:function(u,f){return this.anims.playAfterRepeat(u,f)},chain:function(u){return this.anims.chain(u)},stop:function(){return this.anims.stop()},stopAfterDelay:function(u){return this.anims.stopAfterDelay(u)},stopAfterRepeat:function(u){return this.anims.stopAfterRepeat(u)},stopOnFrame:function(u){return this.anims.stopOnFrame(u)},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});h.exports=a},76552:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l.addToRenderList(e),t.batchSprite(e,e.frame,l,i)};h.exports=d},15567:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(13059),i=t(44603),s=t(23568),r=t(68287);i.register("sprite",function(o,a){o===void 0&&(o={});var u=s(o,"key",null),f=s(o,"frame",null),v=new r(this.scene,0,0,u,f);return a!==void 0&&(o.add=a),e(this.scene,v,o),l(v,o),v})},46409:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(68287);e.register("sprite",function(i,s,r,o){return this.displayList.add(new l(this.scene,i,s,r,o))})},92751:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(9409),i=t(76552),h.exports={renderWebGL:l,renderCanvas:i}},9409:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(l,e,i,0,s.Texturer||r.Texturer,s.Transformer||r.Transformer)};h.exports=d},18207:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={None:0,Power0:1,Power1:10,Power2:20,Power3:30,Power4:40,Linear:1,Gravity:2,Quad:10,"Quad.easeOut":10,"Quad.easeIn":11,"Quad.easeInOut":12,Cubic:20,"Cubic.easeOut":20,"Cubic.easeIn":21,"Cubic.easeInOut":22,Quart:30,"Quart.easeOut":30,"Quart.easeIn":31,"Quart.easeInOut":32,Quint:40,"Quint.easeOut":40,"Quint.easeIn":41,"Quint.easeInOut":42,Sine:50,"Sine.easeOut":50,"Sine.easeIn":51,"Sine.easeInOut":52,Expo:60,"Expo.easeOut":60,"Expo.easeIn":61,"Expo.easeInOut":62,Circ:70,"Circ.easeOut":70,"Circ.easeIn":71,"Circ.easeInOut":72,Back:90,"Back.easeOut":90,"Back.easeIn":91,"Back.easeInOut":92,Bounce:100,"Bounce.easeOut":100,"Bounce.easeIn":101,"Bounce.easeInOut":102,Stepped:110,Smoothstep:120,"Smoothstep.easeOut":120,"Smoothstep.easeIn":121,"Smoothstep.easeInOut":122};h.exports=d},68218:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/for(var e=t(18207),l={},i=Object.keys(e),s=i.length,r=0;r<s;r++){var o=i[r],a=e[o];l[a]=o}h.exports=l},76573:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(31401),i=t(95643),s=t(53384),r=t(70554),o=t(18207),a=t(68218),u=t(71238),f=r.getTintAppendFloatAlpha,v=new e({Extends:i,Mixins:[l.Alpha,l.BlendMode,l.Depth,l.ElapseTimer,l.Lighting,l.Mask,l.RenderNodes,l.TextureCrop,l.Visible,u],initialize:function(g,p,T){i.call(this,g,"SpriteGPULayer"),this.memberCount=0,this.size=Math.max(T,0),this._segments=24,this.MAX_BUFFER_UPDATE_SEGMENTS_FULL=16777215,this.bufferUpdateSegments=0,this.bufferUpdateSegmentSize=Math.ceil(this.size/this._segments),this.gravity=1024,this._animationsEnabled={};for(var C=Object.keys(o),M=C.length,A=0;A<M;A++)this._animationsEnabled[C[A]]=!1;this.EASE=o,this.EASE_CODES=a,this.setTexture(p),this.initRenderNodes(new Phaser.Structs.Map),this.frameDataTexture=null,this.frameDataIndices={},this.frameDataIndicesInv={},this.animationData=[],this.animationDataNames={},this.animationDataIndices={},this.generateFrameDataTexture(),this.submitterNode=new s(g.renderer.renderNodes,{},this),this.defaultRenderNodes.Submitter=this.submitterNode,this.renderNodeData[this.submitterNode.name]={},this.resize(this.size),this.nextMember=new ArrayBuffer(this.getDataByteSize()),this.nextMemberF32=new Float32Array(this.nextMember),this.nextMemberU32=new Uint32Array(this.nextMember)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(c,g){this.updateTimer(c,g)},getDataByteSize:function(){return this.submitterNode.instanceBufferLayout.layout.stride},getShaderFeatures:function(){for(var c=[],g=Object.keys(this._animationsEnabled),p=g.length,T=0;T<p;T++)this._animationsEnabled[g[T]]&&c.push(g[T]);return c},setAnimations:function(c){for(var g=c.length,p=this.texture.getFrameNames(!0),T=p.length,C=0;C<g;C++){var M=c[C],A={};M.key?(A.name=M.key,A.duration=M.duration,A.frames=M.frames):(A.name=M.name,A.duration=M.duration,A.frames=M.frames.slice()),A.index=T,A.frameCount=A.frames.length,T+=A.frameCount,this.animationData.push(A),this.animationDataNames[A.name]=A,this.animationDataIndices[A.index]=A}return this.generateFrameDataTexture(),this},generateFrameDataTexture:function(){var c=this.texture,g=c.getFrameNames(!0),p=g.length;this.frameDataIndices={},this.frameDataIndicesInv={};for(var T=0;T<p;T++){var C=g[T],M=c.get(C);this.frameDataIndices[C]=T,this.frameDataIndicesInv[T]=C}var A=this.animationData,R=A.length;for(T=0;T<R;T++)for(var P=this.animationData[T],L=P.frameCount,F=0;F<L;F++)g.push(P.frames[F]);p=g.length;var w=3,O=p*w,B=Math.min(O,4096),I=Math.ceil(O/4096),D=B*I*4,N=c.manager,z=new ArrayBuffer(D),V=new Uint16Array(z),U=new Uint8Array(z);for(T=0;T<p;T++){var G=g[T];if(typeof G=="string")M=c.get(g[T]);else if(G&&G.key!==void 0){var b=N.get(G.key);M=b.get(G.frame)}else M=G.frame;var Y=T*w*V.BYTES_PER_ELEMENT;V[Y]=M.cutX,V[Y+1]=M.cutY,V[Y+2]=M.cutWidth,V[Y+3]=M.cutHeight;var W=.5,H=.5;M.customPivot&&(W=M.pivotX,H=M.pivotY),V[Y+4]=Math.round((W-.5)*M.cutWidth)+32768,V[Y+5]=Math.round((H-.5)*M.cutHeight)+32768}this.frameDataTexture&&this.frameDataTexture.destroy(),this.frameDataTexture=this.scene.renderer.createUint8ArrayTexture(U,B,I,!1,!1)},resize:function(c,g){var p=this.submitterNode.instanceBufferLayout,T=p.buffer,C=T.viewU8,M=c*p.layout.stride;if(this.size=c,T.resize(M),g)this.memberCount=0;else{var A=T.viewU8;A.set(C.subarray(0,Math.min(A.byteLength,M))),this.memberCount=Math.min(this.memberCount,c)}return this.bufferUpdateSegmentSize=Math.ceil(this.size/this._segments),this.setAllSegmentsNeedUpdate(),this},setSegmentNeedsUpdate:function(c){if(!(c<0||c>=this.size||this.bufferUpdateSegments===this.MAX_BUFFER_UPDATE_SEGMENTS_FULL)){var g=Math.floor(c/this.bufferUpdateSegmentSize);this.bufferUpdateSegments|=1<<g}},setAllSegmentsNeedUpdate:function(){this.bufferUpdateSegments=this.MAX_BUFFER_UPDATE_SEGMENTS_FULL},clearAllSegmentsNeedUpdate:function(){this.bufferUpdateSegments=0},addData:function(c){if(this.memberCount>=this.size)return this;var g=this.submitterNode.instanceBufferLayout,p=g.buffer.viewF32,T=this.memberCount*g.layout.stride;return p.set(c,T/p.BYTES_PER_ELEMENT),this.setSegmentNeedsUpdate(this.memberCount),this.memberCount++,this},addMember:function(c){if(this.memberCount>=this.size)return this;var g=this.nextMemberF32,p=this.nextMemberU32;c||(c={});var T=this.frame;if(c.frame!==void 0&&(T=c.frame.base?c.frame.base:c.frame),typeof T=="string"&&(T=this.texture.get(T),!T))return this;var C=0;this._setAnimatedValue(c.x,C),C+=4,this._setAnimatedValue(c.y,C),C+=4,this._setAnimatedValue(c.rotation,C),C+=4,this._setAnimatedValue(c.scaleX,C,1),C+=4,this._setAnimatedValue(c.scaleY,C,1),C+=4,this._setAnimatedValue(c.alpha,C,1),C+=4;var M=c.animation;if(M){var A;if(typeof M=="string"||typeof M=="number")typeof M=="string"?A=this.animationDataNames[M]:A=this.animationDataIndices[M],this._setAnimatedValue({base:A.index,amplitude:A.frameCount,duration:A.duration,ease:o.Linear,yoyo:!1},C);else{var R=M.base;typeof R=="string"?A=this.animationDataNames[R]:typeof R=="number"?A=this.animationDataIndices[R]:A=this.animationData[0],this._setAnimatedValue({base:A.index,amplitude:typeof M.amplitude=="number"?M.amplitude:A.frameCount,duration:M.duration||A.duration,delay:M.delay||0,ease:M.ease||o.Linear,yoyo:!!M.yoyo},C)}}else{var P=this.frameDataIndices[T.name],L=c.frame;L&&L.base!==void 0?this._setAnimatedValue({base:P,amplitude:L.amplitude,duration:L.duration,delay:L.delay,ease:L.ease,yoyo:L.yoyo},C):this._setAnimatedValue(P,C)}C+=4,this._setAnimatedValue(c.tintBlend,C,1),C+=4;var F=c.tintBottomLeft===void 0?16777215:c.tintBottomLeft,w=c.tintTopLeft===void 0?16777215:c.tintTopLeft,O=c.tintBottomRight===void 0?16777215:c.tintBottomRight,B=c.tintTopRight===void 0?16777215:c.tintTopRight,I=c.alphaBottomLeft===void 0?1:c.alphaBottomLeft,D=c.alphaTopLeft===void 0?1:c.alphaTopLeft,N=c.alphaBottomRight===void 0?1:c.alphaBottomRight,z=c.alphaTopRight===void 0?1:c.alphaTopRight;return p[C++]=f(F,I),p[C++]=f(w,D),p[C++]=f(O,N),p[C++]=f(B,z),g[C++]=c.originX===void 0?.5:c.originX,g[C++]=c.originY===void 0?.5:c.originY,g[C++]=c.tintFill?1:0,g[C++]=c.creationTime||this.timeElapsed,g[C++]=c.scrollFactorX===void 0?1:c.scrollFactorX,g[C++]=c.scrollFactorY===void 0?1:c.scrollFactorY,this.addData(this.nextMemberF32),this},editMember:function(c,g){if(c<0||c>=this.memberCount)return this;var p=this.memberCount;return this.memberCount=c,this.addMember(g),this.memberCount=p,this},patchMember:function(c,g,p){if(!(c<0||c>=this.memberCount)){var T=this.submitterNode.instanceBufferLayout,C=T.buffer,M=T.layout.stride,A=c*M,R=C.viewU32,P=A/4;if(p)for(var L=0;L<g.length;L++)p[L]&&(R[P+L]=g[L]);else R.set(g,P);this.setSegmentNeedsUpdate(c)}},getMember:function(c){if(c<0||c>=this.memberCount)return null;var g=this.submitterNode.instanceBufferLayout,p=g.buffer,T=g.layout.stride,C=c*T,M=p.viewF32,A=p.viewU32,R={},P=C/M.BYTES_PER_ELEMENT;R.x=this._getAnimatedValue(P),P+=4,R.y=this._getAnimatedValue(P),P+=4,R.rotation=this._getAnimatedValue(P),P+=4,R.scaleX=this._getAnimatedValue(P),P+=4,R.scaleY=this._getAnimatedValue(P),P+=4,R.alpha=this._getAnimatedValue(P),P+=4;var L=this._getAnimatedValue(P);P+=4,typeof L!="number"&&(L=L.base);var F=this.frameDataIndicesInv[L];if(F===void 0){var w=this.animationDataIndices[L];w&&(R.animation=w.name)}else R.frame=F;return R.tintBlend=this._getAnimatedValue(P),P+=4,R.tintBottomLeft=A[P++],R.tintTopLeft=A[P++],R.tintBottomRight=A[P++],R.tintTopRight=A[P++],R.alphaBottomLeft=(R.tintBottomLeft>>>24)/255,R.alphaTopLeft=(R.tintTopLeft>>>24)/255,R.alphaBottomRight=(R.tintBottomRight>>>24)/255,R.alphaTopRight=(R.tintTopRight>>>24)/255,R.tintBottomLeft&=16777215,R.tintTopLeft&=16777215,R.tintBottomRight&=16777215,R.tintTopRight&=16777215,R.originX=M[P++],R.originY=M[P++],R.tintFill=!!M[P++],R.creationTime=M[P++],R.scrollFactorX=M[P++],R.scrollFactorY=M[P++],R},getMemberData:function(c,g){if(c<0||c>=this.memberCount)return null;var p=this.submitterNode.instanceBufferLayout,T=p.buffer,C=p.layout.stride,M=c*C;g||(g=this.nextMemberU32);var A=T.viewU32,R=A.BYTES_PER_ELEMENT;return g.set(A.subarray(M/R,M/R+C/R)),g},removeMembers:function(c,g){if(c<0||c>=this.memberCount)return this;g===void 0&&(g=1),g=Math.min(g,this.memberCount-c);var p=this.submitterNode.instanceBufferLayout,T=p.layout.stride,C=c*T,M=g*T,A=p.buffer.viewU8;A.set(A.subarray(C+M),C);for(var R=c;R<this.memberCount;R+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(R);return this.memberCount-=g,this},insertMembers:function(c,g){if(c<0||c>this.memberCount)return this;Array.isArray(g)||(g=[g]);var p=this.memberCount,T=this.submitterNode.instanceBufferLayout,C=T.layout.stride,M=c*C,A=g.length*C;T.buffer.viewU8.copyWithin(M+A,M,p*C),this.memberCount=c;for(var R=0;R<g.length;R++)this.addMember(g[R]);for(this.memberCount=Math.min(this.size,p+g.length),R=c;R<this.memberCount;R+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(R);return this},insertMembersData:function(c,g){if(c<0||c>this.memberCount)return this;var p=g.length*g.BYTES_PER_ELEMENT,T=this.submitterNode.instanceBufferLayout,C=T.layout.stride,M=c*C;T.buffer.viewU8.copyWithin(M+p,M,this.memberCount*C),T.buffer.viewU32.set(g,M/g.BYTES_PER_ELEMENT),this.memberCount=Math.min(this.size,this.memberCount+p/C);for(var A=c;A<this.memberCount;A+=this.bufferUpdateSegmentSize)this.setSegmentNeedsUpdate(A);return this},_setAnimatedValue:function(c,g,p){var T=this.nextMemberF32;if(p===void 0&&(p=0),typeof c=="number")T[g++]=c,T[g++]=0,T[g++]=0,T[g]=0;else if(c===void 0)T[g++]=p,T[g++]=0,T[g++]=0,T[g]=0;else{var C=c.base||0,M=c.ease||0,A=c.amplitude||0,R=Math.abs(c.duration||0),P=c.delay||0,L=c.yoyo!==void 0?c.yoyo:!0,F=c.loop!==void 0?c.loop:!0;typeof M=="string"&&(M=this.EASE[M]||0);var w=this.EASE_CODES[M];if(this._animationsEnabled[w]||this.setAnimationEnabled(w,!0),M===o.Gravity){var O=c.velocity||0,B=c.gravityFactor||1;B>=1?B=0:B<-1&&(B=-.999),B=(B+1)/2,A=Math.floor(O)+B}R>0?P=P/R%2:P=0,P<0&&(P+=2),P/=2,P+=M,L&&(R=-R),F||(P=-P),T[g++]=C,T[g++]=A,T[g++]=R,T[g]=P}},_getAnimatedValue:function(c){var g=this.submitterNode.instanceBufferLayout.buffer.viewF32,p=g[c++],T=g[c++],C=g[c++],M=g[c];if(T===0||C===0||P===0)return p;var A=M>0;A||(M=-M);var R=C<0;R&&(C=-C);var P=Math.floor(M);if(M-=P,M=M*C*2%C,P===o.Gravity){var L=Math.floor(T),F=(T-L)*2-1;return F===0&&(F=1),{base:p,ease:P,duration:C,delay:M,yoyo:R,velocity:L,gravityFactor:F}}return{base:p,ease:P,amplitude:T,duration:C,delay:M,yoyo:R}},setAnimationEnabled:function(c,g){return this._animationsEnabled[c]=!!g,this},preDestroy:function(){this.frameDataTexture.destroy()}});h.exports=v},16193:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10312),l=t(44603),i=t(23568),s=t(76573);l.register("spriteGPULayer",function(r,o){r===void 0&&(r={});var a=i(r,"key",null),u=i(r,"size",1),f=new s(this.scene,a,u);return o!==void 0&&(r.add=o),f.alpha=i(r,"alpha",1),f.blendMode=i(r,"blendMode",e.NORMAL),f.visible=i(r,"visible",!0),o&&this.scene.sys.displayList.add(f),f})},96019:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(76573),l=t(39429);l.register("spriteGPULayer",function(i,s){return this.displayList.add(new e(this.scene,i,s))})},71238:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=t(97591),i=e;h.exports={renderWebGL:l,renderCanvas:i}},97591:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(l)};h.exports=d},14727:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(78705),l=t(83419),i=t(88571),s=t(74759),r=new l({Extends:i,Mixins:[s],initialize:function(a,u,f,v,c){i.call(this,a,u,f,v,c),this.type="Stamp"},_defaultRenderNodesMap:{get:function(){return e}}});h.exports=r},656:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=new e,i=function(s,r,o){o.addToRenderList(r),l.copyFrom(o.matrix),o.matrix.loadIdentity();var a=o.scrollX,u=o.scrollY;o.scrollX=0,o.scrollY=0,s.batchSprite(r,r.frame,o),o.scrollX=a,o.scrollY=u,o.matrix.copyFrom(l)};h.exports=i},31479:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(14727);l.register("stamp",function(r,o){r===void 0&&(r={});var a=i(r,"key",null),u=i(r,"frame",null),f=new s(this.scene,0,0,a,u);return o!==void 0&&(r.add=o),e(this.scene,f,r),f})},85326:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(14727),l=t(39429);l.register("stamp",function(i,s,r,o){return this.displayList.add(new e(this.scene,i,s,r,o))})},74759:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e;l=t(656),h.exports={renderCanvas:l}},14220:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=t.canvas,s=t.context,r=t.style,o=[],a=0,u=l.length;r.maxLines>0&&r.maxLines<l.length&&(u=r.maxLines),r.syncFont(i,s);for(var f=t.letterSpacing,v=0;v<u;v++){var c=r.strokeThickness;if(f===0)c+=s.measureText(l[v]).width;else{for(var g=l[v],p=0;p<g.length;p++)c+=s.measureText(g[p]).width;g.length>1&&(c+=f*(g.length-1))}r.wordWrap&&(c-=s.measureText(" ").width),o[v]=Math.ceil(c),a=Math.max(a,o[v])}var T=e.fontSize+r.strokeThickness,C=T*u,M=t.lineSpacing;return u>1&&(C+=M*(u-1)),{width:a,height:C,lines:u,lineWidths:o,lineSpacing:M,lineHeight:T}};h.exports=d},79557:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(27919),l=function(i){var s=e.create(this),r=s.getContext("2d",{willReadFrequently:!0});i.syncFont(s,r);var o=r.measureText(i.testString);if("actualBoundingBoxAscent"in o){var a=o.actualBoundingBoxAscent,u=o.actualBoundingBoxDescent;return e.remove(s),{ascent:a,descent:u,fontSize:a+u}}var f=Math.ceil(o.width*i.baselineX),v=f,c=2*v;v=v*i.baselineY|0,s.width=f,s.height=c,r.fillStyle="#f00",r.fillRect(0,0,f,c),r.font=i._font,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(i.testString,0,v);var g={ascent:0,descent:0,fontSize:0},p=r.getImageData(0,0,f,c);if(!p)return g.ascent=v,g.descent=v+6,g.fontSize=g.ascent+g.descent,e.remove(s),g;var T=p.data,C=T.length,M=f*4,A,R,P=0,L=!1;for(A=0;A<v;A++){for(R=0;R<M;R+=4)if(T[P+R]!==255){L=!0;break}if(!L)P+=M;else break}for(g.ascent=v-A,P=C-M,L=!1,A=c;A>v;A--){for(R=0;R<M;R+=4)if(T[P+R]!==255){L=!0;break}if(!L)P-=M;else break}return g.descent=A-v,g.fontSize=g.ascent+g.descent,e.remove(s),g};h.exports=l},50171:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(40366),l=t(27919),i=t(40939),s=t(83419),r=t(31401),o=t(95643),a=t(14220),u=t(35154),f=t(35846),v=t(61771),c=t(35762),g=t(45650),p=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Lighting,r.Mask,r.Origin,r.RenderNodes,r.ScrollFactor,r.Tint,r.Transform,r.Visible,v],initialize:function(C,M,A,R,P){M===void 0&&(M=0),A===void 0&&(A=0),o.call(this,C,"Text"),this.renderer=C.sys.renderer,this.setPosition(M,A),this.setOrigin(0,0),this.initRenderNodes(this._defaultRenderNodesMap),this.canvas=l.create(this),this.context,this.style=new c(this,P),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=g(),this.texture=C.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(R),P&&P.padding&&this.setPadding(P.padding),P&&P.lineSpacing&&this.setLineSpacing(P.lineSpacing),P&&P.letterSpacing&&this.setLetterSpacing(P.letterSpacing)},_defaultRenderNodesMap:{get:function(){return i}},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",e(this.canvas,this.scene.sys.canvas),this.originX=1},runWordWrap:function(T){var C=this.style;if(C.wordWrapCallback){var M=C.wordWrapCallback.call(C.wordWrapCallbackScope,T,this);return Array.isArray(M)&&(M=M.join(`
|
||
`)),M}else return C.wordWrapWidth?C.wordWrapUseAdvanced?this.advancedWordWrap(T,this.context,this.style.wordWrapWidth):this.basicWordWrap(T,this.context,this.style.wordWrapWidth):T},advancedWordWrap:function(T,C,M){for(var A="",R=T.replace(/ +/gi," ").split(this.splitRegExp),P=R.length,L=0;L<P;L++){var F=R[L],w="";F=F.replace(/^ *|\s*$/gi,"");var O=F.length*this.letterSpacing,B=C.measureText(F).width+O;if(B<M){A+=F+`
|
||
`;continue}for(var I=M,D=F.split(" "),N=0;N<D.length;N++){var z=D[N],V=z+" ",U=V.length*this.letterSpacing,G=C.measureText(V).width+U;if(G>I){if(N===0){for(var b=V;b.length;){b=b.slice(0,-1);var Y=b.length*this.letterSpacing;if(G=C.measureText(b).width+Y,G<=I)break}if(!b.length)throw new Error("wordWrapWidth < a single character");var W=z.substr(b.length);D[N]=W,w+=b}var H=D[N].length?N:N+1,X=D.slice(H).join(" ").replace(/[ \n]*$/gi,"");R.splice(L+1,0,X),P=R.length;break}else w+=V,I-=G}A+=w.replace(/[ \n]*$/gi,"")+`
|
||
`}return A=A.replace(/[\s|\n]*$/gi,""),A},basicWordWrap:function(T,C,M){for(var A="",R=T.split(this.splitRegExp),P=R.length-1,L=C.measureText(" ").width,F=0;F<=P;F++){for(var w=M,O=R[F].split(" "),B=O.length-1,I=0;I<=B;I++){var D=O[I],N=D.length*this.letterSpacing,z=C.measureText(D).width+N,V=z;I<B&&(V+=L),V>w&&I>0&&(A+=`
|
||
`,w=M),A+=D,I<B?(A+=" ",w-=V):w-=z}F<P&&(A+=`
|
||
`)}return A},getWrappedText:function(T){T===void 0&&(T=this._text),this.style.syncFont(this.canvas,this.context);var C=this.runWordWrap(T);return C.split(this.splitRegExp)},setText:function(T){return!T&&T!==0&&(T=""),Array.isArray(T)&&(T=T.join(`
|
||
`)),T!==this._text&&(this._text=T.toString(),this.updateText()),this},appendText:function(T,C){C===void 0&&(C=!0),!T&&T!==0&&(T=""),Array.isArray(T)&&(T=T.join(`
|
||
`)),T=T.toString();var M=this._text.concat(C?`
|
||
`+T:T);return M!==this._text&&(this._text=M,this.updateText()),this},setStyle:function(T){return this.style.setStyle(T)},setFont:function(T){return this.style.setFont(T)},setFontFamily:function(T){return this.style.setFontFamily(T)},setFontSize:function(T){return this.style.setFontSize(T)},setFontStyle:function(T){return this.style.setFontStyle(T)},setFixedSize:function(T,C){return this.style.setFixedSize(T,C)},setBackgroundColor:function(T){return this.style.setBackgroundColor(T)},setFill:function(T){return this.style.setFill(T)},setColor:function(T){return this.style.setColor(T)},setStroke:function(T,C){return this.style.setStroke(T,C)},setShadow:function(T,C,M,A,R,P){return this.style.setShadow(T,C,M,A,R,P)},setShadowOffset:function(T,C){return this.style.setShadowOffset(T,C)},setShadowColor:function(T){return this.style.setShadowColor(T)},setShadowBlur:function(T){return this.style.setShadowBlur(T)},setShadowStroke:function(T){return this.style.setShadowStroke(T)},setShadowFill:function(T){return this.style.setShadowFill(T)},setWordWrapWidth:function(T,C){return this.style.setWordWrapWidth(T,C)},setWordWrapCallback:function(T,C){return this.style.setWordWrapCallback(T,C)},setAlign:function(T){return this.style.setAlign(T)},setResolution:function(T){return this.style.setResolution(T)},setLineSpacing:function(T){return this.lineSpacing=T,this.updateText()},setLetterSpacing:function(T){return this.letterSpacing=T,this.updateText()},setPadding:function(T,C,M,A){if(typeof T=="object"){var R=T,P=u(R,"x",null);P!==null?(T=P,M=P):(T=u(R,"left",0),M=u(R,"right",T));var L=u(R,"y",null);L!==null?(C=L,A=L):(C=u(R,"top",0),A=u(R,"bottom",C))}else T===void 0&&(T=0),C===void 0&&(C=T),M===void 0&&(M=T),A===void 0&&(A=C);return this.padding.left=T,this.padding.top=C,this.padding.right=M,this.padding.bottom=A,this.updateText()},setMaxLines:function(T){return this.style.setMaxLines(T)},setRTL:function(T){T===void 0&&(T=!0);var C=this.style;return C.rtl===T?this:(C.rtl=T,T?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",e(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),C.align==="left"?C.align="right":C.align==="right"&&(C.align="left"),this)},updateText:function(){var T=this.canvas,C=this.context,M=this.style,A=M.resolution,R=M.metrics;M.syncFont(T,C);var P=this._text;(M.wordWrapWidth||M.wordWrapCallback)&&(P=this.runWordWrap(this._text));var L=P.split(this.splitRegExp),F=a(this,R,L),w=this.padding,O;M.fixedWidth===0?(this.width=F.width+w.left+w.right,O=F.width):(this.width=M.fixedWidth,O=this.width-w.left-w.right,O<F.width&&(O=F.width)),M.fixedHeight===0?this.height=F.height+w.top+w.bottom:this.height=M.fixedHeight;var B=this.width,I=this.height;this.updateDisplayOrigin(),B*=A,I*=A,B=Math.max(B,1),I=Math.max(I,1),T.width!==B||T.height!==I?(T.width=B,T.height=I,this.frame.setSize(B,I),this.frame.source.updateSize(B,I),this.frame.source.resolution=A,this.frame.updateUVs(),M.syncFont(T,C),M.rtl&&(C.direction="rtl")):C.clearRect(0,0,B,I),C.save(),C.scale(A,A),M.backgroundColor&&(C.fillStyle=M.backgroundColor,C.fillRect(0,0,B,I)),M.syncStyle(T,C),C.translate(w.left,w.top);for(var D,N,z=0;z<F.lines;z++){if(D=M.strokeThickness/2,N=M.strokeThickness/2+z*F.lineHeight+R.ascent,z>0&&(N+=F.lineSpacing*z),M.rtl)D=B-D-w.left-w.right;else if(M.align==="right")D+=O-F.lineWidths[z];else if(M.align==="center")D+=(O-F.lineWidths[z])/2;else if(M.align==="justify"){var V=.85;if(F.lineWidths[z]/F.width>=V){var U=F.width-F.lineWidths[z],G=C.measureText(" ").width,b=L[z].trim(),Y=b.split(" ");U+=(L[z].length-b.length)*G;for(var W=Math.floor(U/G),H=0;W>0;)Y[H]+=" ",H=(H+1)%(Y.length-1||1),--W;L[z]=Y.join(" ")}}this.autoRound&&(D=Math.round(D),N=Math.round(N));var X=this.letterSpacing;if(M.strokeThickness&&X===0&&(M.syncShadow(C,M.shadowStroke),C.strokeText(L[z],D,N)),M.color)if(M.syncShadow(C,M.shadowFill),X!==0)for(var K=0,Z=L[z].split(""),Q=0;Q<Z.length;Q++)M.strokeThickness&&(M.syncShadow(C,M.shadowStroke),C.strokeText(Z[Q],D+K,N),M.syncShadow(C,M.shadowFill)),C.fillText(Z[Q],D+K,N),K+=C.measureText(Z[Q]).width+X;else C.fillText(L[z],D,N)}C.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(T,this.frame.source.glTexture,!0));var j=this.input;return j&&!j.customHitArea&&(j.hitArea.width=this.width,j.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(T){this.setText(T)}},toJSON:function(){var T=r.ToJSON(this),C={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 T.data=C,T},preDestroy:function(){f(this.canvas),l.remove(this.canvas);var T=this.texture;T&&T.destroy()}});h.exports=p},79724:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){e.width===0||e.height===0||(l.addToRenderList(e),t.batchSprite(e,e.frame,l,i))};h.exports=d},71259:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(50171);l.register("text",function(r,o){r===void 0&&(r={});var a=i(r,"text",""),u=i(r,"style",null),f=i(r,"padding",null);f!==null&&(u.padding=f);var v=new s(this.scene,0,0,a,u);return o!==void 0&&(r.add=o),e(this.scene,v,r),v.autoRound=i(r,"autoRound",!0),v.resolution=i(r,"resolution",1),v})},68005:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(50171),l=t(39429);l.register("text",function(i,s,r,o){return this.displayList.add(new e(this.scene,i,s,r,o))})},61771:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(34397),i=t(79724),h.exports={renderWebGL:l,renderCanvas:i}},35762:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23568),i=t(35154),s=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]},o=new e({initialize:function(u,f){this.parent=u,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(f,!1,!0)},setStyle:function(a,u,f){u===void 0&&(u=!0),f===void 0&&(f=!1);for(var v in r){var c=f?r[v][1]:this[v];v==="wordWrapCallback"||v==="wordWrapCallbackScope"?this[v]=i(a,r[v][0],c):a&&v==="fontSize"&&typeof a.fontSize=="number"?this[v]=a.fontSize.toString()+"px":this[v]=l(a,r[v][0],c)}var g=i(a,"font",null);g!==null&&this.setFont(g,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var p=i(a,"fill",null);p!==null&&(this.color=p);var T=i(a,"metrics",!1);return T?this.metrics={ascent:i(T,"ascent",0),descent:i(T,"descent",0),fontSize:i(T,"fontSize",0)}:(u||!this.metrics)&&(this.metrics=s(this)),u?this.parent.updateText():this.parent},syncFont:function(a,u){u.font=this._font},syncStyle:function(a,u){u.textBaseline="alphabetic",u.fillStyle=this.color,u.strokeStyle=this.stroke,u.lineWidth=this.strokeThickness,u.lineCap="round",u.lineJoin="round"},syncShadow:function(a,u){u?(a.shadowOffsetX=this.shadowOffsetX,a.shadowOffsetY=this.shadowOffsetY,a.shadowColor=this.shadowColor,a.shadowBlur=this.shadowBlur):(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowColor=0,a.shadowBlur=0)},update:function(a){return a&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=s(this)),this.parent.updateText()},setFont:function(a,u){u===void 0&&(u=!0);var f=a,v="",c="";if(typeof a!="string")f=i(a,"fontFamily","Courier"),v=i(a,"fontSize","16px"),c=i(a,"fontStyle","");else{var g=a.split(" "),p=0;c=g.length>2?g[p++]:"",v=g[p++]||"16px",f=g[p++]||"Courier"}return(f!==this.fontFamily||v!==this.fontSize||c!==this.fontStyle)&&(this.fontFamily=f,this.fontSize=v,this.fontStyle=c,u&&this.update(!0)),this.parent},setFontFamily:function(a){return this.fontFamily!==a&&(this.fontFamily=a,this.update(!0)),this.parent},setFontStyle:function(a){return this.fontStyle!==a&&(this.fontStyle=a,this.update(!0)),this.parent},setFontSize:function(a){return typeof a=="number"&&(a=a.toString()+"px"),this.fontSize!==a&&(this.fontSize=a,this.update(!0)),this.parent},setTestString:function(a){return this.testString=a,this.update(!0)},setFixedSize:function(a,u){return this.fixedWidth=a,this.fixedHeight=u,a&&(this.parent.width=a),u&&(this.parent.height=u),this.update(!1)},setBackgroundColor:function(a){return this.backgroundColor=a,this.update(!1)},setFill:function(a){return this.color=a,this.update(!1)},setColor:function(a){return this.color=a,this.update(!1)},setResolution:function(a){return this.resolution=a,this.update(!1)},setStroke:function(a,u){return u===void 0&&(u=this.strokeThickness),a===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==a||this.strokeThickness!==u)&&(this.stroke=a,this.strokeThickness=u,this.update(!0)),this.parent},setShadow:function(a,u,f,v,c,g){return a===void 0&&(a=0),u===void 0&&(u=0),f===void 0&&(f="#000"),v===void 0&&(v=0),c===void 0&&(c=!1),g===void 0&&(g=!0),this.shadowOffsetX=a,this.shadowOffsetY=u,this.shadowColor=f,this.shadowBlur=v,this.shadowStroke=c,this.shadowFill=g,this.update(!1)},setShadowOffset:function(a,u){return a===void 0&&(a=0),u===void 0&&(u=a),this.shadowOffsetX=a,this.shadowOffsetY=u,this.update(!1)},setShadowColor:function(a){return a===void 0&&(a="#000"),this.shadowColor=a,this.update(!1)},setShadowBlur:function(a){return a===void 0&&(a=0),this.shadowBlur=a,this.update(!1)},setShadowStroke:function(a){return this.shadowStroke=a,this.update(!1)},setShadowFill:function(a){return this.shadowFill=a,this.update(!1)},setWordWrapWidth:function(a,u){return u===void 0&&(u=!1),this.wordWrapWidth=a,this.wordWrapUseAdvanced=u,this.update(!1)},setWordWrapCallback:function(a,u){return u===void 0&&(u=null),this.wordWrapCallback=a,this.wordWrapCallbackScope=u,this.update(!1)},setAlign:function(a){return a===void 0&&(a="left"),this.align=a,this.update(!1)},setMaxLines:function(a){return a===void 0&&(a=0),this.maxLines=a,this.update(!1)},getTextMetrics:function(){var a=this.metrics;return{ascent:a.ascent,descent:a.descent,fontSize:a.fontSize}},toJSON:function(){var a={};for(var u in r)a[u]=this[u];return a.metrics=this.getTextMetrics(),a},destroy:function(){this.parent=void 0}});h.exports=o},34397:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){if(!(e.width===0||e.height===0)){l.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(l,e,i,0,s.Texturer||r.Texturer,s.Transformer||r.Transformer)}};h.exports=d},20839:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(9674),l=t(27919),i=t(41571),s=t(83419),r=t(31401),o=t(95643),a=t(68703),u=t(56295),f=t(45650),v=t(26099),c=8,g=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.Lighting,r.Mask,r.Origin,r.RenderNodes,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,u],initialize:function(T,C,M,A,R,P,L){var F=T.sys.renderer,w=F&&!F.gl;o.call(this,T,"TileSprite");var O=T.sys.textures.get(P),B=O.get(L);A=A?Math.floor(A):B.width,R=R?Math.floor(R):B.height,this._tilePosition=new v,this._tileScale=new v(1,1),this._tileRotation=0,this.dirty=!1,this.renderer=F,this.canvas=w?l.create(this,A,R):null,this.context=w?this.canvas.getContext("2d",{willReadFrequently:!1}):null,this._displayTextureKey=f(),this.displayTexture=w?T.sys.textures.addCanvas(this._displayTextureKey,this.canvas):null,this.displayFrame=this.displayTexture?this.displayTexture.get():null,this.currentFrame=null,this.fillCanvas=w?l.create2D(this,B.width,this.displayFrame.height):null,this.fillContext=this.fillCanvas?this.fillCanvas.getContext("2d",{willReadFrequently:!1}):null,this.fillPattern=null,this.anims=new e(this),this.setTexture(P,L),this.setPosition(C,M),this.setSize(A,R),this.setOrigin(.5,.5),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return i}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(p,T){this.anims.update(p,T)},setFrame:function(p){var T=this.texture.get(p);return!T.cutWidth||!T.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this.frame=T,this.dirty=!0,this},setSizeToFrame:function(){return this},setTilePosition:function(p,T){return p!==void 0&&(this.tilePositionX=p),T!==void 0&&(this.tilePositionY=T),this},setTileRotation:function(p){return p===void 0&&(p=0),this.tileRotation=p,this},setTileScale:function(p,T){return p===void 0&&(p=this.tileScaleX),T===void 0&&(T=p),this.tileScaleX=p,this.tileScaleY=T,this},updateTileTexture:function(){if(!(!this.renderer||this.renderer.gl)){var p=this.frame,T=this.fillContext,C=this.fillCanvas,M=p.cutWidth,A=p.cutHeight;T.clearRect(0,0,M,A),C.width=M,C.height=A,T.drawImage(p.source.image,p.cutX,p.cutY,p.cutWidth,p.cutHeight,0,0,M,A),this.fillPattern=T.createPattern(C,"repeat"),this.currentFrame=p}},updateCanvas:function(){var p=this.canvas,T=this.width,C=this.height,M=this.currentFrame!==this.frame;if((p.width!==T||p.height!==C||M)&&(p.width=T,p.height=C,this.displayFrame.setSize(T,C),this.updateDisplayOrigin(),M&&this.updateTileTexture(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var A=this.context;this.scene.sys.game.config.antialias||a.disable(A);var R=this._tileScale.x,P=this._tileScale.y,L=this._tilePosition.x,F=this._tilePosition.y;A.clearRect(0,0,T,C),A.save(),A.rotate(this._tileRotation),A.scale(R,P),A.translate(-L,-F),A.fillStyle=this.fillPattern;var w=Math.max(T,Math.abs(T/R)),O=Math.max(C,Math.abs(C/P)),B=Math.sqrt(w*w+O*O);A.fillRect(L-B,F-B,2*B,2*B),A.restore(),this.dirty=!1},preDestroy:function(){this.canvas&&l.remove(this.canvas),this.fillCanvas&&l.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.renderer=null,this.anims.destroy(),this.anims=void 0},tilePositionX:{get:function(){return this._tilePosition.x},set:function(p){this._tilePosition.x=p,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(p){this._tilePosition.y=p,this.dirty=!0}},tileRotation:{get:function(){return this._tileRotation},set:function(p){this._tileRotation=p,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(p){this._tileScale.x=p,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(p){this._tileScale.y=p,this.dirty=!0}}});h.exports=g},46992:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){e.updateCanvas(),l.addToRenderList(e),t.batchSprite(e,e.displayFrame,l,i)};h.exports=d},14167:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(20839);l.register("tileSprite",function(r,o){r===void 0&&(r={});var a=i(r,"x",0),u=i(r,"y",0),f=i(r,"width",512),v=i(r,"height",512),c=i(r,"key",""),g=i(r,"frame",""),p=new s(this.scene,a,u,f,v,c,g);return o!==void 0&&(r.add=o),e(this.scene,p,r),p})},91681:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20839),l=t(39429);l.register("tileSprite",function(i,s,r,o,a,u){return this.displayList.add(new e(this.scene,i,s,r,o,a,u))})},56295:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(18553),i=t(46992),h.exports={renderWebGL:l,renderCanvas:i}},18553:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=e.width,r=e.height;if(!(s===0||r===0)){var o=l.camera;o.addToRenderList(e);var a=e.customRenderNodes,u=e.defaultRenderNodes;(a.Submitter||u.Submitter).run(l,e,i,0,a.Texturer||u.Texturer,a.Transformer||u.Transformer)}};h.exports=d},18471:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(40939),i=t(83419),s=t(31401),r=t(51708),o=t(8443),a=t(95643),u=t(36383),f=t(14463),v=t(45650),c=t(10247),g=new i({Extends:a,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Lighting,s.Mask,s.Origin,s.RenderNodes,s.ScrollFactor,s.TextureCrop,s.Tint,s.Transform,s.Visible,c],initialize:function(T,C,M,A){a.call(this,T,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.glFlipY=!0,this._key=v(),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 R=T.sys.game;this._device=R.device.video,this.setPosition(C,M),this.setSize(256,256),this.initRenderNodes(this._defaultRenderNodesMap),R.events.on(o.PAUSE,this.globalPause,this),R.events.on(o.RESUME,this.globalResume,this);var P=T.sys.sound;P&&P.on(f.GLOBAL_MUTE,this.globalMute,this),A&&this.load(A)},_defaultRenderNodesMap:{get:function(){return l}},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(p){var T=this.scene.sys.cache.video.get(p);return T?(this.cacheKey=p,this.loadHandler(T.url,T.noAudio,T.crossOrigin)):console.warn("No video in cache for key: "+p),this},changeSource:function(p,T,C,M,A){T===void 0&&(T=!0),C===void 0&&(C=!1),this.cacheKey!==p&&(this.load(p),T&&this.play(C,M,A))},getVideoKey:function(){return this.cacheKey},loadURL:function(p,T,C){T===void 0&&(T=!1);var M=this._device.getVideoURL(p);return M?(this.cacheKey="",this.loadHandler(M.url,T,C)):console.warn("No supported video format found for "+p),this},loadMediaStream:function(p,T,C){return this.loadHandler(null,T,C,p)},loadHandler:function(p,T,C,M){T||(T=!1);var A=this.video;if(A?(this.removeLoadEventHandlers(),this.stop()):(A=document.createElement("video"),A.controls=!1,A.setAttribute("playsinline","playsinline"),A.setAttribute("preload","auto"),A.setAttribute("disablePictureInPicture","true")),T?(A.muted=!0,A.defaultMuted=!0,A.setAttribute("autoplay","autoplay")):(A.muted=!1,A.defaultMuted=!1,A.removeAttribute("autoplay")),C?A.setAttribute("crossorigin",C):A.removeAttribute("crossorigin"),M)if("srcObject"in A)try{A.srcObject=M}catch(P){if(P.name!=="TypeError")throw P;A.src=URL.createObjectURL(M)}else A.src=URL.createObjectURL(M);else A.src=p;this.retry=0,this.video=A,this._playCalled=!1,A.load(),this.addLoadEventHandlers();var R=this.scene.sys.textures.get(this._key);return this.setTexture(R),this},requestVideoFrame:function(p,T){var C=this.video;if(C){var M=T.width,A=T.height,R=this.videoTexture,P=this.videoTextureSource,L=!R||P.source!==C;L?(this._codePaused=C.paused,this._codeMuted=C.muted,R?(P.source=C,P.width=M,P.height=A,R.get().setSize(M,A)):(R=this.scene.sys.textures.create(this._key,C,M,A),R.add("__BASE",0,0,0,M,A),this.setTexture(R),this.videoTexture=R,this.videoTextureSource=R.source[0],this.videoTextureSource.setFlipY(this.glFlipY),this.emit(r.VIDEO_TEXTURE,this,R)),this.setSizeToFrame(),this.updateDisplayOrigin()):P.update(),this.isStalled=!1,this.metadata=T;var F=T.mediaTime;L&&(this._lastUpdate=F,this.emit(r.VIDEO_CREATED,this,M,A),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?F>=this._markerOut&&(C.loop?(C.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):F<this._lastUpdate&&this.emit(r.VIDEO_LOOP,this),this._lastUpdate=F,this._getFrame?(this.removeEventHandlers(),C.pause(),this._getFrame=!1):this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(p,T,C){T===void 0&&(T=-1),C===void 0&&(C=u.MAX_SAFE_INTEGER);var M=this.video;return!M||this.isPlaying()?(M||console.warn("Video not loaded"),this):(p===void 0&&(p=M.loop),M.loop=p,this._markerIn=T,this._markerOut=C,this._playingMarker=T>-1&&C>T&&C<u.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 p=this.video;return!p||this.isPlaying()?(p||console.warn("Video not loaded"),this):(this._playCalled||(this._getFrame=!0,this._rfvCallbackId=p.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this.createPlayPromise()),this)},addLoadEventHandlers:function(){var p=this.video;p&&(p.addEventListener("error",this._loadCallbackHandler),p.addEventListener("abort",this._loadCallbackHandler),p.addEventListener("loadedmetadata",this._metadataCallbackHandler))},removeLoadEventHandlers:function(){var p=this.video;p&&(p.removeEventListener("error",this._loadCallbackHandler),p.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var p=this.video;if(p){var T=this._callbacks;for(var C in T)p.addEventListener(C,T[C])}},removeEventHandlers:function(){var p=this.video;if(p){var T=this._callbacks;for(var C in T)p.removeEventListener(C,T[C])}},createPlayPromise:function(p){p===void 0&&(p=!0);var T=this.video,C=T.play();if(C!==void 0){var M=this.playSuccess.bind(this),A=this.playError.bind(this);if(!p){var R=this;A=function(){R.failedPlayAttempts++}}C.then(M).catch(A)}else T.addEventListener("playing",this._callbacks.legacy),p||this.failedPlayAttempts++},addMarker:function(p,T,C){return!isNaN(T)&&T>=0&&!isNaN(C)&&C>T&&(this.markers[p]=[T,C]),this},playMarker:function(p,T){var C=this.markers[p];return C&&this.play(T,C[0],C[1]),this},removeMarker:function(p){return delete this.markers[p],this},snapshot:function(p,T){return p===void 0&&(p=this.width),T===void 0&&(T=this.height),this.snapshotArea(0,0,this.width,this.height,p,T)},snapshotArea:function(p,T,C,M,A,R){p===void 0&&(p=0),T===void 0&&(T=0),C===void 0&&(C=this.width),M===void 0&&(M=this.height),A===void 0&&(A=C),R===void 0&&(R=M);var P=this.video,L=this.snapshotTexture;return L?(L.setSize(A,R),P&&L.context.drawImage(P,p,T,C,M,0,0,A,R)):(L=this.scene.sys.textures.createCanvas(v(),A,R),this.snapshotTexture=L,P&&L.context.drawImage(P,p,T,C,M,0,0,A,R)),L.update()},saveSnapshotTexture:function(p){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,p):this.snapshotTexture=this.scene.sys.textures.createCanvas(p,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(r.VIDEO_UNLOCKED,this));var p=this.scene.sys.sound;p&&p.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(p){var T=p.name;T==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):T==="NotSupportedError"?(this.stop(!1),this.emit(r.VIDEO_UNSUPPORTED,this,p)):(this.stop(!1),this.emit(r.VIDEO_ERROR,this,p))},legacyPlayHandler:function(){var p=this.video;p&&(this.playSuccess(),p.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(r.VIDEO_PLAYING,this)},loadErrorHandler:function(p){this.stop(!1),this.emit(r.VIDEO_ERROR,this,p)},metadataHandler:function(p){this.emit(r.VIDEO_METADATA,this,p)},setSizeToFrame:function(p){p||(p=this.frame),this.width=p.realWidth,this.height=p.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var T=this.input;return T&&!T.customHitArea&&(T.hitArea.width=this.width,T.hitArea.height=this.height),this},stalledHandler:function(p){this.isStalled=!0,this.emit(r.VIDEO_STALLED,this,p)},completeHandler:function(){this._playCalled=!1,this.emit(r.VIDEO_COMPLETE,this)},preUpdate:function(p,T){var C=this.video;!C||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=T,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(p){var T=this.video;if(T){var C=T.duration;if(C!==1/0&&!isNaN(C)){var M=C*p;this.setCurrentTime(M)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(p){var T=this.video;if(T){if(typeof p=="string"){var C=p[0],M=parseFloat(p.substr(1));C==="+"?p=T.currentTime+M:C==="-"&&(p=T.currentTime-M)}T.currentTime=p}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(r.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(r.VIDEO_SEEKED,this)},getProgress:function(){var p=this.video;if(p){var T=p.duration;if(T!==1/0&&!isNaN(T))return p.currentTime/T}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(p){p===void 0&&(p=!0),this._codeMuted=p;var T=this.video;return T&&(T.muted=this._systemMuted?!0:p),this},isMuted:function(){return this._codeMuted},globalMute:function(p,T){this._systemMuted=T;var C=this.video;C&&(C.muted=this._codeMuted?!0:T)},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(p){p===void 0&&(p=!0);var T=this.video;return this._codePaused=p,T&&!T.ended&&(p?T.paused||(this.removeEventHandlers(),T.pause()):p||(this._playCalled?T.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(p){return p===void 0&&(p=1),this.video&&(this.video.volume=e(p,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(p){return this.video&&(this.video.playbackRate=p),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(p){return p===void 0&&(p=!0),this.video&&(this.video.loop=p),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(p,T){return T===void 0&&(T=!0),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,p),this.videoTextureSource.setFlipY(T)),this._key=p,this.glFlipY=T,!!this.videoTexture},stop:function(p){p===void 0&&(p=!0);var T=this.video;return T&&(this.removeEventHandlers(),T.cancelVideoFrameCallback(this._rfvCallbackId),T.pause()),this.retry=0,this._playCalled=!1,p&&this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var p=this.video;if(p){for(p.parentNode&&p.parentNode.removeChild(p);p.hasChildNodes();)p.removeChild(p.firstChild);p.removeAttribute("autoplay"),p.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var p=this.scene.sys.game.events;p.off(o.PAUSE,this.globalPause,this),p.off(o.RESUME,this.globalResume,this);var T=this.scene.sys.sound;T&&T.off(f.GLOBAL_MUTE,this.globalMute,this)}});h.exports=g},58352:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){e.videoTexture&&(l.addToRenderList(e),t.batchSprite(e,e.frame,l,i))};h.exports=d},11511:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25305),l=t(44603),i=t(23568),s=t(18471);l.register("video",function(r,o){r===void 0&&(r={});var a=i(r,"key",null),u=new s(this.scene,0,0,a);return o!==void 0&&(r.add=o),e(this.scene,u,r),u})},89025:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(18471),l=t(39429);l.register("video",function(i,s,r){return this.displayList.add(new e(this.scene,i,s,r))})},10247:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(29849),i=t(58352),h.exports={renderWebGL:l,renderCanvas:i}},29849:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){if(e.videoTexture){l.camera.addToRenderList(e);var s=e.customRenderNodes,r=e.defaultRenderNodes;(s.Submitter||r.Submitter).run(l,e,i,0,s.Texturer||r.Texturer,s.Transformer||r.Transformer)}};h.exports=d},41481:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10312),l=t(96503),i=t(87902),s=t(83419),r=t(31401),o=t(95643),a=t(87841),u=t(37303),f=new s({Extends:o,Mixins:[r.Depth,r.GetBounds,r.Origin,r.Transform,r.ScrollFactor,r.Visible],initialize:function(c,g,p,T,C){T===void 0&&(T=1),C===void 0&&(C=T),o.call(this,c,"Zone"),this.setPosition(g,p),this.width=T,this.height=C,this.blendMode=e.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(v){this.scaleX=v/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(v){this.scaleY=v/this.height}},setSize:function(v,c,g){g===void 0&&(g=!0),this.width=v,this.height=c,this.updateDisplayOrigin();var p=this.input;return g&&p&&!p.customHitArea&&(p.hitArea.width=v,p.hitArea.height=c),this},setDisplaySize:function(v,c){return this.displayWidth=v,this.displayHeight=c,this},setCircleDropZone:function(v){return this.setDropZone(new l(0,0,v),i)},setRectangleDropZone:function(v,c){return this.setDropZone(new a(0,0,v,c),u)},setDropZone:function(v,c){return this.input||this.setInteractive(v,c,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(v,c,g){g.addToRenderList(c)},renderWebGL:function(v,c,g){g.camera.addToRenderList(c)}});h.exports=f},95261:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(44603),l=t(23568),i=t(41481);e.register("zone",function(s){var r=l(s,"x",0),o=l(s,"y",0),a=l(s,"width",1),u=l(s,"height",a);return new i(this.scene,r,o,a,u)})},84175:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(41481),l=t(39429);l.register("zone",function(i,s,r,o){return this.displayList.add(new e(this.scene,i,s,r,o))})},95166:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};h.exports=d},96503:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(87902),i=t(26241),s=t(79124),r=t(23777),o=t(28176),a=new e({initialize:function(f,v,c){f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=0),this.type=r.CIRCLE,this.x=f,this.y=v,this._radius=c,this._diameter=c*2},contains:function(u,f){return l(this,u,f)},getPoint:function(u,f){return i(this,u,f)},getPoints:function(u,f,v){return s(this,u,f,v)},getRandomPoint:function(u){return o(this,u)},setTo:function(u,f,v){return this.x=u,this.y=f,this._radius=v,this._diameter=v*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(u,f){return f===void 0&&(f=u),this.x=u,this.y=f,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(u){this._radius=u,this._diameter=u*2}},diameter:{get:function(){return this._diameter},set:function(u){this._diameter=u,this._radius=u*.5}},left:{get:function(){return this.x-this._radius},set:function(u){this.x=u+this._radius}},right:{get:function(){return this.x+this._radius},set:function(u){this.x=u-this._radius}},top:{get:function(){return this.y-this._radius},set:function(u){this.y=u+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(u){this.y=u-this._radius}}});h.exports=a},71562:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return 2*(Math.PI*t.radius)};h.exports=d},92110:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r){return r===void 0&&(r=new e),r.x=i.x+i.radius*Math.cos(s),r.y=i.y+i.radius*Math.sin(s),r};h.exports=l},42250:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(96503),l=function(i){return new e(i.x,i.y,i.radius)};h.exports=l},87902:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(t.radius>0&&e>=t.left&&e<=t.right&&l>=t.top&&l<=t.bottom){var i=(t.x-e)*(t.x-e),s=(t.y-l)*(t.y-l);return i+s<=t.radius*t.radius}else return!1};h.exports=d},5698:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87902),l=function(i,s){return e(i,s.x,s.y)};h.exports=l},70588:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87902),l=function(i,s){return e(i,s.x,s.y)&&e(i,s.right,s.y)&&e(i,s.x,s.bottom)&&e(i,s.right,s.bottom)};h.exports=l},26394:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e.setTo(t.x,t.y,t.radius)};h.exports=d},76278:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius};h.exports=d},2074:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=function(i,s){return s===void 0&&(s=new e),s.x=i.left,s.y=i.top,s.width=i.diameter,s.height=i.diameter,s};h.exports=l},26241:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(92110),l=t(62945),i=t(36383),s=t(26099),r=function(o,a,u){u===void 0&&(u=new s);var f=l(a,0,i.TAU);return e(o,f,u)};h.exports=r},79124:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(71562),l=t(92110),i=t(62945),s=t(36383),r=function(o,a,u,f){f===void 0&&(f=[]),!a&&u>0&&(a=e(o)/u);for(var v=0;v<a;v++){var c=i(v/a,0,s.TAU);f.push(l(o,c))}return f};h.exports=r},50884:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t.x+=e,t.y+=l,t};h.exports=d},39212:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x+=e.x,t.y+=e.y,t};h.exports=d},28176:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){s===void 0&&(s=new e);var r=2*Math.PI*Math.random(),o=Math.random()+Math.random(),a=o>1?2-o:o,u=a*Math.cos(r),f=a*Math.sin(r);return s.x=i.x+u*i.radius,s.y=i.y+f*i.radius,s};h.exports=l},88911:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(96503);e.Area=t(95166),e.Circumference=t(71562),e.CircumferencePoint=t(92110),e.Clone=t(42250),e.Contains=t(87902),e.ContainsPoint=t(5698),e.ContainsRect=t(70588),e.CopyFrom=t(26394),e.Equals=t(76278),e.GetBounds=t(2074),e.GetPoint=t(26241),e.GetPoints=t(79124),e.Offset=t(50884),e.OffsetPoint=t(39212),e.Random=t(28176),h.exports=e},23777:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};h.exports=d},78874:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};h.exports=d},92990:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=t.width/2,l=t.height/2,i=Math.pow(e-l,2)/Math.pow(e+l,2);return Math.PI*(e+l)*(1+3*i/(10+Math.sqrt(4-3*i)))};h.exports=d},79522:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r){r===void 0&&(r=new e);var o=i.width/2,a=i.height/2;return r.x=i.x+o*Math.cos(s),r.y=i.y+a*Math.sin(s),r};h.exports=l},58102:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8497),l=function(i){return new e(i.x,i.y,i.width,i.height)};h.exports=l},81154:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(t.width<=0||t.height<=0)return!1;var i=(e-t.x)/t.width,s=(l-t.y)/t.height;return i*=i,s*=s,i+s<.25};h.exports=d},46662:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(81154),l=function(i,s){return e(i,s.x,s.y)};h.exports=l},1632:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(81154),l=function(i,s){return e(i,s.x,s.y)&&e(i,s.right,s.y)&&e(i,s.x,s.bottom)&&e(i,s.right,s.bottom)};h.exports=l},65534:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)};h.exports=d},8497:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(81154),i=t(90549),s=t(48320),r=t(23777),o=t(24820),a=new e({initialize:function(f,v,c,g){f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=0),this.type=r.ELLIPSE,this.x=f,this.y=v,this.width=c,this.height=g},contains:function(u,f){return l(this,u,f)},getPoint:function(u,f){return i(this,u,f)},getPoints:function(u,f,v){return s(this,u,f,v)},getRandomPoint:function(u){return o(this,u)},setTo:function(u,f,v,c){return this.x=u,this.y=f,this.width=v,this.height=c,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(u,f){return f===void 0&&(f=u),this.x=u,this.y=f,this},setSize:function(u,f){return f===void 0&&(f=u),this.width=u,this.height=f,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(u){this.x=u+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(u){this.x=u-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(u){this.y=u+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(u){this.y=u-this.height/2}}});h.exports=a},36146:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height};h.exports=d},23694:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=function(i,s){return s===void 0&&(s=new e),s.x=i.left,s.y=i.top,s.width=i.width,s.height=i.height,s};h.exports=l},90549:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(79522),l=t(62945),i=t(36383),s=t(26099),r=function(o,a,u){u===void 0&&(u=new s);var f=l(a,0,i.TAU);return e(o,f,u)};h.exports=r},48320:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(92990),l=t(79522),i=t(62945),s=t(36383),r=function(o,a,u,f){f===void 0&&(f=[]),!a&&u>0&&(a=e(o)/u);for(var v=0;v<a;v++){var c=i(v/a,0,s.TAU);f.push(l(o,c))}return f};h.exports=r},73424:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t.x+=e,t.y+=l,t};h.exports=d},44808:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x+=e.x,t.y+=e.y,t};h.exports=d},24820:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){s===void 0&&(s=new e);var r=Math.random()*Math.PI*2,o=Math.sqrt(Math.random());return s.x=i.x+o*Math.cos(r)*i.width/2,s.y=i.y+o*Math.sin(r)*i.height/2,s};h.exports=l},49203:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8497);e.Area=t(78874),e.Circumference=t(92990),e.CircumferencePoint=t(79522),e.Clone=t(58102),e.Contains=t(81154),e.ContainsPoint=t(46662),e.ContainsRect=t(1632),e.CopyFrom=t(65534),e.Equals=t(36146),e.GetBounds=t(23694),e.GetPoint=t(90549),e.GetPoints=t(48320),e.Offset=t(73424),e.OffsetPoint=t(44808),e.Random=t(24820),h.exports=e},55738:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(23777),l=t(79291),i={Circle:t(88911),Ellipse:t(49203),Intersects:t(91865),Line:t(2529),Polygon:t(58423),Rectangle:t(93232),Triangle:t(84435)};i=l(!1,i,e),h.exports=i},2044:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20339),l=function(i,s){return e(i.x,i.y,s.x,s.y)<=i.radius+s.radius};h.exports=l},81491:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=e.width/2,i=e.height/2,s=Math.abs(t.x-e.x-l),r=Math.abs(t.y-e.y-i),o=l+t.radius,a=i+t.radius;if(s>o||r>a)return!1;if(s<=l||r<=i)return!0;var u=s-l,f=r-i,v=u*u,c=f*f,g=t.radius*t.radius;return v+c<=g};h.exports=d},63376:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=t(2044),i=function(s,r,o){if(o===void 0&&(o=[]),l(s,r)){var a=s.x,u=s.y,f=s.radius,v=r.x,c=r.y,g=r.radius,p,T,C,M,A;if(u===c)A=(g*g-f*f-v*v+a*a)/(2*(a-v)),p=1,T=-2*c,C=v*v+A*A-2*v*A+c*c-g*g,M=T*T-4*p*C,M===0?o.push(new e(A,-T/(2*p))):M>0&&(o.push(new e(A,(-T+Math.sqrt(M))/(2*p))),o.push(new e(A,(-T-Math.sqrt(M))/(2*p))));else{var R=(a-v)/(u-c),P=(g*g-f*f-v*v+a*a-c*c+u*u)/(2*(u-c));p=R*R+1,T=2*u*R-2*P*R-2*a,C=a*a+u*u+P*P-f*f-2*u*P,M=T*T-4*p*C,M===0?(A=-T/(2*p),o.push(new e(A,P-A*R))):M>0&&(A=(-T+Math.sqrt(M))/(2*p),o.push(new e(A,P-A*R)),A=(-T-Math.sqrt(M))/(2*p),o.push(new e(A,P-A*R)))}}return o};h.exports=i},97439:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(4042),l=t(81491),i=function(s,r,o){if(o===void 0&&(o=[]),l(s,r)){var a=r.getLineA(),u=r.getLineB(),f=r.getLineC(),v=r.getLineD();e(a,s,o),e(u,s,o),e(f,s,o),e(v,s,o)}return o};h.exports=i},4042:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=t(80462),i=function(s,r,o){if(o===void 0&&(o=[]),l(s,r)){var a=s.x1,u=s.y1,f=s.x2,v=s.y2,c=r.x,g=r.y,p=r.radius,T=f-a,C=v-u,M=a-c,A=u-g,R=T*T+C*C,P=2*(T*M+C*A),L=M*M+A*A-p*p,F=P*P-4*R*L,w,O;if(F===0){var B=-P/(2*R);w=a+B*T,O=u+B*C,B>=0&&B<=1&&o.push(new e(w,O))}else if(F>0){var I=(-P-Math.sqrt(F))/(2*R);w=a+I*T,O=u+I*C,I>=0&&I<=1&&o.push(new e(w,O));var D=(-P+Math.sqrt(F))/(2*R);w=a+D*T,O=u+D*C,D>=0&&D<=1&&o.push(new e(w,O))}}return o};h.exports=i},36100:(h,d,t)=>{/**
|
||
* @author Richard Davey
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25836),l=function(i,s,r,o){r===void 0&&(r=!1);var a=i.x1,u=i.y1,f=i.x2,v=i.y2,c=s.x1,g=s.y1,p=s.x2,T=s.y2,C=f-a,M=v-u,A=p-c,R=T-g,P=C*R-M*A;if(P===0)return null;var L,F,w;if(r){if(L=(C*(g-u)+M*(a-c))/(A*M-R*C),C!==0)F=(c+A*L-a)/C;else if(M!==0)F=(g+R*L-u)/M;else return null;if(F<0||L<0||L>1)return null;w=F}else{if(L=((c-a)*R-(g-u)*A)/P,F=((u-g)*C-(a-c)*M)/P,L<0||L>1||F<0||F>1)return null;w=L}return o===void 0&&(o=new e),o.set(a+C*w,u+M*w,w)};h.exports=l},3073:(h,d,t)=>{/**
|
||
* @author Richard Davey
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36100),l=t(23031),i=t(25836),s=new l,r=new i,o=function(a,u,f,v){f===void 0&&(f=!1),v===void 0&&(v=new i);var c=!1;v.set(),r.set();for(var g=u[u.length-1],p=0;p<u.length;p++){var T=u[p];s.setTo(g.x,g.y,T.x,T.y),g=T,e(a,s,f,r)&&(!c||r.z<v.z)&&(v.copy(r),c=!0)}return c?v:null};h.exports=o},56362:(h,d,t)=>{/**
|
||
* @author Richard Davey
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25836),l=t(61369),i=t(3073),s=new e,r=function(o,a,u,f){f===void 0&&(f=new l),Array.isArray(a)||(a=[a]);var v=!1;f.set(),s.set();for(var c=0;c<a.length;c++)i(o,a[c].points,u,s)&&(!v||s.z<f.z)&&(f.set(s.x,s.y,s.z,c),v=!0);return v?f:null};h.exports=r},60646:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=t(76112),i=t(92773),s=function(r,o,a){if(a===void 0&&(a=[]),i(r,o))for(var u=o.getLineA(),f=o.getLineB(),v=o.getLineC(),c=o.getLineD(),g=[new e,new e,new e,new e],p=[l(u,r,g[0]),l(f,r,g[1]),l(v,r,g[2]),l(c,r,g[3])],T=0;T<4;T++)p[T]&&a.push(g[T]);return a};h.exports=s},71147:(h,d,t)=>{/**
|
||
* @author Richard Davey
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61369),l=t(56362),i=t(23031),s=new i;function r(u,f,v,c,g){var p=Math.cos(u),T=Math.sin(u);s.setTo(f,v,f+p,v+T);var C=l(s,c,!0);C&&g.push(new e(C.x,C.y,u,C.w))}function o(u,f){return u.z-f.z}var a=function(u,f,v){Array.isArray(v)||(v=[v]);for(var c=[],g=[],p=0;p<v.length;p++)for(var T=v[p].points,C=0;C<T.length;C++){var M=Math.atan2(T[C].y-f,T[C].x-u);g.indexOf(M)===-1&&(r(M,u,f,v,c),r(M-1e-5,u,f,v,c),r(M+1e-5,u,f,v,c),g.push(M))}return c.sort(o)};h.exports=a},68389:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=t(59996),i=function(s,r,o){return o===void 0&&(o=new e),l(s,r)&&(o.x=Math.max(s.x,r.x),o.y=Math.max(s.y,r.y),o.width=Math.min(s.right,r.right)-o.x,o.height=Math.min(s.bottom,r.bottom)-o.y),o};h.exports=i},52784:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(60646),l=t(59996),i=function(s,r,o){if(o===void 0&&(o=[]),l(s,r)){var a=s.getLineA(),u=s.getLineB(),f=s.getLineC(),v=s.getLineD();e(a,r,o),e(u,r,o),e(f,r,o),e(v,r,o)}return o};h.exports=i},26341:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(89265),l=t(60646),i=function(s,r,o){if(o===void 0&&(o=[]),e(s,r)){var a=r.getLineA(),u=r.getLineB(),f=r.getLineC();l(a,s,o),l(u,s,o),l(f,s,o)}return o};h.exports=i},38720:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(4042),l=t(67636),i=function(s,r,o){if(o===void 0&&(o=[]),l(s,r)){var a=s.getLineA(),u=s.getLineB(),f=s.getLineC();e(a,r,o),e(u,r,o),e(f,r,o)}return o};h.exports=i},13882:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=t(2822),i=t(76112),s=function(r,o,a){if(a===void 0&&(a=[]),l(r,o))for(var u=r.getLineA(),f=r.getLineB(),v=r.getLineC(),c=[new e,new e,new e],g=[i(u,o,c[0]),i(f,o,c[1]),i(v,o,c[2])],p=0;p<3;p++)g[p]&&a.push(c[p]);return a};h.exports=s},75636:(h,d,t)=>{/**
|
||
* @author Florian Vazelle
|
||
* @author Geoffrey Glaive
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(82944),l=t(13882),i=function(s,r,o){if(o===void 0&&(o=[]),e(s,r)){var a=r.getLineA(),u=r.getLineB(),f=r.getLineC();l(s,a,o),l(s,u,o),l(s,f,o)}return o};h.exports=i},80462:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87902),l=t(26099),i=new l,s=function(r,o,a){if(a===void 0&&(a=i),e(o,r.x1,r.y1))return a.x=r.x1,a.y=r.y1,!0;if(e(o,r.x2,r.y2))return a.x=r.x2,a.y=r.y2,!0;var u=r.x2-r.x1,f=r.y2-r.y1,v=o.x-r.x1,c=o.y-r.y1,g=u*u+f*f,p=u,T=f;if(g>0){var C=(v*u+c*f)/g;p*=C,T*=C}a.x=r.x1+p,a.y=r.y1+T;var M=p*p+T*T;return M<=g&&p*u+T*f>=0&&e(o,a.x,a.y)};h.exports=s},76112:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=t.x1,s=t.y1,r=t.x2,o=t.y2,a=e.x1,u=e.y1,f=e.x2,v=e.y2;if(i===r&&s===o||a===f&&u===v)return!1;var c=(v-u)*(r-i)-(f-a)*(o-s);if(c===0)return!1;var g=((f-a)*(s-u)-(v-u)*(i-a))/c,p=((r-i)*(s-u)-(o-s)*(i-a))/c;return g<0||g>1||p<0||p>1?!1:(l&&(l.x=i+g*(r-i),l.y=s+g*(o-s)),!0)};h.exports=d},92773:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.x1,i=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,u=e.right,f=e.bottom,v=0;if(l>=o&&l<=u&&i>=a&&i<=f||s>=o&&s<=u&&r>=a&&r<=f)return!0;if(l<o&&s>=o){if(v=i+(r-i)*(o-l)/(s-l),v>a&&v<=f)return!0}else if(l>u&&s<=u&&(v=i+(r-i)*(u-l)/(s-l),v>=a&&v<=f))return!0;if(i<a&&r>=a){if(v=l+(s-l)*(a-i)/(r-i),v>=o&&v<=u)return!0}else if(i>f&&r<=f&&(v=l+(s-l)*(f-i)/(r-i),v>=o&&v<=u))return!0;return!1};h.exports=d},16204:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Florian Mertens
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){l===void 0&&(l=1);var i=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,u=t.y,f=(r-i)*(r-i)+(o-s)*(o-s);if(f===0)return!1;var v=((a-i)*(r-i)+(u-s)*(o-s))/f;if(v<0)return Math.sqrt((i-a)*(i-a)+(s-u)*(s-u))<=l;if(v>=0&&v<=1){var c=((s-u)*(r-i)-(i-a)*(o-s))/f;return Math.abs(c)*Math.sqrt(f)<=l}else return Math.sqrt((r-a)*(r-a)+(o-u)*(o-u))<=l};h.exports=d},14199:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(16204),l=function(i,s){if(!e(i,s))return!1;var r=Math.min(s.x1,s.x2),o=Math.max(s.x1,s.x2),a=Math.min(s.y1,s.y2),u=Math.max(s.y1,s.y2);return i.x>=r&&i.x<=o&&i.y>=a&&i.y<=u};h.exports=l},59996:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.width<=0||t.height<=0||e.width<=0||e.height<=0?!1:!(t.right<e.x||t.bottom<e.y||t.x>e.right||t.y>e.bottom)};h.exports=d},89265:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(76112),l=t(37303),i=t(48653),s=t(77493),r=function(o,a){if(a.left>o.right||a.right<o.left||a.top>o.bottom||a.bottom<o.top)return!1;var u=a.getLineA(),f=a.getLineB(),v=a.getLineC();if(l(o,u.x1,u.y1)||l(o,u.x2,u.y2)||l(o,f.x1,f.y1)||l(o,f.x2,f.y2)||l(o,v.x1,v.y1)||l(o,v.x2,v.y2))return!0;var c=o.getLineA(),g=o.getLineB(),p=o.getLineC(),T=o.getLineD();if(e(u,c)||e(u,g)||e(u,p)||e(u,T)||e(f,c)||e(f,g)||e(f,p)||e(f,T)||e(v,c)||e(v,g)||e(v,p)||e(v,T))return!0;var C=s(o),M=i(a,C,!0);return M.length>0};h.exports=r},84411:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s,r){return r===void 0&&(r=0),!(e>t.right+r||l<t.left-r||i>t.bottom+r||s<t.top-r)};h.exports=d},67636:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(80462),l=t(10690),i=function(s,r){return s.left>r.right||s.right<r.left||s.top>r.bottom||s.bottom<r.top?!1:!!(l(s,r.x,r.y)||e(s.getLineA(),r)||e(s.getLineB(),r)||e(s.getLineC(),r))};h.exports=i},2822:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(76112),l=function(i,s){return!!(i.contains(s.x1,s.y1)||i.contains(s.x2,s.y2)||e(i.getLineA(),s)||e(i.getLineB(),s)||e(i.getLineC(),s))};h.exports=l},82944:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(48653),l=t(71694),i=t(76112),s=function(r,o){if(r.left>o.right||r.right<o.left||r.top>o.bottom||r.bottom<o.top)return!1;var a=r.getLineA(),u=r.getLineB(),f=r.getLineC(),v=o.getLineA(),c=o.getLineB(),g=o.getLineC();if(i(a,v)||i(a,c)||i(a,g)||i(u,v)||i(u,c)||i(u,g)||i(f,v)||i(f,c)||i(f,g))return!0;var p=l(r),T=e(o,p,!0);return T.length>0||(p=l(o),T=e(r,p,!0),T.length>0)};h.exports=s},91865:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};h.exports=d},84993:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){e===void 0&&(e=1),l===void 0&&(l=[]);var i=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-i),u=Math.abs(o-s),f=i<r?1:-1,v=s<o?1:-1,c=a-u;l.push({x:i,y:s});for(var g=1;!(i===r&&s===o);){var p=c<<1;p>-u&&(c-=u,i+=f),p<a&&(c+=a,s+=v),g%e===0&&l.push({x:i,y:s}),g++}return l};h.exports=d},36469:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=e-(t.x1+t.x2)/2,s=l-(t.y1+t.y2)/2;return t.x1+=i,t.y1+=s,t.x2+=i,t.y2+=s,t};h.exports=d},31116:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(23031),l=function(i){return new e(i.x1,i.y1,i.x2,i.y2)};h.exports=l},59944:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)};h.exports=d},59220:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2};h.exports=d},78177:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35001),l=function(i,s,r){r===void 0&&(r=s);var o=e(i),a=i.x2-i.x1,u=i.y2-i.y1;return s&&(i.x1=i.x1-a/o*s,i.y1=i.y1-u/o*s),r&&(i.x2=i.x2+a/o*r,i.y2=i.y2+u/o*r),i};h.exports=l},26708:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(52816),l=t(6113),i=t(26099),s=function(r,o,a,u,f){u===void 0&&(u=0),f===void 0&&(f=[]);var v=[],c=r.x1,g=r.y1,p=r.x2-c,T=r.y2-g,C=l(o,f),M,A,R=a-1;for(M=0;M<R;M++)A=C(M/R),v.push(new i(c+p*A,g+T*A));if(A=C(1),v.push(new i(c+p*A,g+T*A)),u>0){var P=v[0],L=[P];for(M=1;M<v.length-1;M++){var F=v[M];e(P,F)>=u&&(L.push(F),P=F)}var w=v[v.length-1];return e(P,w)<u&&L.pop(),L.push(w),L}else return v};h.exports=s},32125:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){return s===void 0&&(s=new e),s.x=(i.x1+i.x2)/2,s.y=(i.y1+i.y2)/2,s};h.exports=l},99569:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Florian Mertens
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r){r===void 0&&(r=new e);var o=i.x1,a=i.y1,u=i.x2,f=i.y2,v=(u-o)*(u-o)+(f-a)*(f-a);if(v===0)return r;var c=((s.x-o)*(u-o)+(s.y-a)*(f-a))/v;return r.x=o+c*(u-o),r.y=a+c*(f-a),r};h.exports=l},34638:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=t(91938),i=t(26099),s=function(r,o){o===void 0&&(o=new i);var a=l(r)-e.PI_OVER_2;return o.x=Math.cos(a),o.y=Math.sin(a),o};h.exports=s},13151:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r){return r===void 0&&(r=new e),r.x=i.x1+(i.x2-i.x1)*s,r.y=i.y1+(i.y2-i.y1)*s,r};h.exports=l},15258:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35001),l=t(26099),i=function(s,r,o,a){a===void 0&&(a=[]),!r&&o>0&&(r=e(s)/o);for(var u=s.x1,f=s.y1,v=s.x2,c=s.y2,g=0;g<r;g++){var p=g/r,T=u+(v-u)*p,C=f+(c-f)*p;a.push(new l(T,C))}return a};h.exports=i},26408:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Florian Mertens
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.x1,i=t.y1,s=t.x2,r=t.y2,o=(s-l)*(s-l)+(r-i)*(r-i);if(o===0)return!1;var a=((i-e.y)*(s-l)-(l-e.x)*(r-i))/o;return Math.abs(a)*Math.sqrt(o)};h.exports=d},98770:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return Math.abs(t.y1-t.y2)};h.exports=d},35001:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};h.exports=d},23031:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(13151),i=t(15258),s=t(23777),r=t(65822),o=t(26099),a=new e({initialize:function(f,v,c,g){f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=0),this.type=s.LINE,this.x1=f,this.y1=v,this.x2=c,this.y2=g},getPoint:function(u,f){return l(this,u,f)},getPoints:function(u,f,v){return i(this,u,f,v)},getRandomPoint:function(u){return r(this,u)},setTo:function(u,f,v,c){return u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=0),this.x1=u,this.y1=f,this.x2=v,this.y2=c,this},setFromObjects:function(u,f){return this.x1=u.x,this.y1=u.y,this.x2=f.x,this.y2=f.y,this},getPointA:function(u){return u===void 0&&(u=new o),u.set(this.x1,this.y1),u},getPointB:function(u){return u===void 0&&(u=new o),u.set(this.x2,this.y2),u},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(u){this.x1<=this.x2?this.x1=u:this.x2=u}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(u){this.x1>this.x2?this.x1=u:this.x2=u}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(u){this.y1<=this.y2?this.y1=u:this.y2=u}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(u){this.y1>this.y2?this.y1=u:this.y2=u}}});h.exports=a},64795:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=t(15994),i=t(91938),s=function(r){var o=i(r)-e.PI_OVER_2;return l(o,-Math.PI,Math.PI)};h.exports=s},52616:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=t(91938),i=function(s){return Math.cos(l(s)-e.PI_OVER_2)};h.exports=i},87231:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=t(91938),i=function(s){return Math.sin(l(s)-e.PI_OVER_2)};h.exports=i},89662:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t.x1+=e,t.y1+=l,t.x2+=e,t.y2+=l,t};h.exports=d},71165:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};h.exports=d},65822:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){s===void 0&&(s=new e);var r=Math.random();return s.x=i.x1+r*(i.x2-i.x1),s.y=i.y1+r*(i.y2-i.y1),s};h.exports=l},69777:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91938),l=t(64795),i=function(s,r){return 2*l(r)-Math.PI-e(s)};h.exports=i},39706:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(64400),l=function(i,s){var r=(i.x1+i.x2)/2,o=(i.y1+i.y2)/2;return e(i,r,o,s)};h.exports=l},82585:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(64400),l=function(i,s,r){return e(i,s.x,s.y,r)};h.exports=l},64400:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=Math.cos(i),r=Math.sin(i),o=t.x1-e,a=t.y1-l;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+l,o=t.x2-e,a=t.y2-l,t.x2=o*s-a*r+e,t.y2=o*r+a*s+l,t};h.exports=d},62377:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s){return t.x1=e,t.y1=l,t.x2=e+Math.cos(i)*s,t.y2=l+Math.sin(i)*s,t};h.exports=d},71366:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};h.exports=d},10809:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return Math.abs(t.x1-t.x2)};h.exports=d},2529:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(23031);e.Angle=t(91938),e.BresenhamPoints=t(84993),e.CenterOn=t(36469),e.Clone=t(31116),e.CopyFrom=t(59944),e.Equals=t(59220),e.Extend=t(78177),e.GetEasedPoints=t(26708),e.GetMidPoint=t(32125),e.GetNearestPoint=t(99569),e.GetNormal=t(34638),e.GetPoint=t(13151),e.GetPoints=t(15258),e.GetShortestDistance=t(26408),e.Height=t(98770),e.Length=t(35001),e.NormalAngle=t(64795),e.NormalX=t(52616),e.NormalY=t(87231),e.Offset=t(89662),e.PerpSlope=t(71165),e.Random=t(65822),e.ReflectAngle=t(69777),e.Rotate=t(39706),e.RotateAroundPoint=t(82585),e.RotateAroundXY=t(64400),e.SetToAngle=t(62377),e.Slope=t(71366),e.Width=t(10809),h.exports=e},12306:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25717),l=function(i){return new e(i.points)};h.exports=l},63814:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){for(var i=!1,s=-1,r=t.points.length-1;++s<t.points.length;r=s){var o=t.points[s].x,a=t.points[s].y,u=t.points[r].x,f=t.points[r].y;(a<=l&&l<f||f<=l&&l<a)&&e<(u-o)*(l-a)/(f-a)+o&&(i=!i)}return i};h.exports=d},99338:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(63814),l=function(i,s){return e(i,s.x,s.y)};h.exports=l},94811:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function d(G,b,Y){Y=Y||2;var W=b&&b.length,H=W?b[0]*Y:G.length,X=t(G,0,H,Y,!0),K=[];if(!X||X.next===X.prev)return K;var Z,Q,j,J,tt,k,q;if(W&&(X=a(G,b,X,Y)),G.length>80*Y){Z=j=G[0],Q=J=G[1];for(var _=Y;_<H;_+=Y)tt=G[_],k=G[_+1],tt<Z&&(Z=tt),k<Q&&(Q=k),tt>j&&(j=tt),k>J&&(J=k);q=Math.max(j-Z,J-Q),q=q!==0?32767/q:0}return l(X,K,Y,Z,Q,q,0),K}function t(G,b,Y,W,H){var X,K;if(H===U(G,b,Y,W)>0)for(X=b;X<Y;X+=W)K=N(X,G[X],G[X+1],K);else for(X=Y-W;X>=b;X-=W)K=N(X,G[X],G[X+1],K);return K&&P(K,K.next)&&(z(K),K=K.next),K}function e(G,b){if(!G)return G;b||(b=G);var Y=G,W;do if(W=!1,!Y.steiner&&(P(Y,Y.next)||R(Y.prev,Y,Y.next)===0)){if(z(Y),Y=b=Y.prev,Y===Y.next)break;W=!0}else Y=Y.next;while(W||Y!==b);return b}function l(G,b,Y,W,H,X,K){if(G){!K&&X&&g(G,W,H,X);for(var Z=G,Q,j;G.prev!==G.next;){if(Q=G.prev,j=G.next,X?s(G,W,H,X):i(G)){b.push(Q.i/Y|0),b.push(G.i/Y|0),b.push(j.i/Y|0),z(G),G=j.next,Z=j.next;continue}if(G=j,G===Z){K?K===1?(G=r(e(G),b,Y),l(G,b,Y,W,H,X,2)):K===2&&o(G,b,Y,W,H,X):l(e(G),b,Y,W,H,X,1);break}}}}function i(G){var b=G.prev,Y=G,W=G.next;if(R(b,Y,W)>=0)return!1;for(var H=b.x,X=Y.x,K=W.x,Z=b.y,Q=Y.y,j=W.y,J=H<X?H<K?H:K:X<K?X:K,tt=Z<Q?Z<j?Z:j:Q<j?Q:j,k=H>X?H>K?H:K:X>K?X:K,q=Z>Q?Z>j?Z:j:Q>j?Q:j,_=W.next;_!==b;){if(_.x>=J&&_.x<=k&&_.y>=tt&&_.y<=q&&M(H,Z,X,Q,K,j,_.x,_.y)&&R(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function s(G,b,Y,W){var H=G.prev,X=G,K=G.next;if(R(H,X,K)>=0)return!1;for(var Z=H.x,Q=X.x,j=K.x,J=H.y,tt=X.y,k=K.y,q=Z<Q?Z<j?Z:j:Q<j?Q:j,_=J<tt?J<k?J:k:tt<k?tt:k,rt=Z>Q?Z>j?Z:j:Q>j?Q:j,at=J>tt?J>k?J:k:tt>k?tt:k,ht=T(q,_,b,Y,W),ot=T(rt,at,b,Y,W),nt=G.prevZ,it=G.nextZ;nt&&nt.z>=ht&&it&&it.z<=ot;){if(nt.x>=q&&nt.x<=rt&&nt.y>=_&&nt.y<=at&&nt!==H&&nt!==K&&M(Z,J,Q,tt,j,k,nt.x,nt.y)&&R(nt.prev,nt,nt.next)>=0||(nt=nt.prevZ,it.x>=q&&it.x<=rt&&it.y>=_&&it.y<=at&&it!==H&&it!==K&&M(Z,J,Q,tt,j,k,it.x,it.y)&&R(it.prev,it,it.next)>=0))return!1;it=it.nextZ}for(;nt&&nt.z>=ht;){if(nt.x>=q&&nt.x<=rt&&nt.y>=_&&nt.y<=at&&nt!==H&&nt!==K&&M(Z,J,Q,tt,j,k,nt.x,nt.y)&&R(nt.prev,nt,nt.next)>=0)return!1;nt=nt.prevZ}for(;it&&it.z<=ot;){if(it.x>=q&&it.x<=rt&&it.y>=_&&it.y<=at&&it!==H&&it!==K&&M(Z,J,Q,tt,j,k,it.x,it.y)&&R(it.prev,it,it.next)>=0)return!1;it=it.nextZ}return!0}function r(G,b,Y){var W=G;do{var H=W.prev,X=W.next.next;!P(H,X)&&L(H,W,W.next,X)&&B(H,X)&&B(X,H)&&(b.push(H.i/Y|0),b.push(W.i/Y|0),b.push(X.i/Y|0),z(W),z(W.next),W=G=X),W=W.next}while(W!==G);return e(W)}function o(G,b,Y,W,H,X){var K=G;do{for(var Z=K.next.next;Z!==K.prev;){if(K.i!==Z.i&&A(K,Z)){var Q=D(K,Z);K=e(K,K.next),Q=e(Q,Q.next),l(K,b,Y,W,H,X,0),l(Q,b,Y,W,H,X,0);return}Z=Z.next}K=K.next}while(K!==G)}function a(G,b,Y,W){var H=[],X,K,Z,Q,j;for(X=0,K=b.length;X<K;X++)Z=b[X]*W,Q=X<K-1?b[X+1]*W:G.length,j=t(G,Z,Q,W,!1),j===j.next&&(j.steiner=!0),H.push(C(j));for(H.sort(u),X=0;X<H.length;X++)Y=f(H[X],Y);return Y}function u(G,b){return G.x-b.x}function f(G,b){var Y=v(G,b);if(!Y)return b;var W=D(Y,G);return e(W,W.next),e(Y,Y.next)}function v(G,b){var Y=b,W=G.x,H=G.y,X=-1/0,K;do{if(H<=Y.y&&H>=Y.next.y&&Y.next.y!==Y.y){var Z=Y.x+(H-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(Z<=W&&Z>X&&(X=Z,K=Y.x<Y.next.x?Y:Y.next,Z===W))return K}Y=Y.next}while(Y!==b);if(!K)return null;var Q=K,j=K.x,J=K.y,tt=1/0,k;Y=K;do W>=Y.x&&Y.x>=j&&W!==Y.x&&M(H<J?W:X,H,j,J,H<J?X:W,H,Y.x,Y.y)&&(k=Math.abs(H-Y.y)/(W-Y.x),B(Y,G)&&(k<tt||k===tt&&(Y.x>K.x||Y.x===K.x&&c(K,Y)))&&(K=Y,tt=k)),Y=Y.next;while(Y!==Q);return K}function c(G,b){return R(G.prev,G,b.prev)<0&&R(b.next,G,G.next)<0}function g(G,b,Y,W){var H=G;do H.z===0&&(H.z=T(H.x,H.y,b,Y,W)),H.prevZ=H.prev,H.nextZ=H.next,H=H.next;while(H!==G);H.prevZ.nextZ=null,H.prevZ=null,p(H)}function p(G){var b,Y,W,H,X,K,Z,Q,j=1;do{for(Y=G,G=null,X=null,K=0;Y;){for(K++,W=Y,Z=0,b=0;b<j&&(Z++,W=W.nextZ,!!W);b++);for(Q=j;Z>0||Q>0&&W;)Z!==0&&(Q===0||!W||Y.z<=W.z)?(H=Y,Y=Y.nextZ,Z--):(H=W,W=W.nextZ,Q--),X?X.nextZ=H:G=H,H.prevZ=X,X=H;Y=W}X.nextZ=null,j*=2}while(K>1);return G}function T(G,b,Y,W,H){return G=(G-Y)*H|0,b=(b-W)*H|0,G=(G|G<<8)&16711935,G=(G|G<<4)&252645135,G=(G|G<<2)&858993459,G=(G|G<<1)&1431655765,b=(b|b<<8)&16711935,b=(b|b<<4)&252645135,b=(b|b<<2)&858993459,b=(b|b<<1)&1431655765,G|b<<1}function C(G){var b=G,Y=G;do(b.x<Y.x||b.x===Y.x&&b.y<Y.y)&&(Y=b),b=b.next;while(b!==G);return Y}function M(G,b,Y,W,H,X,K,Z){return(H-K)*(b-Z)>=(G-K)*(X-Z)&&(G-K)*(W-Z)>=(Y-K)*(b-Z)&&(Y-K)*(X-Z)>=(H-K)*(W-Z)}function A(G,b){return G.next.i!==b.i&&G.prev.i!==b.i&&!O(G,b)&&(B(G,b)&&B(b,G)&&I(G,b)&&(R(G.prev,G,b.prev)||R(G,b.prev,b))||P(G,b)&&R(G.prev,G,G.next)>0&&R(b.prev,b,b.next)>0)}function R(G,b,Y){return(b.y-G.y)*(Y.x-b.x)-(b.x-G.x)*(Y.y-b.y)}function P(G,b){return G.x===b.x&&G.y===b.y}function L(G,b,Y,W){var H=w(R(G,b,Y)),X=w(R(G,b,W)),K=w(R(Y,W,G)),Z=w(R(Y,W,b));return!!(H!==X&&K!==Z||H===0&&F(G,Y,b)||X===0&&F(G,W,b)||K===0&&F(Y,G,W)||Z===0&&F(Y,b,W))}function F(G,b,Y){return b.x<=Math.max(G.x,Y.x)&&b.x>=Math.min(G.x,Y.x)&&b.y<=Math.max(G.y,Y.y)&&b.y>=Math.min(G.y,Y.y)}function w(G){return G>0?1:G<0?-1:0}function O(G,b){var Y=G;do{if(Y.i!==G.i&&Y.next.i!==G.i&&Y.i!==b.i&&Y.next.i!==b.i&&L(Y,Y.next,G,b))return!0;Y=Y.next}while(Y!==G);return!1}function B(G,b){return R(G.prev,G,G.next)<0?R(G,b,G.next)>=0&&R(G,G.prev,b)>=0:R(G,b,G.prev)<0||R(G,G.next,b)<0}function I(G,b){var Y=G,W=!1,H=(G.x+b.x)/2,X=(G.y+b.y)/2;do Y.y>X!=Y.next.y>X&&Y.next.y!==Y.y&&H<(Y.next.x-Y.x)*(X-Y.y)/(Y.next.y-Y.y)+Y.x&&(W=!W),Y=Y.next;while(Y!==G);return W}function D(G,b){var Y=new V(G.i,G.x,G.y),W=new V(b.i,b.x,b.y),H=G.next,X=b.prev;return G.next=b,b.prev=G,Y.next=H,H.prev=Y,W.next=Y,Y.prev=W,X.next=W,W.prev=X,W}function N(G,b,Y,W){var H=new V(G,b,Y);return W?(H.next=W.next,H.prev=W,W.next.prev=H,W.next=H):(H.prev=H,H.next=H),H}function z(G){G.next.prev=G.prev,G.prev.next=G.next,G.prevZ&&(G.prevZ.nextZ=G.nextZ),G.nextZ&&(G.nextZ.prevZ=G.prevZ)}function V(G,b,Y){this.i=G,this.x=b,this.y=Y,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}d.deviation=function(G,b,Y,W){var H=b&&b.length,X=H?b[0]*Y:G.length,K=Math.abs(U(G,0,X,Y));if(H)for(var Z=0,Q=b.length;Z<Q;Z++){var j=b[Z]*Y,J=Z<Q-1?b[Z+1]*Y:G.length;K-=Math.abs(U(G,j,J,Y))}var tt=0;for(Z=0;Z<W.length;Z+=3){var k=W[Z]*Y,q=W[Z+1]*Y,_=W[Z+2]*Y;tt+=Math.abs((G[k]-G[_])*(G[q+1]-G[k+1])-(G[k]-G[q])*(G[_+1]-G[k+1]))}return K===0&&tt===0?0:Math.abs((tt-K)/K)};function U(G,b,Y,W){for(var H=0,X=b,K=Y-W;X<Y;X+=W)H+=(G[K]-G[X])*(G[X+1]+G[K+1]),K=X;return H}d.flatten=function(G){for(var b=G[0][0].length,Y={vertices:[],holes:[],dimensions:b},W=0,H=0;H<G.length;H++){for(var X=0;X<G[H].length;X++)for(var K=0;K<b;K++)Y.vertices.push(G[H][X][K]);H>0&&(W+=G[H-1].length,Y.holes.push(W))}return Y},h.exports=d},13829:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=function(i,s){s===void 0&&(s=new e);for(var r=1/0,o=1/0,a=-r,u=-o,f,v=0;v<i.points.length;v++)f=i.points[v],r=Math.min(r,f.x),o=Math.min(o,f.y),a=Math.max(a,f.x),u=Math.max(u,f.y);return s.x=r,s.y=o,s.width=a-r,s.height=u-o,s};h.exports=l},26173:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=[]);for(var l=0;l<t.points.length;l++)e.push(t.points[l].x),e.push(t.points[l].y);return e};h.exports=d},9564:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35001),l=t(23031),i=t(30052),s=function(r,o,a,u){u===void 0&&(u=[]);var f=r.points,v=i(r);!o&&a>0&&(o=v/a);for(var c=0;c<o;c++)for(var g=v*(c/o),p=0,T=0;T<f.length;T++){var C=f[T],M=f[(T+1)%f.length],A=new l(C.x,C.y,M.x,M.y),R=e(A);if(g<p||g>p+R){p+=R;continue}var P=A.getPoint((g-p)/R);u.push(P);break}return u};h.exports=s},30052:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35001),l=t(23031),i=function(s){for(var r=s.points,o=0,a=0;a<r.length;a++){var u=r[a],f=r[(a+1)%r.length],v=new l(u.x,u.y,f.x,f.y);o+=e(v)}return o};h.exports=i},25717:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(63814),i=t(9564),s=t(23777),r=new e({initialize:function(a){this.type=s.POLYGON,this.area=0,this.points=[],a&&this.setTo(a)},contains:function(o,a){return l(this,o,a)},setTo:function(o){if(this.area=0,this.points=[],typeof o=="string"&&(o=o.split(" ")),!Array.isArray(o))return this;for(var a,u=0;u<o.length;u++)a={x:0,y:0},typeof o[u]=="number"||typeof o[u]=="string"?(a.x=parseFloat(o[u]),a.y=parseFloat(o[u+1]),u++):Array.isArray(o[u])?(a.x=o[u][0],a.y=o[u][1]):(a.x=o[u].x,a.y=o[u].y),this.points.push(a);return this.calculateArea(),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var o=0,a,u,f=0;f<this.points.length-1;f++)a=this.points[f],u=this.points[f+1],o+=(u.x-a.x)*(a.y+u.y);return a=this.points[0],u=this.points[this.points.length-1],o+=(a.x-u.x)*(u.y+a.y),this.area=-o*.5,this.area},getPoints:function(o,a,u){return i(this,o,a,u)}});h.exports=r},8133:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.points.reverse(),t};h.exports=d},29524:h=>{function d(r,o){var a=r.x-o.x,u=r.y-o.y;return a*a+u*u}function t(r,o,a){var u=o.x,f=o.y,v=a.x-u,c=a.y-f;if(v!==0||c!==0){var g=((r.x-u)*v+(r.y-f)*c)/(v*v+c*c);g>1?(u=a.x,f=a.y):g>0&&(u+=v*g,f+=c*g)}return v=r.x-u,c=r.y-f,v*v+c*c}function e(r,o){for(var a=r[0],u=[a],f,v=1,c=r.length;v<c;v++)f=r[v],d(f,a)>o&&(u.push(f),a=f);return a!==f&&u.push(f),u}function l(r,o,a,u,f){for(var v=u,c,g=o+1;g<a;g++){var p=t(r[g],r[o],r[a]);p>v&&(c=g,v=p)}v>u&&(c-o>1&&l(r,o,c,u,f),f.push(r[c]),a-c>1&&l(r,c,a,u,f))}function i(r,o){var a=r.length-1,u=[r[0]];return l(r,0,a,o,u),u.push(r[a]),u}var s=function(r,o,a){o===void 0&&(o=1),a===void 0&&(a=!1);var u=r.points;if(u.length>2){var f=o*o;a||(u=e(u,f)),r.setTo(i(u,f))}return r};h.exports=s},5469:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Igor Ognichenko <ognichenko.igor@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(e,l){return e[0]=l[0],e[1]=l[1],e},t=function(e){var l,i=[],s=e.points;for(l=0;l<s.length;l++)i.push([s[l].x,s[l].y]);var r=[];for(i.length>0&&r.push(d([0,0],i[0])),l=0;l<i.length-1;l++){var o=i[l],a=i[l+1],u=o[0],f=o[1],v=a[0],c=a[1];r.push([.85*u+.15*v,.85*f+.15*c]),r.push([.15*u+.85*v,.15*f+.85*c])}return i.length>1&&r.push(d([0,0],i[i.length-1])),e.setTo(r)};h.exports=t},24709:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){for(var i=t.points,s=0;s<i.length;s++)i[s].x+=e,i[s].y+=l;return t};h.exports=d},58423:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25717);e.Clone=t(12306),e.Contains=t(63814),e.ContainsPoint=t(99338),e.Earcut=t(94811),e.GetAABB=t(13829),e.GetNumberArray=t(26173),e.GetPoints=t(9564),e.Perimeter=t(30052),e.Reverse=t(8133),e.Simplify=t(29524),e.Smooth=t(5469),e.Translate=t(24709),h.exports=e},62224:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.width*t.height};h.exports=d},98615:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};h.exports=d},31688:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=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};h.exports=d},67502:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t.x=e-t.width/2,t.y=l-t.height/2,t};h.exports=d},65085:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=function(i){return new e(i.x,i.y,i.width,i.height)};h.exports=l},37303:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t.width<=0||t.height<=0?!1:t.x<=e&&t.x+t.width>=e&&t.y<=l&&t.y+t.height>=l};h.exports=d},96553:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37303),l=function(i,s){return e(i,s.x,s.y)};h.exports=l},70273:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e.width*e.height>t.width*t.height?!1:e.x>t.x&&e.x<t.right&&e.right>t.x&&e.right<t.right&&e.y>t.y&&e.y<t.bottom&&e.bottom>t.y&&e.bottom<t.bottom};h.exports=d},43459:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)};h.exports=d},77493:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e};h.exports=d},9219:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height};h.exports=d},53751:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8249),l=function(i,s){var r=e(i);return r<e(s)?i.setSize(s.height*r,s.height):i.setSize(s.width,s.width/r),i.setPosition(s.centerX-i.width/2,s.centerY-i.height/2)};h.exports=l},16088:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8249),l=function(i,s){var r=e(i);return r>e(s)?i.setSize(s.height*r,s.height):i.setSize(s.width,s.width/r),i.setPosition(s.centerX-i.width/2,s.centerY-i.height/2)};h.exports=l},80774:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};h.exports=d},83859:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=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};h.exports=d},19217:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=t(36383),i=function(s,r){if(r===void 0&&(r=new e),s.length===0)return r;for(var o=Number.MAX_VALUE,a=Number.MAX_VALUE,u=l.MIN_SAFE_INTEGER,f=l.MIN_SAFE_INTEGER,v,c,g,p=0;p<s.length;p++)v=s[p],Array.isArray(v)?(c=v[0],g=v[1]):(c=v.x,g=v.y),o=Math.min(o,c),a=Math.min(a,g),u=Math.max(u,c),f=Math.max(f,g);return r.x=o,r.y=a,r.width=u-o,r.height=f-a,r};h.exports=i},9477:(h,d,t)=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=function(i,s,r,o,a){return a===void 0&&(a=new e),a.setTo(Math.min(i,r),Math.min(s,o),Math.abs(i-r),Math.abs(s-o))};h.exports=l},8249:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.height===0?NaN:t.width/t.height};h.exports=d},27165:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){return s===void 0&&(s=new e),s.x=i.centerX,s.y=i.centerY,s};h.exports=l},20812:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(13019),l=t(26099),i=function(s,r,o){if(o===void 0&&(o=new l),r<=0||r>=1)return o.x=s.x,o.y=s.y,o;var a=e(s)*r;return r>.5?(a-=s.width+s.height,a<=s.width?(o.x=s.right-a,o.y=s.bottom):(o.x=s.x,o.y=s.bottom-(a-s.width))):a<=s.width?(o.x=s.x+a,o.y=s.y):(o.x=s.right,o.y=s.y+(a-s.width)),o};h.exports=i},34819:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20812),l=t(13019),i=function(s,r,o,a){a===void 0&&(a=[]),!r&&o>0&&(r=l(s)/o);for(var u=0;u<r;u++){var f=u/r;a.push(e(s,f))}return a};h.exports=i},51313:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){return s===void 0&&(s=new e),s.x=i.width,s.y=i.height,s};h.exports=l},86091:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(67502),l=function(i,s,r){var o=i.centerX,a=i.centerY;return i.setSize(i.width+s*2,i.height+r*2),e(i,o,a)};h.exports=l},53951:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=t(59996),i=function(s,r,o){return o===void 0&&(o=new e),l(s,r)?(o.x=Math.max(s.x,r.x),o.y=Math.max(s.y,r.y),o.width=Math.min(s.right,r.right)-o.x,o.height=Math.min(s.bottom,r.bottom)-o.y):o.setEmpty(),o};h.exports=i},14649:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(13019),l=t(26099),i=function(s,r,o,a){if(a===void 0&&(a=[]),!r&&!o)return a;r?o=Math.round(e(s)/r):r=e(s)/o;for(var u=s.x,f=s.y,v=0,c=0;c<o;c++)switch(a.push(new l(u,f)),v){case 0:u+=r,u>=s.right&&(v=1,f+=u-s.right,u=s.right);break;case 1:f+=r,f>=s.bottom&&(v=2,u-=f-s.bottom,f=s.bottom);break;case 2:u-=r,u<=s.left&&(v=3,f-=s.left-u,u=s.left);break;case 3:f-=r,f<=s.top&&(v=0,f=s.top);break}return a};h.exports=i},33595:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){for(var l=t.x,i=t.right,s=t.y,r=t.bottom,o=0;o<e.length;o++)l=Math.min(l,e[o].x),i=Math.max(i,e[o].x),s=Math.min(s,e[o].y),r=Math.max(r,e[o].y);return t.x=l,t.y=s,t.width=i-l,t.height=r-s,t};h.exports=d},20074:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=Math.min(t.x,e.x),i=Math.max(t.right,e.right);t.x=l,t.width=i-l;var s=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=s,t.height=r-s,t};h.exports=d},92171:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=Math.min(t.x,e),s=Math.max(t.right,e);t.x=i,t.width=s-i;var r=Math.min(t.y,l),o=Math.max(t.bottom,l);return t.y=r,t.height=o-r,t};h.exports=d},42981:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t.x+=e,t.y+=l,t};h.exports=d},46907:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x+=e.x,t.y+=e.y,t};h.exports=d},60170:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x<e.right&&t.right>e.x&&t.y<e.bottom&&t.bottom>e.y};h.exports=d},13019:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return 2*(t.width+t.height)};h.exports=d},85133:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=t(39506),i=function(s,r,o){o===void 0&&(o=new e),r=l(r);var a=Math.sin(r),u=Math.cos(r),f=u>0?s.width/2:s.width/-2,v=a>0?s.height/2:s.height/-2;return Math.abs(f*a)<Math.abs(v*u)?v=f*a/u:f=v*u/a,o.x=f+s.centerX,o.y=v+s.centerY,o};h.exports=i},26597:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){return s===void 0&&(s=new e),s.x=i.x+Math.random()*i.width,s.y=i.y+Math.random()*i.height,s};h.exports=l},86470:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(30976),l=t(70273),i=t(26099),s=function(r,o,a){if(a===void 0&&(a=new i),l(r,o))switch(e(0,3)){case 0:a.x=r.x+Math.random()*(o.right-r.x),a.y=r.y+Math.random()*(o.top-r.y);break;case 1:a.x=o.x+Math.random()*(r.right-o.x),a.y=o.bottom+Math.random()*(r.bottom-o.bottom);break;case 2:a.x=r.x+Math.random()*(o.x-r.x),a.y=o.y+Math.random()*(r.bottom-o.y);break;case 3:a.x=o.right+Math.random()*(r.right-o.right),a.y=r.y+Math.random()*(o.bottom-r.y);break}return a};h.exports=s},87841:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(37303),i=t(20812),s=t(34819),r=t(23777),o=t(23031),a=t(26597),u=new e({initialize:function(v,c,g,p){v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=0),p===void 0&&(p=0),this.type=r.RECTANGLE,this.x=v,this.y=c,this.width=g,this.height=p},contains:function(f,v){return l(this,f,v)},getPoint:function(f,v){return i(this,f,v)},getPoints:function(f,v,c){return s(this,f,v,c)},getRandomPoint:function(f){return a(this,f)},setTo:function(f,v,c,g){return this.x=f,this.y=v,this.width=c,this.height=g,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(f,v){return v===void 0&&(v=f),this.x=f,this.y=v,this},setSize:function(f,v){return v===void 0&&(v=f),this.width=f,this.height=v,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(f){return f===void 0&&(f=new o),f.setTo(this.x,this.y,this.right,this.y),f},getLineB:function(f){return f===void 0&&(f=new o),f.setTo(this.right,this.y,this.right,this.bottom),f},getLineC:function(f){return f===void 0&&(f=new o),f.setTo(this.right,this.bottom,this.x,this.bottom),f},getLineD:function(f){return f===void 0&&(f=new o),f.setTo(this.x,this.bottom,this.x,this.y),f},left:{get:function(){return this.x},set:function(f){f>=this.right?this.width=0:this.width=this.right-f,this.x=f}},right:{get:function(){return this.x+this.width},set:function(f){f<=this.x?this.width=0:this.width=f-this.x}},top:{get:function(){return this.y},set:function(f){f>=this.bottom?this.height=0:this.height=this.bottom-f,this.y=f}},bottom:{get:function(){return this.y+this.height},set:function(f){f<=this.y?this.height=0:this.height=f-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(f){this.x=f-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(f){this.y=f-this.height/2}}});h.exports=u},94845:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.width===e.width&&t.height===e.height};h.exports=d},31730:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return l===void 0&&(l=e),t.width*=e,t.height*=l,t};h.exports=d},36899:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=function(i,s,r){r===void 0&&(r=new e);var o=Math.min(i.x,s.x),a=Math.min(i.y,s.y),u=Math.max(i.right,s.right)-o,f=Math.max(i.bottom,s.bottom)-a;return r.setTo(o,a,u,f)};h.exports=l},93232:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841);e.Area=t(62224),e.Ceil=t(98615),e.CeilAll=t(31688),e.CenterOn=t(67502),e.Clone=t(65085),e.Contains=t(37303),e.ContainsPoint=t(96553),e.ContainsRect=t(70273),e.CopyFrom=t(43459),e.Decompose=t(77493),e.Equals=t(9219),e.FitInside=t(53751),e.FitOutside=t(16088),e.Floor=t(80774),e.FloorAll=t(83859),e.FromPoints=t(19217),e.FromXY=t(9477),e.GetAspectRatio=t(8249),e.GetCenter=t(27165),e.GetPoint=t(20812),e.GetPoints=t(34819),e.GetSize=t(51313),e.Inflate=t(86091),e.Intersection=t(53951),e.MarchingAnts=t(14649),e.MergePoints=t(33595),e.MergeRect=t(20074),e.MergeXY=t(92171),e.Offset=t(42981),e.OffsetPoint=t(46907),e.Overlaps=t(60170),e.Perimeter=t(13019),e.PerimeterPoint=t(85133),e.Random=t(26597),e.RandomOutside=t(86470),e.SameDimensions=t(94845),e.Scale=t(31730),e.Union=t(36899),h.exports=e},41658:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=t.x1,l=t.y1,i=t.x2,s=t.y2,r=t.x3,o=t.y3;return Math.abs(((r-e)*(s-l)-(i-e)*(o-l))/2)};h.exports=d},39208:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(16483),l=function(i,s,r){var o=r*(Math.sqrt(3)/2),a=i,u=s,f=i+r/2,v=s+o,c=i-r/2,g=s+o;return new e(a,u,f,v,c,g)};h.exports=l},39545:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(94811),l=t(16483),i=function(s,r,o,a,u){r===void 0&&(r=null),o===void 0&&(o=1),a===void 0&&(a=1),u===void 0&&(u=[]);for(var f=e(s,r),v,c,g,p,T,C,M,A,R,P=0;P<f.length;P+=3)v=f[P],c=f[P+1],g=f[P+2],p=s[v*2]*o,T=s[v*2+1]*a,C=s[c*2]*o,M=s[c*2+1]*a,A=s[g*2]*o,R=s[g*2+1]*a,u.push(new l(p,T,C,M,A,R));return u};h.exports=i},90301:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(16483),l=function(i,s,r,o){o===void 0&&(o=r);var a=i,u=s,f=i,v=s-o,c=i+r,g=s;return new e(a,u,f,v,c,g)};h.exports=l},23707:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(97523),l=t(13584),i=function(s,r,o,a){a===void 0&&(a=e);var u=a(s),f=r-u.x,v=o-u.y;return l(s,f,v)};h.exports=i},97523:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){return s===void 0&&(s=new e),s.x=(i.x1+i.x2+i.x3)/3,s.y=(i.y1+i.y2+i.y3)/3,s};h.exports=l},24951:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099);function l(s,r,o,a){return s*a-r*o}var i=function(s,r){r===void 0&&(r=new e);var o=s.x3,a=s.y3,u=s.x1-o,f=s.y1-a,v=s.x2-o,c=s.y2-a,g=2*l(u,f,v,c),p=l(f,u*u+f*f,c,v*v+c*c),T=l(u,u*u+f*f,v,v*v+c*c);return r.x=o-p/g,r.y=a+T/g,r};h.exports=i},85614:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(96503),l=function(i,s){s===void 0&&(s=new e);var r=i.x1,o=i.y1,a=i.x2,u=i.y2,f=i.x3,v=i.y3,c=a-r,g=u-o,p=f-r,T=v-o,C=c*(r+a)+g*(o+u),M=p*(r+f)+T*(o+v),A=2*(c*(v-u)-g*(f-a)),R,P;if(Math.abs(A)<1e-6){var L=Math.min(r,a,f),F=Math.min(o,u,v);R=(Math.max(r,a,f)-L)*.5,P=(Math.max(o,u,v)-F)*.5,s.x=L+R,s.y=F+P,s.radius=Math.sqrt(R*R+P*P)}else s.x=(T*C-g*M)/A,s.y=(c*M-p*C)/A,R=s.x-r,P=s.y-o,s.radius=Math.sqrt(R*R+P*P);return s};h.exports=l},74422:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(16483),l=function(i){return new e(i.x1,i.y1,i.x2,i.y2,i.x3,i.y3)};h.exports=l},10690:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,u=l-t.y1,f=i*i+s*s,v=i*r+s*o,c=i*a+s*u,g=r*r+o*o,p=r*a+o*u,T=f*g-v*v,C=T===0?0:1/T,M=(g*c-v*p)*C,A=(f*p-v*c)*C;return M>=0&&A>=0&&M+A<1};h.exports=d},48653:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l===void 0&&(l=!1),i===void 0&&(i=[]);for(var s=t.x3-t.x1,r=t.y3-t.y1,o=t.x2-t.x1,a=t.y2-t.y1,u=s*s+r*r,f=s*o+r*a,v=o*o+a*a,c=u*v-f*f,g=c===0?0:1/c,p,T,C,M,A,R,P=t.x1,L=t.y1,F=0;F<e.length&&(C=e[F].x-P,M=e[F].y-L,A=s*C+r*M,R=o*C+a*M,p=(v*A-f*R)*g,T=(u*R-f*A)*g,!(p>=0&&T>=0&&p+T<1&&(i.push({x:e[F].x,y:e[F].y}),l)));F++);return i};h.exports=d},96006:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10690),l=function(i,s){return e(i,s.x,s.y)};h.exports=l},71326:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};h.exports=d},71694:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e};h.exports=d},33522:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3};h.exports=d},20437:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=t(35001),i=function(s,r,o){o===void 0&&(o=new e);var a=s.getLineA(),u=s.getLineB(),f=s.getLineC();if(r<=0||r>=1)return o.x=a.x1,o.y=a.y1,o;var v=l(a),c=l(u),g=l(f),p=v+c+g,T=p*r,C=0;return T<v?(C=T/v,o.x=a.x1+(a.x2-a.x1)*C,o.y=a.y1+(a.y2-a.y1)*C):T>v+c?(T-=v+c,C=T/g,o.x=f.x1+(f.x2-f.x1)*C,o.y=f.y1+(f.y2-f.y1)*C):(T-=v,C=T/c,o.x=u.x1+(u.x2-u.x1)*C,o.y=u.y1+(u.y2-u.y1)*C),o};h.exports=i},80672:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35001),l=t(26099),i=function(s,r,o,a){a===void 0&&(a=[]);var u=s.getLineA(),f=s.getLineB(),v=s.getLineC(),c=e(u),g=e(f),p=e(v),T=c+g+p;!r&&o>0&&(r=T/o);for(var C=0;C<r;C++){var M=T*(C/r),A=0,R=new l;M<c?(A=M/c,R.x=u.x1+(u.x2-u.x1)*A,R.y=u.y1+(u.y2-u.y1)*A):M>c+g?(M-=c+g,A=M/p,R.x=v.x1+(v.x2-v.x1)*A,R.y=v.y1+(v.y2-v.y1)*A):(M-=c,A=M/g,R.x=f.x1+(f.x2-f.x1)*A,R.y=f.y1+(f.y2-f.y1)*A),a.push(R)}return a};h.exports=i},39757:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099);function l(s,r,o,a){var u=s-o,f=r-a,v=u*u+f*f;return Math.sqrt(v)}var i=function(s,r){r===void 0&&(r=new e);var o=s.x1,a=s.y1,u=s.x2,f=s.y2,v=s.x3,c=s.y3,g=l(v,c,u,f),p=l(o,a,v,c),T=l(u,f,o,a),C=g+p+T;return r.x=(o*g+u*p+v*T)/C,r.y=(a*g+f*p+c*T)/C,r};h.exports=i},13584:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t.x1+=e,t.y1+=l,t.x2+=e,t.y2+=l,t.x3+=e,t.y3+=l,t};h.exports=d},1376:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35001),l=function(i){var s=i.getLineA(),r=i.getLineB(),o=i.getLineC();return e(s)+e(r)+e(o)};h.exports=l},90260:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){s===void 0&&(s=new e);var r=i.x2-i.x1,o=i.y2-i.y1,a=i.x3-i.x1,u=i.y3-i.y1,f=Math.random(),v=Math.random();return f+v>=1&&(f=1-f,v=1-v),s.x=i.x1+(r*f+a*v),s.y=i.y1+(o*f+u*v),s};h.exports=l},52172:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(99614),l=t(39757),i=function(s,r){var o=l(s);return e(s,o.x,o.y,r)};h.exports=i},49907:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(99614),l=function(i,s,r){return e(i,s.x,s.y,r)};h.exports=l},99614:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=Math.cos(i),r=Math.sin(i),o=t.x1-e,a=t.y1-l;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+l,o=t.x2-e,a=t.y2-l,t.x2=o*s-a*r+e,t.y2=o*r+a*s+l,o=t.x3-e,a=t.y3-l,t.x3=o*s-a*r+e,t.y3=o*r+a*s+l,t};h.exports=d},16483:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(10690),i=t(20437),s=t(80672),r=t(23777),o=t(23031),a=t(90260),u=new e({initialize:function(v,c,g,p,T,C){v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=0),p===void 0&&(p=0),T===void 0&&(T=0),C===void 0&&(C=0),this.type=r.TRIANGLE,this.x1=v,this.y1=c,this.x2=g,this.y2=p,this.x3=T,this.y3=C},contains:function(f,v){return l(this,f,v)},getPoint:function(f,v){return i(this,f,v)},getPoints:function(f,v,c){return s(this,f,v,c)},getRandomPoint:function(f){return a(this,f)},setTo:function(f,v,c,g,p,T){return f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=0),p===void 0&&(p=0),T===void 0&&(T=0),this.x1=f,this.y1=v,this.x2=c,this.y2=g,this.x3=p,this.y3=T,this},getLineA:function(f){return f===void 0&&(f=new o),f.setTo(this.x1,this.y1,this.x2,this.y2),f},getLineB:function(f){return f===void 0&&(f=new o),f.setTo(this.x2,this.y2,this.x3,this.y3),f},getLineC:function(f){return f===void 0&&(f=new o),f.setTo(this.x3,this.y3,this.x1,this.y1),f},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(f){var v=0;this.x1<=this.x2&&this.x1<=this.x3?v=this.x1-f:this.x2<=this.x1&&this.x2<=this.x3?v=this.x2-f:v=this.x3-f,this.x1-=v,this.x2-=v,this.x3-=v}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(f){var v=0;this.x1>=this.x2&&this.x1>=this.x3?v=this.x1-f:this.x2>=this.x1&&this.x2>=this.x3?v=this.x2-f:v=this.x3-f,this.x1-=v,this.x2-=v,this.x3-=v}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(f){var v=0;this.y1<=this.y2&&this.y1<=this.y3?v=this.y1-f:this.y2<=this.y1&&this.y2<=this.y3?v=this.y2-f:v=this.y3-f,this.y1-=v,this.y2-=v,this.y3-=v}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(f){var v=0;this.y1>=this.y2&&this.y1>=this.y3?v=this.y1-f:this.y2>=this.y1&&this.y2>=this.y3?v=this.y2-f:v=this.y3-f,this.y1-=v,this.y2-=v,this.y3-=v}}});h.exports=u},84435:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(16483);e.Area=t(41658),e.BuildEquilateral=t(39208),e.BuildFromPolygon=t(39545),e.BuildRight=t(90301),e.CenterOn=t(23707),e.Centroid=t(97523),e.CircumCenter=t(24951),e.CircumCircle=t(85614),e.Clone=t(74422),e.Contains=t(10690),e.ContainsArray=t(48653),e.ContainsPoint=t(96006),e.CopyFrom=t(71326),e.Decompose=t(71694),e.Equals=t(33522),e.GetPoint=t(20437),e.GetPoints=t(80672),e.InCenter=t(39757),e.Perimeter=t(1376),e.Offset=t(13584),e.Random=t(90260),e.Rotate=t(52172),e.RotateAroundPoint=t(49907),e.RotateAroundXY=t(99614),h.exports=e},74457:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:l,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}};h.exports=d},84409:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return function(l,i,s,r){var o=t.getPixelAlpha(i,s,r.texture.key,r.frame.name);return o&&o>=e}};h.exports=d},7003:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(93301),i=t(50792),s=t(8214),r=t(8443),o=t(78970),a=t(85098),u=t(42515),f=t(36210),v=t(61340),c=t(85955),g=new e({initialize:function(T,C){this.game=T,this.scaleManager,this.canvas,this.config=C,this.enabled=!0,this.events=new i,this.isOver=!0,this.defaultCursor="",this.keyboard=C.inputKeyboard?new o(this):null,this.mouse=C.inputMouse?new a(this):null,this.touch=C.inputTouch?new f(this):null,this.pointers=[],this.pointersTotal=C.inputActivePointers;for(var M=0;M<=this.pointersTotal;M++){var A=new u(this,M);A.smoothFactor=C.inputSmoothFactor,this.pointers.push(A)}this.mousePointer=C.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 v,this._tempMatrix2=new v,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],T.events.once(r.BOOT,this.boot,this)},boot:function(){var p=this.game,T=p.events;this.canvas=p.canvas,this.scaleManager=p.scale,this.events.emit(s.MANAGER_BOOT),T.on(r.PRE_RENDER,this.preRender,this),T.once(r.DESTROY,this.destroy,this)},setCanvasOver:function(p){this.isOver=!0,this.events.emit(s.GAME_OVER,p)},setCanvasOut:function(p){this.isOver=!1,this.events.emit(s.GAME_OUT,p)},preRender:function(){var p=this.game.loop.now,T=this.game.loop.delta,C=this.game.scene.getScenes(!0,!0);this.time=p,this.events.emit(s.MANAGER_UPDATE);for(var M=0;M<C.length;M++){var A=C[M];if(A.sys.input&&A.sys.input.updatePoll(p,T)&&this.globalTopOnly)return}},setDefaultCursor:function(p){this.defaultCursor=p,this.canvas.style.cursor!==p&&(this.canvas.style.cursor=p)},setCursor:function(p){p.cursor&&(this.canvas.style.cursor=p.cursor)},resetCursor:function(p,T){(T||p&&p.cursor)&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(p){p===void 0&&(p=1);var T=[];this.pointersTotal+p>10&&(p=10-this.pointersTotal);for(var C=0;C<p;C++){var M=this.pointers.length,A=new u(this,M);A.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(A),this.pointersTotal++,T.push(A)}return T},updateInputPlugins:function(p,T){var C=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var M=0;M<C.length;M++){var A=C[M];if(A.sys.input){var R=A.sys.input.update(p,T);if(R&&this.globalTopOnly||this._tempSkip)return}}},onTouchStart:function(p){for(var T=this.pointers,C=[],M=0;M<p.changedTouches.length;M++)for(var A=p.changedTouches[M],R=1;R<T.length;R++){var P=T[R];if(!P.active){P.touchstart(A,p),this.activePointer=P,C.push(P);break}}this.updateInputPlugins(l.TOUCH_START,C)},onTouchMove:function(p){for(var T=this.pointers,C=[],M=0;M<p.changedTouches.length;M++)for(var A=p.changedTouches[M],R=1;R<T.length;R++){var P=T[R];if(P.active&&P.identifier===A.identifier){var L=document.elementFromPoint(A.clientX,A.clientY),F=L===this.canvas;!this.isOver&&F?this.setCanvasOver(p):this.isOver&&!F&&this.setCanvasOut(p),this.isOver&&(P.touchmove(A,p),this.activePointer=P,C.push(P));break}}this.updateInputPlugins(l.TOUCH_MOVE,C)},onTouchEnd:function(p){for(var T=this.pointers,C=[],M=0;M<p.changedTouches.length;M++)for(var A=p.changedTouches[M],R=1;R<T.length;R++){var P=T[R];if(P.active&&P.identifier===A.identifier){P.touchend(A,p),C.push(P);break}}this.updateInputPlugins(l.TOUCH_END,C)},onTouchCancel:function(p){for(var T=this.pointers,C=[],M=0;M<p.changedTouches.length;M++)for(var A=p.changedTouches[M],R=1;R<T.length;R++){var P=T[R];if(P.active&&P.identifier===A.identifier){P.touchcancel(A,p),C.push(P);break}}this.updateInputPlugins(l.TOUCH_CANCEL,C)},onMouseDown:function(p){var T=this.mousePointer;T.down(p),T.updateMotion(),this.activePointer=T,this.updateInputPlugins(l.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(p){var T=this.mousePointer;T.move(p),T.updateMotion(),this.activePointer=T,this.updateInputPlugins(l.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(p){var T=this.mousePointer;T.up(p),T.updateMotion(),this.activePointer=T,this.updateInputPlugins(l.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(p){var T=this.mousePointer;T.wheel(p),this.activePointer=T,this.updateInputPlugins(l.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(p){var T=this.mouse.locked;this.mousePointer.locked=T,this.events.emit(s.POINTERLOCK_CHANGE,p,T)},inputCandidate:function(p,T){var C=p.input;if(!C||!C.enabled||!p.willRender(T))return!1;var M=!0,A=p.parentContainer;if(A)do{if(!A.willRender(T)){M=!1;break}A=A.parentContainer}while(A);return M},hitTest:function(p,T,C,M){M===void 0&&(M=this._tempHitTest);var A=this._tempPoint,R=C.scrollX,P=C.scrollY;M.length=0;var L=p.x,F=p.y;C.getWorldPoint(L,F,A),p.worldX=A.x,p.worldY=A.y;for(var w={x:0,y:0},O=this._tempMatrix,B=this._tempMatrix2,I=0;I<T.length;I++){var D=T[I];if(this.inputCandidate(D,C)){var N=A.x+R*D.scrollFactorX-R,z=A.y+P*D.scrollFactorY-P;D.parentContainer?(D.getWorldTransformMatrix(O,B),O.applyInverse(N,z,w)):c(N,z,D.x,D.y,D.rotation,D.scaleX,D.scaleY,w),this.pointWithinHitArea(D,w.x,w.y)&&M.push(D)}}return M},pointWithinHitArea:function(p,T,C){T+=p.displayOriginX,C+=p.displayOriginY;var M=p.input;return M&&M.hitAreaCallback(M.hitArea,T,C,p)?(M.localX=T,M.localY=C,!0):!1},pointWithinInteractiveObject:function(p,T,C){return p.hitArea?(T+=p.gameObject.displayOriginX,C+=p.gameObject.displayOriginY,p.localX=T,p.localY=C,p.hitAreaCallback(p.hitArea,T,C,p)):!1},transformPointer:function(p,T,C,M){var A=p.position,R=p.prevPosition;R.x=A.x,R.y=A.y;var P=this.scaleManager.transformX(T),L=this.scaleManager.transformY(C),F=p.smoothFactor;!M||F===0?(A.x=P,A.y=L):(A.x=P*F+R.x*(1-F),A.y=L*F+R.y*(1-F))},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 p=0;p<this.pointers.length;p++)this.pointers[p].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});h.exports=g},48205:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(96503),l=t(87902),i=t(83419),s=t(93301),r=t(74457),o=t(84409),a=t(20339),u=t(8497),f=t(81154),v=t(8214),c=t(50792),g=t(95540),p=t(23777),T=t(89639),C=t(41212),M=t(37277),A=t(87841),R=t(37303),P=t(44594),L=t(16483),F=t(10690),w=new i({Extends:c,initialize:function(B){c.call(this),this.scene=B,this.systems=B.sys,this.settings=B.sys.settings,this.manager=B.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,T.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var I={cancelled:!1};this._eventContainer={stopPropagation:function(){I.cancelled=!0}},this._eventData=I,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,B.sys.events.once(P.BOOT,this.boot,this),B.sys.events.on(P.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(P.DESTROY,this.destroy,this),this.pluginEvents.emit(v.BOOT)},start:function(){var O=this.systems.events;O.on(P.TRANSITION_START,this.transitionIn,this),O.on(P.TRANSITION_OUT,this.transitionOut,this),O.on(P.TRANSITION_COMPLETE,this.transitionComplete,this),O.on(P.PRE_UPDATE,this.preUpdate,this),O.once(P.SHUTDOWN,this.shutdown,this),this.manager.events.on(v.GAME_OUT,this.onGameOut,this),this.manager.events.on(v.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(v.START)},onGameOver:function(O){this.isActive()&&this.emit(v.GAME_OVER,O.timeStamp,O)},onGameOut:function(O){this.isActive()&&this.emit(v.GAME_OUT,O.timeStamp,O)},preUpdate:function(){this.pluginEvents.emit(v.PRE_UPDATE);var O=this._pendingRemoval,B=this._pendingInsertion,I=O.length,D=B.length;if(!(I===0&&D===0)){for(var N=this._list,z=0;z<I;z++){var V=O[z],U=N.indexOf(V);U>-1&&(N.splice(U,1),this.clear(V,!0))}this._pendingRemoval.length=0,this._list=N.concat(B.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(O){this.manager&&this.manager.setCursor(O)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(O,B){if(!this.isActive())return!1;if(this.pluginEvents.emit(v.UPDATE,O,B),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var I,D=this.manager,N=D.pointers;for(I=0;I<N.length;I++)N[I].updateMotion();if(this._list.length===0)return!1;var z=this.pollRate;if(z===-1)return!1;if(z>0)if(this._pollTimer-=B,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var V=!1;for(I=0;I<N.length;I++){var U=0,G=N[I];this._tempZones=[],this._temp=this.hitTestPointer(G),this.sortGameObjects(this._temp,G),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),U+=this.processOverOutEvents(G),this.getDragState(G)===2&&this.processDragThresholdEvent(G,O),U>0&&(V=!0)}return V},update:function(O,B){if(!this.isActive())return!1;for(var I=!1,D=0;D<B.length;D++){var N=0,z=B[D];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)),O){case s.MOUSE_DOWN:N+=this.processDragDownEvent(z),N+=this.processDownEvents(z),N+=this.processOverOutEvents(z);break;case s.MOUSE_UP:N+=this.processDragUpEvent(z),N+=this.processUpEvents(z),N+=this.processOverOutEvents(z);break;case s.TOUCH_START:N+=this.processDragDownEvent(z),N+=this.processDownEvents(z),N+=this.processOverEvents(z);break;case s.TOUCH_END:case s.TOUCH_CANCEL:N+=this.processDragUpEvent(z),N+=this.processUpEvents(z),N+=this.processOutEvents(z);break;case s.MOUSE_MOVE:case s.TOUCH_MOVE:N+=this.processDragMoveEvent(z),N+=this.processMoveEvents(z),N+=this.processOverOutEvents(z);break;case s.MOUSE_WHEEL:N+=this.processWheelEvent(z);break}N>0&&(I=!0)}return this._updatedThisFrame=!0,I},clear:function(O,B){B===void 0&&(B=!1),this.disable(O);var I=O.input;I&&(this.removeDebug(O),this.manager.resetCursor(I),I.gameObject=void 0,I.target=void 0,I.hitArea=void 0,I.hitAreaCallback=void 0,I.callbackContext=void 0,O.input=null),B||this.queueForRemoval(O);var D=this._draggable.indexOf(O);return D>-1&&this._draggable.splice(D,1),O},disable:function(O,B){B===void 0&&(B=!1);var I=O.input;I&&(I.enabled=!1,I.dragState=0);for(var D=this._drag,N=this._over,z=this.manager,V=0,U;V<z.pointers.length;V++)U=D[V].indexOf(O),U>-1&&D[V].splice(U,1),U=N[V].indexOf(O),U>-1&&N[V].splice(U,1);return B&&this.resetCursor(),this},enable:function(O,B,I,D){return D===void 0&&(D=!1),O.input?O.input.enabled=!0:this.setHitArea(O,B,I),O.input&&D&&!O.input.dropZone&&(O.input.dropZone=D),this},hitTestPointer:function(O){for(var B=this.cameras.getCamerasBelowPointer(O),I=0;I<B.length;I++){for(var D=B[I],N=this.manager.hitTest(O,this._list,D),z=0;z<N.length;z++){var V=N[z];V.input.dropZone&&this._tempZones.push(V)}if(N.length>0)return O.camera=D,N}return O.camera=B[0],[]},processDownEvents:function(O){var B=0,I=this._temp,D=this._eventData,N=this._eventContainer;D.cancelled=!1;for(var z=0;z<I.length;z++){var V=I[z];if(!(!V.input||!V.input.enabled)&&(B++,V.emit(v.GAMEOBJECT_POINTER_DOWN,O,V.input.localX,V.input.localY,N),D.cancelled||!this.isActive()||V.input&&V.input.enabled&&(this.emit(v.GAMEOBJECT_DOWN,O,V,N),D.cancelled||!this.isActive())))break}return!D.cancelled&&this.isActive()&&(O.downElement===this.manager.game.canvas?this.emit(v.POINTER_DOWN,O,I):this.emit(v.POINTER_DOWN_OUTSIDE,O)),B},getDragState:function(O){return this._dragState[O.id]},setDragState:function(O,B){this._dragState[O.id]=B},processDragThresholdEvent:function(O,B){var I=!1,D=this.dragTimeThreshold,N=this.dragDistanceThreshold;if((N>0&&a(O.x,O.y,O.downX,O.downY)>=N||D>0&&B>=O.downTime+D)&&(I=!0),I)return this.setDragState(O,3),this.processDragStartList(O)},processDragStartList:function(O){if(this.getDragState(O)!==3)return 0;var B=this._drag[O.id];B.length>1&&(B=B.slice(0));for(var I=0;I<B.length;I++){var D=B[I],N=D.input;N.dragState=2,N.dragStartX=D.x,N.dragStartY=D.y,N.dragStartXGlobal=O.worldX,N.dragStartYGlobal=O.worldY,N.dragStartCamera=O.camera,N.dragX=N.dragStartXGlobal-N.dragStartX,N.dragY=N.dragStartYGlobal-N.dragStartY,D.emit(v.GAMEOBJECT_DRAG_START,O,N.dragX,N.dragY),this.emit(v.DRAG_START,O,D)}return this.setDragState(O,4),B.length},processDragDownEvent:function(O){var B=this._temp;if(this._draggable.length===0||B.length===0||!O.primaryDown||this.getDragState(O)!==0)return 0;this.setDragState(O,1);for(var I=[],D=0;D<B.length;D++){var N=B[D];N.input.draggable&&N.input.dragState===0&&I.push(N)}return I.length===0?(this.setDragState(O,0),0):(I.length>1&&(this.sortGameObjects(I,O),this.topOnly&&I.splice(1)),this._drag[O.id]=I,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(O,3),this.processDragStartList(O)):(this.setDragState(O,2),0))},processDragMoveEvent:function(O){if(this.getDragState(O)===2&&this.processDragThresholdEvent(O,this.manager.game.loop.now),this.getDragState(O)!==4)return 0;var B=this._tempZones,I=this._drag[O.id];I.length>1&&(I=I.slice(0));for(var D=0;D<I.length;D++){var N=I[D],z=N.input,V=z.target;if(V){var U=B.indexOf(V);U===0?(N.emit(v.GAMEOBJECT_DRAG_OVER,O,V),this.emit(v.DRAG_OVER,O,N,V)):U>0?(N.emit(v.GAMEOBJECT_DRAG_LEAVE,O,V),this.emit(v.DRAG_LEAVE,O,N,V),z.target=B[0],V=z.target,N.emit(v.GAMEOBJECT_DRAG_ENTER,O,V),this.emit(v.DRAG_ENTER,O,N,V)):(N.emit(v.GAMEOBJECT_DRAG_LEAVE,O,V),this.emit(v.DRAG_LEAVE,O,N,V),B[0]?(z.target=B[0],V=z.target,N.emit(v.GAMEOBJECT_DRAG_ENTER,O,V),this.emit(v.DRAG_ENTER,O,N,V)):z.target=null)}else!V&&B[0]&&(z.target=B[0],V=z.target,N.emit(v.GAMEOBJECT_DRAG_ENTER,O,V),this.emit(v.DRAG_ENTER,O,N,V));var G,b,Y=O.positionToCamera(z.dragStartCamera);if(!N.parentContainer)G=Y.x-z.dragX,b=Y.y-z.dragY;else{var W=Y.x-z.dragStartXGlobal,H=Y.y-z.dragStartYGlobal,X=N.getParentRotation(),K=W*Math.cos(X)+H*Math.sin(X),Z=H*Math.cos(X)-W*Math.sin(X);K*=1/N.parentContainer.scaleX,Z*=1/N.parentContainer.scaleY,G=K+z.dragStartX,b=Z+z.dragStartY}N.emit(v.GAMEOBJECT_DRAG,O,G,b),this.emit(v.DRAG,O,N,G,b)}return I.length},processDragUpEvent:function(O){var B=this._drag[O.id];B.length>1&&(B=B.slice(0));for(var I=0;I<B.length;I++){var D=B[I],N=D.input;if(N&&N.dragState===2){N.dragState=0,N.dragX=N.localX-D.displayOriginX,N.dragY=N.localY-D.displayOriginY,N.dragStartCamera=null;var z=!1,V=N.target;V&&(D.emit(v.GAMEOBJECT_DROP,O,V),this.emit(v.DROP,O,D,V),N.target=null,z=!0),D.input&&D.input.enabled&&(D.emit(v.GAMEOBJECT_DRAG_END,O,N.dragX,N.dragY,z),this.emit(v.DRAG_END,O,D,z))}}return this.setDragState(O,0),B.splice(0),0},processMoveEvents:function(O){var B=0,I=this._temp,D=this._eventData,N=this._eventContainer;D.cancelled=!1;for(var z=0;z<I.length;z++){var V=I[z];if(!(!V.input||!V.input.enabled)&&(B++,V.emit(v.GAMEOBJECT_POINTER_MOVE,O,V.input.localX,V.input.localY,N),D.cancelled||!this.isActive()||V.input&&V.input.enabled&&(this.emit(v.GAMEOBJECT_MOVE,O,V,N),D.cancelled||!this.isActive()||this.topOnly)))break}return!D.cancelled&&this.isActive()&&this.emit(v.POINTER_MOVE,O,I),B},processWheelEvent:function(O){var B=0,I=this._temp,D=this._eventData,N=this._eventContainer;D.cancelled=!1;for(var z=O.deltaX,V=O.deltaY,U=O.deltaZ,G=0;G<I.length;G++){var b=I[G];if(!(!b.input||!b.input.enabled)&&(B++,b.emit(v.GAMEOBJECT_POINTER_WHEEL,O,z,V,U,N),D.cancelled||!this.isActive()||b.input&&b.input.enabled&&(this.emit(v.GAMEOBJECT_WHEEL,O,b,z,V,U,N),D.cancelled||!this.isActive())))break}return!D.cancelled&&this.isActive()&&this.emit(v.POINTER_WHEEL,O,I,z,V,U),B},processOverEvents:function(O){var B=this._temp,I=0,D=B.length,N=[];if(D>0){var z=this.manager,V=this._eventData,U=this._eventContainer;V.cancelled=!1;for(var G=0;G<D;G++){var b=B[G];if(!(!b.input||!b.input.enabled)&&(N.push(b),z.setCursor(b.input),b.emit(v.GAMEOBJECT_POINTER_OVER,O,b.input.localX,b.input.localY,U),I++,V.cancelled||!this.isActive()||b.input&&b.input.enabled&&(this.emit(v.GAMEOBJECT_OVER,O,b,U),V.cancelled||!this.isActive())))break}!V.cancelled&&this.isActive()&&this.emit(v.POINTER_OVER,O,N)}return this._over[O.id]=N,I},processOutEvents:function(O){var B=this._over[O.id],I=0,D=B.length;if(D>0){var N=this.manager,z=this._eventData,V=this._eventContainer;z.cancelled=!1,this.sortGameObjects(B,O);for(var U=0;U<D;U++){var G=B[U];if(G=B[U],!(!G.input||!G.input.enabled)&&(N.resetCursor(G.input),G.emit(v.GAMEOBJECT_POINTER_OUT,O,V),I++,z.cancelled||!this.isActive()||G.input&&G.input.enabled&&(this.emit(v.GAMEOBJECT_OUT,O,G,V),z.cancelled||!this.isActive())))break}!z.cancelled&&this.isActive()&&this.emit(v.POINTER_OUT,O,B),this._over[O.id]=[]}return I},processOverOutEvents:function(O){var B=this._temp,I,D,N=[],z=[],V=[],U=this._over[O.id],G=this._drag[O.id],b=this.manager;for(I=0;I<U.length;I++)D=U[I],B.indexOf(D)===-1&&G.indexOf(D)===-1?N.push(D):V.push(D);for(I=0;I<B.length;I++)D=B[I],U.indexOf(D)===-1&&z.push(D);var Y=N.length,W=0,H=this._eventData,X=this._eventContainer;if(H.cancelled=!1,Y>0){for(this.sortGameObjects(N,O),I=0;I<Y&&(D=N[I],!(!(!D.input||!D.input.enabled)&&(b.resetCursor(D.input),D.emit(v.GAMEOBJECT_POINTER_OUT,O,X),W++,H.cancelled||!this.isActive()||D.input&&D.input.enabled&&(this.emit(v.GAMEOBJECT_OUT,O,D,X),H.cancelled||!this.isActive()))));I++);(!H.cancelled||this.isActive())&&this.emit(v.POINTER_OUT,O,N)}if(Y=z.length,H.cancelled=!1,Y>0){for(this.sortGameObjects(z,O),I=0;I<Y&&(D=z[I],!(!(!D.input||!D.input.enabled)&&(b.setCursor(D.input),D.emit(v.GAMEOBJECT_POINTER_OVER,O,D.input.localX,D.input.localY,X),W++,H.cancelled||!this.isActive()||D.input&&D.input.enabled&&(this.emit(v.GAMEOBJECT_OVER,O,D,X),H.cancelled||!this.isActive()))));I++);!H.cancelled&&this.isActive()&&this.emit(v.POINTER_OVER,O,z)}return U=V.concat(z),this._over[O.id]=this.sortGameObjects(U,O),W},processUpEvents:function(O){var B=this._temp,I=this._eventData,D=this._eventContainer;I.cancelled=!1;for(var N=0;N<B.length;N++){var z=B[N];if(!(!z.input||!z.input.enabled)&&(z.emit(v.GAMEOBJECT_POINTER_UP,O,z.input.localX,z.input.localY,D),I.cancelled||!this.isActive()||z.input&&z.input.enabled&&(this.emit(v.GAMEOBJECT_UP,O,z,D),I.cancelled||!this.isActive())))break}return!I.cancelled&&this.isActive()&&(O.upElement===this.manager.game.canvas?this.emit(v.POINTER_UP,O,B):this.emit(v.POINTER_UP_OUTSIDE,O)),B.length},forceDownState:function(O,B){this.forceState(O,B,v.GAMEOBJECT_POINTER_DOWN,v.GAMEOBJECT_DOWN,!1)},forceUpState:function(O,B){this.forceState(O,B,v.GAMEOBJECT_POINTER_UP,v.GAMEOBJECT_UP,!1)},forceOverState:function(O,B){this.forceState(O,B,v.GAMEOBJECT_POINTER_OVER,v.GAMEOBJECT_OVER,!0)},forceOutState:function(O,B){this.forceState(O,B,v.GAMEOBJECT_POINTER_OUT,v.GAMEOBJECT_OUT,!1)},forceState:function(O,B,I,D,N){var z=this._eventData,V=this._eventContainer;z.cancelled=!1,B.input&&B.input.enabled&&(B.emit(I,O,B.input.localX,B.input.localY,V),N&&this.setCursor(B.input),!z.cancelled&&this.isActive()&&B.input&&B.input.enabled&&this.emit(D,O,B,V))},queueForInsertion:function(O){return this._pendingInsertion.indexOf(O)===-1&&this._list.indexOf(O)===-1&&this._pendingInsertion.push(O),this},queueForRemoval:function(O){return this._pendingRemoval.push(O),this},setDraggable:function(O,B){B===void 0&&(B=!0),Array.isArray(O)||(O=[O]);for(var I=0;I<O.length;I++){var D=O[I];D.input.draggable=B;var N=this._draggable.indexOf(D);B&&N===-1?this._draggable.push(D):!B&&N>-1&&this._draggable.splice(N,1)}return this},makePixelPerfect:function(O){O===void 0&&(O=1);var B=this.systems.textures;return o(B,O)},setHitArea:function(O,B,I){if(B===void 0)return this.setHitAreaFromTexture(O);Array.isArray(O)||(O=[O]);var D=!1,N=!1,z=!1,V=!1,U=!1,G=!0;if(C(B)&&Object.keys(B).length){var b=B;B=g(b,"hitArea",null),I=g(b,"hitAreaCallback",null),U=g(b,"pixelPerfect",!1);var Y=g(b,"alphaTolerance",1);U&&(B={},I=this.makePixelPerfect(Y)),D=g(b,"draggable",!1),N=g(b,"dropZone",!1),z=g(b,"cursor",!1),V=g(b,"useHandCursor",!1),(!B||!I)&&(this.setHitAreaFromTexture(O),G=!1)}else typeof B=="function"&&!I&&(I=B,B={});for(var W=0;W<O.length;W++){var H=O[W];if(U&&H.type==="Container"){console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");continue}var X=H.input?H.input:r(H,B,I);X.customHitArea=G,X.dropZone=N,X.cursor=V?"pointer":z,H.input=X,D&&this.setDraggable(H),this.queueForInsertion(H)}return this},setHitAreaCircle:function(O,B,I,D,N){N===void 0&&(N=l);var z=new e(B,I,D);return this.setHitArea(O,z,N)},setHitAreaEllipse:function(O,B,I,D,N,z){z===void 0&&(z=f);var V=new u(B,I,D,N);return this.setHitArea(O,V,z)},setHitAreaFromTexture:function(O,B){B===void 0&&(B=R),Array.isArray(O)||(O=[O]);for(var I=0;I<O.length;I++){var D=O[I],N=D.frame,z=0,V=0;if(D.width?(z=D.width,V=D.height):N&&(z=N.realWidth,V=N.realHeight),D.type==="Container"&&(z===0||V===0)){console.warn("Container.setInteractive must specify a Shape or call setSize() first");continue}z!==0&&V!==0&&(D.input=r(D,new A(0,0,z,V),B),this.queueForInsertion(D))}return this},setHitAreaRectangle:function(O,B,I,D,N,z){z===void 0&&(z=R);var V=new A(B,I,D,N);return this.setHitArea(O,V,z)},setHitAreaTriangle:function(O,B,I,D,N,z,V,U){U===void 0&&(U=F);var G=new L(B,I,D,N,z,V);return this.setHitArea(O,G,U)},enableDebug:function(O,B){B===void 0&&(B=65280);var I=O.input;if(!I||!I.hitArea)return this;var D=I.hitArea,N=D.type,z=I.hitAreaDebug,V=this.systems.add,U=this.systems.updateList;z&&(U.remove(z),z.destroy(),z=null);var G=0,b=0;switch(N){case p.CIRCLE:z=V.arc(0,0,D.radius),G=D.x-D.radius,b=D.y-D.radius;break;case p.ELLIPSE:z=V.ellipse(0,0,D.width,D.height),G=D.x-D.width/2,b=D.y-D.height/2;break;case p.LINE:z=V.line(0,0,D.x1,D.y1,D.x2,D.y2);break;case p.POLYGON:z=V.polygon(0,0,D.points);break;case p.RECTANGLE:z=V.rectangle(0,0,D.width,D.height),G=D.x,b=D.y;break;case p.TRIANGLE:z=V.triangle(0,0,D.x1,D.y1,D.x2,D.y2,D.x3,D.y3);break}return z&&(z.isFilled=!1,z.strokeColor=B,z.preUpdate=function(){z.setVisible(O.visible),z.setStrokeStyle(1/O.scale,z.strokeColor),z.setDisplayOrigin(O.displayOriginX,O.displayOriginY);var Y=O.x,W=O.y,H=O.rotation,X=O.scaleX,K=O.scaleY;if(O.parentContainer){var Z=O.getWorldTransformMatrix();Y=Z.tx,W=Z.ty,H=Z.rotation,X=Z.scaleX,K=Z.scaleY}z.setRotation(H),z.setScale(X,K),z.setPosition(Y+G*X,W+b*K),z.setScrollFactor(O.scrollFactorX,O.scrollFactorY),z.setDepth(O.depth)},U.add(z),I.hitAreaDebug=z),this},removeDebug:function(O){var B=O.input;if(B&&B.hitAreaDebug){var I=B.hitAreaDebug;I.destroy(),B.hitAreaDebug=null}return this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(O){return this.pollRate=O,this._pollTimer=0,this},setGlobalTopOnly:function(O){return this.manager.globalTopOnly=O,this},setTopOnly:function(O){return this.topOnly=O,this},sortGameObjects:function(O,B){if(O.length<2||!B.camera)return O;var I=B.camera.renderList;return O.sort(function(D,N){var z=Math.max(I.indexOf(D),0),V=Math.max(I.indexOf(N),0);return V-z})},sortDropZones:function(O){return O.length<2?O:(this.scene.sys.depthSort(),O.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(O,B){if(!O.parentContainer&&!B.parentContainer)return this.displayList.getIndex(B)-this.displayList.getIndex(O);if(O.parentContainer===B.parentContainer)return B.parentContainer.getIndex(B)-O.parentContainer.getIndex(O);if(O.parentContainer===B)return-1;if(B.parentContainer===O)return 1;for(var I=O.getIndexList(),D=B.getIndexList(),N=Math.min(I.length,D.length),z=0;z<N;z++){var V=I[z],U=D[z];if(V!==U)return U-V}return D.length-I.length},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(O){return this.manager.addPointer(O)},setDefaultCursor:function(O){return this.manager.setDefaultCursor(O),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(v.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 O=0;O<10;O++)this._drag[O]=[],this._over[O]=[];this.removeAllListeners();var B=this.manager;B.canvas.style.cursor=B.defaultCursor;var I=this.systems.events;I.off(P.TRANSITION_START,this.transitionIn,this),I.off(P.TRANSITION_OUT,this.transitionOut,this),I.off(P.TRANSITION_COMPLETE,this.transitionComplete,this),I.off(P.PRE_UPDATE,this.preUpdate,this),B.events.off(v.GAME_OUT,this.onGameOut,this),B.events.off(v.GAME_OVER,this.onGameOver,this),I.off(P.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var O=this.manager.pointers,B=0;B<O.length;B++)O[B].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(v.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(P.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]}}});M.register("InputPlugin",w,"input"),h.exports=w},89639:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35154),l={},i={};i.register=function(s,r,o,a,u){l[s]={plugin:r,mapping:o,settingsKey:a,configKey:u}},i.getPlugin=function(s){return l[s]},i.install=function(s){var r=s.scene.sys,o=r.settings.input,a=r.game.config;for(var u in l){var f=l[u].plugin,v=l[u].mapping,c=l[u].settingsKey,g=l[u].configKey;e(o,c,a[g])&&(s[v]=new f(s))}},i.remove=function(s){l.hasOwnProperty(s)&&delete l[s]},h.exports=i},42515:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(31040),l=t(83419),i=t(20339),s=t(43855),r=t(47235),o=t(26099),a=t(25892),u=new l({initialize:function(v,c){this.manager=v,this.id=c,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new o,this.prevPosition=new o,this.midPoint=new o(-1,-1),this.velocity=new o,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=c===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(f){var v=f.getWorldPoint(this.x,this.y);return this.worldX=v.x,this.worldY=v.y,this},positionToCamera:function(f,v){return f.getWorldPoint(this.x,this.y,v)},updateMotion:function(){var f=this.position.x,v=this.position.y,c=this.midPoint.x,g=this.midPoint.y;if(!(f===c&&v===g)){var p=r(this.motionFactor,c,f),T=r(this.motionFactor,g,v);s(p,f,.1)&&(p=f),s(T,v,.1)&&(T=v),this.midPoint.set(p,T);var C=f-p,M=v-T;this.velocity.set(C,M),this.angle=e(p,T,f,v),this.distance=Math.sqrt(C*C+M*M)}},up:function(f){"buttons"in f&&(this.buttons=f.buttons),this.event=f,this.button=f.button,this.upElement=f.target,this.manager.transformPointer(this,f.pageX,f.pageY,!1),f.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=f.timeStamp,this.wasTouch=!1)},down:function(f){"buttons"in f&&(this.buttons=f.buttons),this.event=f,this.button=f.button,this.downElement=f.target,this.manager.transformPointer(this,f.pageX,f.pageY,!1),f.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),a.macOS&&f.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=f.timeStamp),this.wasTouch=!1},move:function(f){"buttons"in f&&(this.buttons=f.buttons),this.event=f,this.manager.transformPointer(this,f.pageX,f.pageY,!0),this.locked&&(this.movementX=f.movementX||f.mozMovementX||f.webkitMovementX||0,this.movementY=f.movementY||f.mozMovementY||f.webkitMovementY||0),this.moveTime=f.timeStamp,this.wasTouch=!1},wheel:function(f){"buttons"in f&&(this.buttons=f.buttons),this.event=f,this.manager.transformPointer(this,f.pageX,f.pageY,!1),this.deltaX=f.deltaX,this.deltaY=f.deltaY,this.deltaZ=f.deltaZ,this.wasTouch=!1},touchstart:function(f,v){f.pointerId&&(this.pointerId=f.pointerId),this.identifier=f.identifier,this.target=f.target,this.active=!0,this.buttons=1,this.event=v,this.downElement=f.target,this.manager.transformPointer(this,f.pageX,f.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=v.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(f,v){this.event=v,this.manager.transformPointer(this,f.pageX,f.pageY,!0),this.moveTime=v.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(f,v){this.buttons=0,this.event=v,this.upElement=f.target,this.manager.transformPointer(this,f.pageX,f.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=v.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(f,v){this.buttons=0,this.event=v,this.upElement=f.target,this.manager.transformPointer(this,f.pageX,f.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=v.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?i(this.downX,this.downY,this.x,this.y):i(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?e(this.downX,this.downY,this.x,this.y):e(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(f,v){f===void 0&&(f=10),v===void 0&&(v=[]);for(var c=this.prevPosition.x,g=this.prevPosition.y,p=this.position.x,T=this.position.y,C=0;C<f;C++){var M=1/f*C;v[C]={x:r(M,c,p),y:r(M,g,T)}}return v},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(f){this.position.x=f}},y:{get:function(){return this.position.y},set:function(f){this.position.y=f}},time:{get:function(){return this.event?this.event.timeStamp:0}}});h.exports=u},93301:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};h.exports=d},7179:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="boot"},85375:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="destroy"},39843:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragend"},23388:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragenter"},16133:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="drag"},27829:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragleave"},53904:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragover"},56058:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragstart"},2642:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="drop"},88171:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="gameobjectdown"},36147:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragend"},71692:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragenter"},96149:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="drag"},81285:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragleave"},74048:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragover"},21322:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragstart"},49378:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="drop"},86754:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="gameobjectmove"},86433:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="gameobjectout"},60709:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="gameobjectover"},24081:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerdown"},11172:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointermove"},18907:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerout"},95579:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerover"},35368:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerup"},26972:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="wheel"},47078:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="gameobjectup"},73802:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="gameobjectwheel"},56718:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="gameout"},25936:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="gameover"},27503:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="boot"},50852:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="process"},96438:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="update"},59152:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerlockchange"},47777:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerdown"},27957:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerdownoutside"},19444:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointermove"},54251:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerout"},18667:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerover"},27192:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerup"},24652:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pointerupoutside"},45132:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="wheel"},44512:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="preupdate"},15757:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="shutdown"},41637:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="start"},93802:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="update"},8214:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={BOOT:t(7179),DESTROY:t(85375),DRAG_END:t(39843),DRAG_ENTER:t(23388),DRAG:t(16133),DRAG_LEAVE:t(27829),DRAG_OVER:t(53904),DRAG_START:t(56058),DROP:t(2642),GAME_OUT:t(56718),GAME_OVER:t(25936),GAMEOBJECT_DOWN:t(88171),GAMEOBJECT_DRAG_END:t(36147),GAMEOBJECT_DRAG_ENTER:t(71692),GAMEOBJECT_DRAG:t(96149),GAMEOBJECT_DRAG_LEAVE:t(81285),GAMEOBJECT_DRAG_OVER:t(74048),GAMEOBJECT_DRAG_START:t(21322),GAMEOBJECT_DROP:t(49378),GAMEOBJECT_MOVE:t(86754),GAMEOBJECT_OUT:t(86433),GAMEOBJECT_OVER:t(60709),GAMEOBJECT_POINTER_DOWN:t(24081),GAMEOBJECT_POINTER_MOVE:t(11172),GAMEOBJECT_POINTER_OUT:t(18907),GAMEOBJECT_POINTER_OVER:t(95579),GAMEOBJECT_POINTER_UP:t(35368),GAMEOBJECT_POINTER_WHEEL:t(26972),GAMEOBJECT_UP:t(47078),GAMEOBJECT_WHEEL:t(73802),MANAGER_BOOT:t(27503),MANAGER_PROCESS:t(50852),MANAGER_UPDATE:t(96438),POINTER_DOWN:t(47777),POINTER_DOWN_OUTSIDE:t(27957),POINTER_MOVE:t(19444),POINTER_OUT:t(54251),POINTER_OVER:t(18667),POINTER_UP:t(27192),POINTER_UP_OUTSIDE:t(24652),POINTER_WHEEL:t(45132),POINTERLOCK_CHANGE:t(59152),PRE_UPDATE:t(44512),SHUTDOWN:t(15757),START:t(41637),UPDATE:t(93802)}},97421:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r){this.pad=s,this.events=s.events,this.index=r,this.value=0,this.threshold=.1},update:function(i){this.value=i},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});h.exports=l},28884:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(92734),i=new e({initialize:function(r,o,a){a===void 0&&(a=!1),this.pad=r,this.events=r.manager,this.index=o,this.value=0,this.threshold=1,this.pressed=a},update:function(s){this.value=s;var r=this.pad,o=this.index;s>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(l.BUTTON_DOWN,r,this,s),this.pad.emit(l.GAMEPAD_BUTTON_DOWN,o,s,this)):this.pressed&&(this.pressed=!1,this.events.emit(l.BUTTON_UP,r,this,s),this.pad.emit(l.GAMEPAD_BUTTON_UP,o,s,this))},destroy:function(){this.pad=null,this.events=null}});h.exports=i},99125:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(97421),l=t(28884),i=t(83419),s=t(50792),r=t(26099),o=new i({Extends:s,initialize:function(u,f){s.call(this),this.manager=u,this.pad=f,this.id=f.id,this.index=f.index;for(var v=[],c=0;c<f.buttons.length;c++)v.push(new l(this,c,f.buttons[c].value>=.5));this.buttons=v;var g=[];for(c=0;c<f.axes.length;c++)g.push(new e(this,c));this.axes=g,this.vibration=f.vibrationActuator;var p={value:0,pressed:!1};this._LCLeft=v[14]?v[14]:p,this._LCRight=v[15]?v[15]:p,this._LCTop=v[12]?v[12]:p,this._LCBottom=v[13]?v[13]:p,this._RCLeft=v[2]?v[2]:p,this._RCRight=v[1]?v[1]:p,this._RCTop=v[3]?v[3]:p,this._RCBottom=v[0]?v[0]:p,this._FBLeftTop=v[4]?v[4]:p,this._FBLeftBottom=v[6]?v[6]:p,this._FBRightTop=v[5]?v[5]:p,this._FBRightBottom=v[7]?v[7]:p;var T={value:0};this._HAxisLeft=g[0]?g[0]:T,this._VAxisLeft=g[1]?g[1]:T,this._HAxisRight=g[2]?g[2]:T,this._VAxisRight=g[3]?g[3]:T,this.leftStick=new r,this.rightStick=new r,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(a){return this.axes[a].getValue()},setAxisThreshold:function(a){for(var u=0;u<this.axes.length;u++)this.axes[u].threshold=a},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(a){return this.buttons[a].value},isButtonDown:function(a){return this.buttons[a].pressed},update:function(a){if(!(a.timestamp<this._created)){var u,f=this.buttons,v=a.buttons,c=f.length;for(u=0;u<c;u++)f[u].update(v[u].value);var g=this.axes,p=a.axes;for(c=g.length,u=0;u<c;u++)g[u].update(p[u]);c>=2&&(this.leftStick.set(g[0].getValue(),g[1].getValue()),c>=4&&this.rightStick.set(g[2].getValue(),g[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var a;for(a=0;a<this.buttons.length;a++)this.buttons[a].destroy();for(a=0;a<this.axes.length;a++)this.axes[a].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}}});h.exports=o},56654:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50792),i=t(92734),s=t(99125),r=t(35154),o=t(89639),a=t(8214),u=new e({Extends:l,initialize:function(v){l.call(this),this.scene=v.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=v,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,v.pluginEvents.once(a.BOOT,this.boot,this),v.pluginEvents.on(a.START,this.start,this)},boot:function(){var f=this.scene.sys.game,v=this.settings.input,c=f.config;this.enabled=r(v,"gamepad",c.inputGamepad)&&f.device.input.gamepads,this.target=r(v,"gamepad.target",c.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(a.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(a.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var f=this,v=this.target,c=function(g){g.defaultPrevented||!f.isActive()||(f.refreshPads(),f.queue.push(g))};this.onGamepadHandler=c,v.addEventListener("gamepadconnected",c,!1),v.addEventListener("gamepaddisconnected",c,!1),this.sceneInputPlugin.pluginEvents.on(a.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(a.UPDATE,this.update);for(var f=this.gamepads,v=0;v<f.length;v++)f[v]&&f[v].removeAllListeners()},disconnectAll:function(){for(var f=this.gamepads,v=0;v<f.length;v++)f[v]&&(f[v].pad.connected=!1)},refreshPads:function(){var f=navigator.getGamepads();if(!f)this.disconnectAll();else for(var v=this.gamepads,c=0;c<f.length;c++){var g=f[c];if(g){var p=g.id,T=g.index,C=v[T];if(C)C.id!==p?(C.destroy(),v[T]=new s(this,g)):C.update(g);else{var M=new s(this,g);v[T]=M,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=M):this._pad3=M:this._pad2=M:this._pad1=M}}}},getAll:function(){for(var f=[],v=this.gamepads,c=0;c<v.length;c++)v[c]&&f.push(v[c]);return f},getPad:function(f){for(var v=this.gamepads,c=0;c<v.length;c++)if(v[c]&&v[c].index===f)return v[c]},update:function(){if(this.enabled){this.refreshPads();var f=this.queue.length;if(f!==0)for(var v=this.queue.splice(0,f),c=0;c<f;c++){var g=v[c],p=this.getPad(g.gamepad.index);g.type==="gamepadconnected"?this.emit(i.CONNECTED,p,g):g.type==="gamepaddisconnected"&&this.emit(i.DISCONNECTED,p,g)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var f=0;f<this.gamepads.length;f++)this.gamepads[f]&&this.gamepads[f].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}}});o.register("GamepadPlugin",u,"gamepad","gamepad","inputGamepad"),h.exports=u},89651:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}},46008:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="down"},7629:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="up"},42206:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="connected"},86544:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="disconnected"},94784:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="down"},14325:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="up"},92734:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}},14350:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(93301),l=t(79291),i={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)};i=l(!1,i,e),h.exports=i},78970:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(72905),l=t(83419),i=t(8443),s=t(8214),r=t(46032),o=t(29747),a=new l({initialize:function(f){this.manager=f,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=o,this.onKeyUp=o,f.events.once(s.MANAGER_BOOT,this.boot,this)},boot:function(){var u=this.manager.config;this.enabled=u.inputKeyboard,this.target=u.inputKeyboardEventTarget,this.addCapture(u.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(i.POST_STEP,this.postUpdate,this)},startListeners:function(){var u=this;this.onKeyDown=function(v){if(!(v.defaultPrevented||!u.enabled||!u.manager)){u.queue.push(v),u.manager.events.emit(s.MANAGER_PROCESS);var c=v.altKey||v.ctrlKey||v.shiftKey||v.metaKey;u.preventDefault&&!c&&u.captures.indexOf(v.keyCode)>-1&&v.preventDefault()}},this.onKeyUp=function(v){if(!(v.defaultPrevented||!u.enabled||!u.manager)){u.queue.push(v),u.manager.events.emit(s.MANAGER_PROCESS);var c=v.altKey||v.ctrlKey||v.shiftKey||v.metaKey;u.preventDefault&&!c&&u.captures.indexOf(v.keyCode)>-1&&v.preventDefault()}};var f=this.target;f&&(f.addEventListener("keydown",this.onKeyDown,!1),f.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var u=this.target;u.removeEventListener("keydown",this.onKeyDown,!1),u.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(u){typeof u=="string"&&(u=u.split(",")),Array.isArray(u)||(u=[u]);for(var f=this.captures,v=0;v<u.length;v++){var c=u[v];typeof c=="string"&&(c=r[c.trim().toUpperCase()]),f.indexOf(c)===-1&&f.push(c)}this.preventDefault=f.length>0},removeCapture:function(u){typeof u=="string"&&(u=u.split(",")),Array.isArray(u)||(u=[u]);for(var f=this.captures,v=0;v<u.length;v++){var c=u[v];typeof c=="string"&&(c=r[c.toUpperCase()]),e(f,c)}this.preventDefault=f.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(i.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});h.exports=a},28846:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50792),i=t(95922),s=t(8443),r=t(35154),o=t(8214),a=t(89639),u=t(30472),f=t(46032),v=t(87960),c=t(74600),g=t(44594),p=t(56583),T=new e({Extends:l,initialize:function(M){l.call(this),this.game=M.systems.game,this.scene=M.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=M,this.manager=M.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,M.pluginEvents.once(o.BOOT,this.boot,this),M.pluginEvents.on(o.START,this.start,this)},boot:function(){var C=this.settings.input;this.enabled=r(C,"keyboard",!0);var M=r(C,"keyboard.capture",null);M&&this.addCaptures(M),this.sceneInputPlugin.pluginEvents.once(o.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(o.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(o.SHUTDOWN,this.shutdown,this),this.game.events.on(s.BLUR,this.resetKeys,this),this.scene.sys.events.on(g.PAUSE,this.resetKeys,this),this.scene.sys.events.on(g.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(C){return this.manager.addCapture(C),this},removeCapture:function(C){return this.manager.removeCapture(C),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:f.UP,down:f.DOWN,left:f.LEFT,right:f.RIGHT,space:f.SPACE,shift:f.SHIFT})},addKeys:function(C,M,A){M===void 0&&(M=!0),A===void 0&&(A=!1);var R={};if(typeof C=="string"){C=C.split(",");for(var P=0;P<C.length;P++){var L=C[P].trim();L&&(R[L]=this.addKey(L,M,A))}}else for(var F in C)R[F]=this.addKey(C[F],M,A);return R},addKey:function(C,M,A){M===void 0&&(M=!0),A===void 0&&(A=!1);var R=this.keys;if(C instanceof u){var P=R.indexOf(C);return P>-1?R[P]=C:R[C.keyCode]=C,M&&this.addCapture(C.keyCode),C.setEmitOnRepeat(A),C}return typeof C=="string"&&(C=f[C.toUpperCase()]),R[C]||(R[C]=new u(this,C),M&&this.addCapture(C),R[C].setEmitOnRepeat(A)),R[C]},removeKey:function(C,M,A){M===void 0&&(M=!1),A===void 0&&(A=!1);var R=this.keys,P;if(C instanceof u){var L=R.indexOf(C);L>-1&&(P=this.keys[L],this.keys[L]=void 0)}else typeof C=="string"&&(C=f[C.toUpperCase()]);return R[C]&&(P=R[C],R[C]=void 0),P&&(P.plugin=null,A&&this.removeCapture(P.keyCode),M&&P.destroy()),this},removeAllKeys:function(C,M){C===void 0&&(C=!1),M===void 0&&(M=!1);for(var A=this.keys,R=0;R<A.length;R++){var P=A[R];P&&(A[R]=void 0,M&&this.removeCapture(P.keyCode),C&&P.destroy())}return this},createCombo:function(C,M){return new v(this,C,M)},checkDown:function(C,M){if(M===void 0&&(M=0),this.enabled&&C.isDown){var A=p(this.time-C.timeDown,M);if(A>C._tick)return C._tick=A,!0}return!1},update:function(){var C=this.manager.queue,M=C.length;if(!(!this.isActive()||M===0))for(var A=this.keys,R=0;R<M;R++){var P=C[R],L=P.keyCode,F=A[L],w=!1;P.cancelled===void 0&&(P.cancelled=0,P.stopImmediatePropagation=function(){P.cancelled=1},P.stopPropagation=function(){P.cancelled=-1}),P.cancelled!==-1&&(L===this.prevCode&&P.timeStamp===this.prevTime&&P.type===this.prevType||(this.prevCode=L,this.prevTime=P.timeStamp,this.prevType=P.type,P.type==="keydown"?(F&&(w=F.isDown,F.onDown(P)),!P.cancelled&&(!F||!w)&&(c[L]&&this.emit(i.KEY_DOWN+c[L],P),P.cancelled||this.emit(i.ANY_KEY_DOWN,P))):(F&&F.onUp(P),P.cancelled||(c[L]&&this.emit(i.KEY_UP+c[L],P),P.cancelled||this.emit(i.ANY_KEY_UP,P))),P.cancelled===1&&(P.cancelled=0)))}},resetKeys:function(){for(var C=this.keys,M=0;M<C.length;M++)C[M]&&C[M].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(o.MANAGER_PROCESS,this.update,this),this.game.events.off(s.BLUR,this.resetKeys),this.scene.sys.events.off(g.PAUSE,this.resetKeys,this),this.scene.sys.events.off(g.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var C=this.keys,M=0;M<C.length;M++)C[M]&&C[M].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}}});a.register("KeyboardPlugin",T,"keyboard","keyboard","inputKeyboard"),h.exports=T},66970:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size?!0:(e.current=e.keyCodes[e.index],!1)};h.exports=d},87960:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(95922),i=t(95540),s=t(68769),r=t(92803),o=new e({initialize:function(u,f,v){if(v===void 0&&(v={}),f.length<2)return!1;this.manager=u,this.enabled=!0,this.keyCodes=[];for(var c=0;c<f.length;c++){var g=f[c];typeof g=="string"?this.keyCodes.push(g.toUpperCase().charCodeAt(0)):typeof g=="number"?this.keyCodes.push(g):g.hasOwnProperty("keyCode")&&this.keyCodes.push(g.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=i(v,"resetOnWrongKey",!0),this.maxKeyDelay=i(v,"maxKeyDelay",0),this.resetOnMatch=i(v,"resetOnMatch",!1),this.deleteOnMatch=i(v,"deleteOnMatch",!1);var p=this,T=function(C){if(!(p.matched||!p.enabled)){var M=s(C,p);M&&(p.manager.emit(l.COMBO_MATCH,p,C),p.resetOnMatch?r(p):p.deleteOnMatch&&p.destroy())}};this.onKeyDown=T,this.manager.on(l.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(l.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});h.exports=o},68769:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66970),l=function(i,s){if(s.matched)return!0;var r=!1,o=!1;if(i.keyCode===s.current)if(s.index>0&&s.maxKeyDelay>0){var a=s.timeLastMatched+s.maxKeyDelay;i.timeStamp<=a&&(o=!0,r=e(i,s))}else o=!0,r=e(i,s);return!o&&s.resetOnWrongKey&&(s.index=0,s.current=s.keyCodes[0]),r&&(s.timeLastMatched=i.timeStamp,s.matched=!0,s.timeMatched=i.timeStamp),r};h.exports=l},92803:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};h.exports=d},92612:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="keydown"},23345:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="keyup"},21957:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="keycombomatch"},44743:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="down"},3771:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="keydown-"},46358:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="keyup-"},75674:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="up"},95922:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=50);var l=t.plugin.game.loop.time-t.timeDown;return t.isDown&&l<e};h.exports=d},90229:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t._justDown?(t._justDown=!1,!0):!1};h.exports=d},38796:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t._justUp?(t._justUp=!1,!0):!1};h.exports=d},30472:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50792),i=t(95922),s=new e({Extends:l,initialize:function(o,a){l.call(this),this.plugin=o,this.keyCode=a,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(i.DOWN,this,r):(this.isDown=!0,this.isUp=!1,this.timeDown=r.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(i.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(i.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}});h.exports=s},46032:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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};h.exports=d},74600:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(46032),l={};for(var i in e)l[e[i]]=i;h.exports=l},41170:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=50);var l=t.plugin.game.loop.time-t.timeUp;return t.isUp&&l<e};h.exports=d},85098:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(89357),i=t(8214),s=t(29747),r=new e({initialize:function(a){this.manager=a,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=s,this.onMouseDown=s,this.onMouseUp=s,this.onMouseDownWindow=s,this.onMouseUpWindow=s,this.onMouseOver=s,this.onMouseOut=s,this.onMouseWheel=s,this.pointerLockChange=s,this.isTop=!0,a.events.once(i.MANAGER_BOOT,this.boot,this)},boot:function(){var o=this.manager.config;this.enabled=o.inputMouse,this.target=o.inputMouseEventTarget,this.passive=o.inputMousePassive,this.preventDefaultDown=o.inputMousePreventDefaultDown,this.preventDefaultUp=o.inputMousePreventDefaultUp,this.preventDefaultMove=o.inputMousePreventDefaultMove,this.preventDefaultWheel=o.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,o.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(o){return o.preventDefault(),!1}),this},requestPointerLock:function(){if(l.pointerLock){var o=this.target;o.requestPointerLock=o.requestPointerLock||o.mozRequestPointerLock||o.webkitRequestPointerLock,o.requestPointerLock()}},releasePointerLock:function(){l.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var o=this.target;if(o){var a=this,u=this.manager,f=u.canvas,v=window&&window.focus&&u.game.config.autoFocus;this.onMouseMove=function(g){!g.defaultPrevented&&a.enabled&&u&&u.enabled&&(u.onMouseMove(g),a.preventDefaultMove&&g.preventDefault())},this.onMouseDown=function(g){v&&window.focus(),!g.defaultPrevented&&a.enabled&&u&&u.enabled&&(u.onMouseDown(g),a.preventDefaultDown&&g.target===f&&g.preventDefault())},this.onMouseDownWindow=function(g){g.sourceCapabilities&&g.sourceCapabilities.firesTouchEvents||!g.defaultPrevented&&a.enabled&&u&&u.enabled&&g.target!==f&&u.onMouseDown(g)},this.onMouseUp=function(g){!g.defaultPrevented&&a.enabled&&u&&u.enabled&&(u.onMouseUp(g),a.preventDefaultUp&&g.target===f&&g.preventDefault())},this.onMouseUpWindow=function(g){g.sourceCapabilities&&g.sourceCapabilities.firesTouchEvents||!g.defaultPrevented&&a.enabled&&u&&u.enabled&&g.target!==f&&u.onMouseUp(g)},this.onMouseOver=function(g){!g.defaultPrevented&&a.enabled&&u&&u.enabled&&u.setCanvasOver(g)},this.onMouseOut=function(g){!g.defaultPrevented&&a.enabled&&u&&u.enabled&&u.setCanvasOut(g)},this.onMouseWheel=function(g){!g.defaultPrevented&&a.enabled&&u&&u.enabled&&u.onMouseWheel(g),a.preventDefaultWheel&&g.target===f&&g.preventDefault()};var c={passive:!0};if(o.addEventListener("mousemove",this.onMouseMove),o.addEventListener("mousedown",this.onMouseDown),o.addEventListener("mouseup",this.onMouseUp),o.addEventListener("mouseover",this.onMouseOver,c),o.addEventListener("mouseout",this.onMouseOut,c),this.preventDefaultWheel?o.addEventListener("wheel",this.onMouseWheel,{passive:!1}):o.addEventListener("wheel",this.onMouseWheel,c),window&&u.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,c),window.top.addEventListener("mouseup",this.onMouseUpWindow,c)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,c),window.addEventListener("mouseup",this.onMouseUpWindow,c),this.isTop=!1}l.pointerLock&&(this.pointerLockChange=function(g){var p=a.target;a.locked=document.pointerLockElement===p||document.mozPointerLockElement===p||document.webkitPointerLockElement===p,u.onPointerLockChange(g)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var o=this.target;o.removeEventListener("mousemove",this.onMouseMove),o.removeEventListener("mousedown",this.onMouseDown),o.removeEventListener("mouseup",this.onMouseUp),o.removeEventListener("mouseover",this.onMouseOver),o.removeEventListener("mouseout",this.onMouseOut),window&&(o=this.isTop?window.top:window,o.removeEventListener("mousedown",this.onMouseDownWindow),o.removeEventListener("mouseup",this.onMouseUpWindow)),l.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}});h.exports=r},87078:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={MouseManager:t(85098)}},36210:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(8214),i=t(29747),s=new e({initialize:function(o){this.manager=o,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=i,this.onTouchStartWindow=i,this.onTouchMove=i,this.onTouchEnd=i,this.onTouchEndWindow=i,this.onTouchCancel=i,this.onTouchCancelWindow=i,this.isTop=!0,o.events.once(l.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 o=this,a=this.manager,u=a.canvas,f=window&&window.focus&&a.game.config.autoFocus;this.onTouchMove=function(p){!p.defaultPrevented&&o.enabled&&a&&a.enabled&&(a.onTouchMove(p),o.capture&&p.cancelable&&p.preventDefault())},this.onTouchStart=function(p){f&&window.focus(),!p.defaultPrevented&&o.enabled&&a&&a.enabled&&(a.onTouchStart(p),o.capture&&p.cancelable&&p.target===u&&p.preventDefault())},this.onTouchStartWindow=function(p){!p.defaultPrevented&&o.enabled&&a&&a.enabled&&p.target!==u&&a.onTouchStart(p)},this.onTouchEnd=function(p){!p.defaultPrevented&&o.enabled&&a&&a.enabled&&(a.onTouchEnd(p),o.capture&&p.cancelable&&p.target===u&&p.preventDefault())},this.onTouchEndWindow=function(p){!p.defaultPrevented&&o.enabled&&a&&a.enabled&&p.target!==u&&a.onTouchEnd(p)},this.onTouchCancel=function(p){!p.defaultPrevented&&o.enabled&&a&&a.enabled&&(a.onTouchCancel(p),o.capture&&p.preventDefault())},this.onTouchCancelWindow=function(p){!p.defaultPrevented&&o.enabled&&a&&a.enabled&&a.onTouchCancel(p)};var v=this.capture,c={passive:!0},g={passive:!1};if(r.addEventListener("touchstart",this.onTouchStart,v?g:c),r.addEventListener("touchmove",this.onTouchMove,v?g:c),r.addEventListener("touchend",this.onTouchEnd,v?g:c),r.addEventListener("touchcancel",this.onTouchCancel,v?g:c),window&&a.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,g),window.top.addEventListener("touchend",this.onTouchEndWindow,g),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,g)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,g),window.addEventListener("touchend",this.onTouchEndWindow,g),window.addEventListener("touchcancel",this.onTouchCancelWindow,g),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}});h.exports=s},95618:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={TouchManager:t(36210)}},41299:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(54899),s=t(95540),r=t(98356),o=t(3374),a=t(84376),u=t(92638),f=new e({initialize:function(c,g){if(this.loader=c,this.cache=s(g,"cache",!1),this.type=s(g,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=s(g,"key",!1);var p=this.key;if(c.prefix&&c.prefix!==""&&(this.key=c.prefix+p),!this.key)throw new Error("Invalid File key: "+this.key);var T=s(g,"url");T===void 0?T=c.path+p+"."+s(g,"extension",""):typeof T=="string"&&!T.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(T=c.path+T),this.url=T,this.src="",this.xhrSettings=u(s(g,"responseType",void 0)),s(g,"xhrSettings",!1)&&(this.xhrSettings=o(this.xhrSettings,s(g,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?l.FILE_POPULATED:l.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=s(g,"config",{}),this.multiFile,this.linkFile,this.base64=typeof T=="string"&&T.indexOf("data:")===0,this.retryAttempts=s(g,"maxRetries",c.maxRetries)},setLink:function(v){this.linkFile=v,v.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===l.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=l.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=a(this,this.loader.xhr)}},onLoad:function(v,c){var g=v.responseURL&&this.loader.localSchemes.some(function(C){return v.responseURL.indexOf(C)===0}),p=g&&c.target.status===0,T=!(c.target&&c.target.status!==200)||p;v.readyState===4&&v.status>=400&&v.status<=599&&(T=!1),this.state=l.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,T)},onBase64Load:function(v){this.xhrLoader=v,this.state=l.FILE_LOADED,this.percentComplete=1,this.loader.emit(i.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(v){v.lengthComputable&&(this.bytesLoaded=v.loaded,this.bytesTotal=v.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(i.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=l.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=l.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=l.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(v){if(this.state!==l.FILE_PENDING_DESTROY){v===void 0&&(v=this.data);var c=this.key,g=this.type;this.loader.emit(i.FILE_COMPLETE,c,g,v),this.loader.emit(i.FILE_KEY_COMPLETE+g+"-"+c,c,g,v),this.loader.flagForRemoval(this),this.state=l.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});f.createObjectURL=function(v,c,g){if(typeof URL=="function")v.src=URL.createObjectURL(c);else{var p=new FileReader;p.onload=function(){v.removeAttribute("crossOrigin"),v.src="data:"+(c.type||g)+";base64,"+p.result.split(",")[1]},p.onerror=v.onerror,p.readAsDataURL(c)}},f.revokeObjectURL=function(v){typeof URL=="function"&&URL.revokeObjectURL(v.src)},h.exports=f},74099:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={},t={install:function(e){for(var l in d)e[l]=d[l]},register:function(e,l){d[e]=l},destroy:function(){d={}}};h.exports=t},98356:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|file:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url:!1};h.exports=d},74261:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(50792),s=t(54899),r=t(74099),o=t(95540),a=t(35154),u=t(41212),f=t(37277),v=t(44594),c=t(92638),g=new e({Extends:i,initialize:function(T){i.call(this);var C=T.sys.game.config,M=T.sys.settings.loader;this.scene=T,this.systems=T.sys,this.cacheManager=T.sys.cache,this.textureManager=T.sys.textures,this.sceneManager=T.sys.game.scene,r.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(o(M,"baseURL",C.loaderBaseURL)),this.setPath(o(M,"path",C.loaderPath)),this.setPrefix(o(M,"prefix",C.loaderPrefix)),this.maxParallelDownloads=o(M,"maxParallelDownloads",C.loaderMaxParallelDownloads),this.xhr=c(o(M,"responseType",C.loaderResponseType),o(M,"async",C.loaderAsync),o(M,"user",C.loaderUser),o(M,"password",C.loaderPassword),o(M,"timeout",C.loaderTimeout),o(M,"withCredentials",C.loaderWithCredentials)),this.crossOrigin=o(M,"crossOrigin",C.loaderCrossOrigin),this.imageLoadType=o(M,"imageLoadType",C.loaderImageLoadType),this.localSchemes=o(M,"localScheme",C.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new Set,this.inflight=new Set,this.queue=new Set,this._deleteQueue=new Set,this.totalFailed=0,this.totalComplete=0,this.state=l.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=o(M,"maxRetries",C.loaderMaxRetries),T.sys.events.once(v.BOOT,this.boot,this),T.sys.events.on(v.START,this.pluginStart,this)},boot:function(){this.systems.events.once(v.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(v.SHUTDOWN,this.shutdown,this)},setBaseURL:function(p){return p===void 0&&(p=""),p!==""&&p.substr(-1)!=="/"&&(p=p.concat("/")),this.baseURL=p,this},setPath:function(p){return p===void 0&&(p=""),p!==""&&p.substr(-1)!=="/"&&(p=p.concat("/")),this.path=p,this},setPrefix:function(p){return p===void 0&&(p=""),this.prefix=p,this},setCORS:function(p){return this.crossOrigin=p,this},addFile:function(p){Array.isArray(p)||(p=[p]);for(var T=0;T<p.length;T++){var C=p[T];this.keyExists(C)||(this.list.add(C),this.emit(s.ADD,C.key,C.type,this,C),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(p){var T=p.hasCacheConflict();return T||this.list.forEach(function(C){if(C.type===p.type&&C.key===p.key)return T=!0,!1}),!T&&this.isLoading()&&(this.inflight.forEach(function(C){if(C.type===p.type&&C.key===p.key)return T=!0,!1}),this.queue.forEach(function(C){if(C.type===p.type&&C.key===p.key)return T=!0,!1})),T},addPack:function(p,T){if(typeof T=="string"){var C=a(p,T);C&&(p={packKey:C})}var M=0,A=this.baseURL,R=this.path,P=this.prefix;for(var L in p)if(Object.prototype.hasOwnProperty.call(p,L)){var F=p[L],w=o(F,"baseURL",A),O=o(F,"path",R),B=o(F,"prefix",P),I=o(F,"files",null),D=o(F,"defaultType","void");if(Array.isArray(I)){this.setBaseURL(w),this.setPath(O),this.setPrefix(B);for(var N=0;N<I.length;N++){var z=I[N],V=z.hasOwnProperty("type")?z.type:D;this[V]&&(this[V](z),M++)}}}return this.setBaseURL(A),this.setPath(R),this.setPrefix(P),M>0},removePack:function(p,T){var C=this.systems.anims,M=this.cacheManager,A=this.textureManager,R={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"},P;if(u(p))P=p;else if(P=M.json.get(p),!P){console.warn("Asset Pack not found in JSON cache:",p);return}T&&(P={_:P[T]});for(var L in P){var F=P[L],w=o(F,"prefix",""),O=o(F,"files"),B=o(F,"defaultType");if(Array.isArray(O))for(var I=0;I<O.length;I++){var D=O[I],N=D.hasOwnProperty("type")?D.type:B;if(!N){console.warn("No type:",D);continue}var z=w+D.key;if(N==="animation"&&C.remove(z),!((N==="aseprite"||N==="atlas"||N==="atlasXML"||N==="htmlTexture"||N==="image"||N==="multiatlas"||N==="spritesheet"||N==="svg"||N==="texture"||N==="unityAtlas")&&(A.remove(z),!R[N]))){if(N==="pack"){this.removePack(z,D.dataKey);continue}if(N==="spine"){var V=M.custom.spine.get(z);if(!V)continue;var U=V.prefix===void 0?"":V.prefix;M.custom.spine.remove(z);var G=M.custom.spineTextures.get(z);if(!G)continue;M.custom.spineTextures.remove(z);for(var b=0;b<G.pages.length;b++){var Y=G.pages[b],W=U+Y.name,H=z+":"+W;A.exists(H)?A.remove(H):A.remove(W)}}var X=R[N];if(X!==null){if(!X){console.warn("Unknown type:",N);continue}var K=M[X];K.remove(z)}}}}},isLoading:function(){return this.state===l.LOADER_LOADING||this.state===l.LOADER_PROCESSING},isReady:function(){return this.state===l.LOADER_IDLE||this.state===l.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(s.START,this),this.list.size===0?this.loadComplete():(this.state=l.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(v.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(s.PROGRESS,this.progress)},update:function(){this.state===l.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.forEach(function(p){if((p.state===l.FILE_POPULATED||p.state===l.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.add(p),this.list.delete(p),p.crossOrigin||(p.crossOrigin=this.crossOrigin),p.load()),this.inflight.size===this.maxParallelDownloads)return!1},this)},nextFile:function(p,T){this.inflight&&(this.inflight.delete(p),this.updateProgress(),T?(this.totalComplete++,this.queue.add(p),this.emit(s.FILE_LOAD,p),p.onProcess()):(this.totalFailed++,this._deleteQueue.add(p),this.emit(s.FILE_LOAD_ERROR,p),this.fileProcessComplete(p)))},fileProcessComplete:function(p){!this.scene||!this.systems||!this.systems.game||this.systems.game.pendingDestroy||(p.state===l.FILE_ERRORED?p.multiFile&&p.multiFile.onFileFailed(p):p.state===l.FILE_COMPLETE&&(p.multiFile?p.multiFile.isReadyToProcess()&&(p.multiFile.addToCache(),p.multiFile.pendingDestroy()):(p.addToCache(),p.pendingDestroy())),this.queue.delete(p),this.list.size===0&&this.inflight.size===0&&this.queue.size===0&&this.loadComplete())},loadComplete:function(){this.emit(s.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=l.LOADER_COMPLETE,this.systems.events.off(v.UPDATE,this.update,this),this._deleteQueue.forEach(function(p){p.destroy()}),this._deleteQueue.clear(),this.emit(s.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(p){this._deleteQueue.add(p)},saveJSON:function(p,T){return this.save(JSON.stringify(p),T)},save:function(p,T,C){T===void 0&&(T="file.json"),C===void 0&&(C="application/json");var M=new Blob([p],{type:C}),A=URL.createObjectURL(M),R=document.createElement("a");return R.download=T,R.textContent="Download "+T,R.href=A,R.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var p=this.systems.game.config,T=this.systems.settings.loader;this.setBaseURL(o(T,"baseURL",p.loaderBaseURL)),this.setPath(o(T,"path",p.loaderPath)),this.setPrefix(o(T,"prefix",p.loaderPrefix)),this.state=l.LOADER_IDLE},shutdown:function(){this.reset(),this.state=l.LOADER_SHUTDOWN,this.removeAllListeners(),this.systems.events.off(v.UPDATE,this.update,this),this.systems.events.off(v.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=l.LOADER_DESTROYED,this.systems.events.off(v.UPDATE,this.update,this),this.systems.events.off(v.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}});f.register("Loader",g,"load"),h.exports=g},3374:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(79291),l=t(92638),i=function(s,r){var o=s===void 0?l():e({},s);if(r)for(var a in r)r[a]!==void 0&&(o[a]=r[a]);return o};h.exports=i},26430:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(54899),s=new e({initialize:function(o,a,u,f){var v=[];f.forEach(function(p){p&&v.push(p)}),this.loader=o,this.type=a,this.key=u;var c=this.key;o.prefix&&o.prefix!==""&&(this.key=o.prefix+c),this.multiKeyIndex=o.multiKeyIndex++,this.files=v,this.state=l.FILE_PENDING,this.complete=!1,this.pending=v.length,this.failed=0,this.config={},this.baseURL=o.baseURL,this.path=o.path,this.prefix=o.prefix;for(var g=0;g<v.length;g++)v[g].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 o=this.files.indexOf(r);o!==-1&&this.pending--},onFileFailed:function(r){var o=this.files.indexOf(r);o!==-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!==l.FILE_PENDING_DESTROY){var r=this.key,o=this.type;this.loader.emit(i.FILE_COMPLETE,r,o),this.loader.emit(i.FILE_KEY_COMPLETE+o+"-"+r,r,o),this.loader.flagForRemoval(this);for(var a=0;a<this.files.length;a++)this.files[a].pendingDestroy();this.state=l.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}});h.exports=s},84376:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(3374),l=function(i,s){var r=e(s,i.xhrSettings);if(i.base64){var o=i.url.split(";base64,").pop()||i.url.split(",").pop(),a;i.xhrSettings.responseType==="arraybuffer"?a={response:Uint8Array.from(atob(o),function(v){return v.charCodeAt(0)}).buffer}:a={responseText:atob(o)},i.onBase64Load(a);return}var u=new XMLHttpRequest;if(u.open("GET",i.src,r.async,r.user,r.password),u.responseType=i.xhrSettings.responseType,u.timeout=r.timeout,r.headers)for(var f in r.headers)u.setRequestHeader(f,r.headers[f]);return r.header&&r.headerValue&&u.setRequestHeader(r.header,r.headerValue),r.requestedWith&&u.setRequestHeader("X-Requested-With",r.requestedWith),r.overrideMimeType&&u.overrideMimeType(r.overrideMimeType),r.withCredentials&&(u.withCredentials=!0),u.onload=i.onLoad.bind(i,u),u.onerror=i.onError.bind(i,u),u.onprogress=i.onProgress.bind(i),u.ontimeout=i.onError.bind(i,u),u.send(),u};h.exports=l},92638:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s,r){return t===void 0&&(t=""),e===void 0&&(e=!0),l===void 0&&(l=""),i===void 0&&(i=""),s===void 0&&(s=0),r===void 0&&(r=!1),{responseType:t,async:e,user:l,password:i,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}};h.exports=d},23906:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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};h.exports=d},42155:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="addfile"},38991:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="complete"},27540:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="filecomplete"},87464:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="filecomplete-"},94486:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="loaderror"},13035:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="load"},38144:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="fileprogress"},97520:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="postprocess"},85595:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="progress"},55680:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="start"},54899:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(518),s=t(54899),r=new e({Extends:i,initialize:function(a,u,f,v,c){i.call(this,a,u,f,v,c),this.type="animationJSON"},onProcess:function(){this.loader.once(s.POST_PROCESS,this.onLoadComplete,this),i.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});l.register("animation",function(o,a,u,f){if(Array.isArray(o))for(var v=0;v<o.length;v++)this.addFile(new r(this,o[v]));else this.addFile(new r(this,o,a,f,u));return this}),h.exports=r},76272:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(95540),s=t(19550),r=t(41212),o=t(518),a=t(26430),u=new e({Extends:a,initialize:function(v,c,g,p,T,C){var M,A;if(r(c)){var R=c;c=i(R,"key"),M=new s(v,{key:c,url:i(R,"textureURL"),extension:i(R,"textureExtension","png"),normalMap:i(R,"normalMap"),xhrSettings:i(R,"textureXhrSettings")}),A=new o(v,{key:c,url:i(R,"atlasURL"),extension:i(R,"atlasExtension","json"),xhrSettings:i(R,"atlasXhrSettings")})}else M=new s(v,c,g,T),A=new o(v,c,p,C);M.linkFile?a.call(this,v,"atlasjson",c,[M,A,M.linkFile]):a.call(this,v,"atlasjson",c,[M,A])},addToCache:function(){if(this.isReadyToProcess()){var f=this.files[0],v=this.files[1],c=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(f.key,f.data,v.data,c),v.addToCache(),this.complete=!0}}});l.register("aseprite",function(f,v,c,g,p){var T;if(Array.isArray(f))for(var C=0;C<f.length;C++)T=new u(this,f[C]),this.addFile(T.files);else T=new u(this,f,v,c,g,p),this.addFile(T.files);return this}),h.exports=u},38734:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(95540),s=t(19550),r=t(41212),o=t(518),a=t(26430),u=new e({Extends:a,initialize:function(v,c,g,p,T,C){var M,A;if(r(c)){var R=c;c=i(R,"key"),M=new s(v,{key:c,url:i(R,"textureURL"),extension:i(R,"textureExtension","png"),normalMap:i(R,"normalMap"),xhrSettings:i(R,"textureXhrSettings")}),A=new o(v,{key:c,url:i(R,"atlasURL"),extension:i(R,"atlasExtension","json"),xhrSettings:i(R,"atlasXhrSettings")})}else M=new s(v,c,g,T),A=new o(v,c,p,C);M.linkFile?a.call(this,v,"atlasjson",c,[M,A,M.linkFile]):a.call(this,v,"atlasjson",c,[M,A])},addToCache:function(){if(this.isReadyToProcess()){var f=this.files[0],v=this.files[1],c=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(f.key,f.data,v.data,c),this.complete=!0}}});l.register("atlas",function(f,v,c,g,p){var T;if(Array.isArray(f))for(var C=0;C<f.length;C++)T=new u(this,f[C]),this.addFile(T.files);else T=new u(this,f,v,c,g,p),this.addFile(T.files);return this}),h.exports=u},74599:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(95540),s=t(19550),r=t(41212),o=t(26430),a=t(57318),u=new e({Extends:o,initialize:function(v,c,g,p,T,C){var M,A;if(r(c)){var R=c;c=i(R,"key"),M=new s(v,{key:c,url:i(R,"textureURL"),extension:i(R,"textureExtension","png"),normalMap:i(R,"normalMap"),xhrSettings:i(R,"textureXhrSettings")}),A=new a(v,{key:c,url:i(R,"atlasURL"),extension:i(R,"atlasExtension","xml"),xhrSettings:i(R,"atlasXhrSettings")})}else M=new s(v,c,g,T),A=new a(v,c,p,C);M.linkFile?o.call(this,v,"atlasxml",c,[M,A,M.linkFile]):o.call(this,v,"atlasxml",c,[M,A])},addToCache:function(){if(this.isReadyToProcess()){var f=this.files[0],v=this.files[1],c=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(f.key,f.data,v.data,c),this.complete=!0}}});l.register("atlasXML",function(f,v,c,g,p){var T;if(Array.isArray(f))for(var C=0;C<f.length;C++)T=new u(this,f[C]),this.addFile(T.files);else T=new u(this,f,v,c,g,p),this.addFile(T.files);return this}),h.exports=u},21097:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(89749),a=t(41212),u=new e({Extends:i,initialize:function(v,c,g,p,T){if(a(c)){var C=c;c=r(C,"key"),p=r(C,"xhrSettings"),T=r(C,"context",T)}var M={type:"audio",cache:v.cacheManager.audio,extension:g.type,responseType:"arraybuffer",key:c,url:g.url,xhrSettings:p,config:{context:T}};i.call(this,v,M)},onProcess:function(){this.state=l.FILE_PROCESSING;var f=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(v){f.data=v,f.onProcessComplete()},function(v){console.error("Error decoding audio: "+f.key+" - ",v?v.message:null),f.onProcessError()}),this.config.context=null}});u.create=function(f,v,c,g,p){var T=f.systems.game,C=T.config.audio,M=T.device.audio;a(v)&&(c=r(v,"url",[]),g=r(v,"config",{}));var A=u.getAudioURL(T,c);return A?M.webAudio&&!C.disableWebAudio?new u(f,v,A,p,T.sound.context):new o(f,v,A,g):(console.warn('No audio URLs for "%s" can play on this device',v),null)},u.getAudioURL=function(f,v){Array.isArray(v)||(v=[v]);for(var c=0;c<v.length;c++){var g=r(v[c],"url",v[c]);if(g.indexOf("blob:")===0||g.indexOf("data:")===0)return{url:g,type:""};var p=g.match(/\.([a-zA-Z0-9]+)($|\?)/);if(p=r(v[c],"type",p?p[1]:"").toLowerCase(),f.device.audio[p])return{url:g,type:p}}return null},s.register("audio",function(f,v,c,g){var p=this.systems.game,T=p.config.audio,C=p.device.audio;if(T.noAudio||!C.webAudio&&!C.audioData)return this;var M;if(Array.isArray(f))for(var A=0;A<f.length;A++)M=u.create(this,f[A]),M&&this.addFile(M);else M=u.create(this,f,v,c,g),M&&this.addFile(M);return this}),h.exports=u},89524:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(21097),l=t(83419),i=t(74099),s=t(95540),r=t(41212),o=t(518),a=t(26430),u=new l({Extends:a,initialize:function(v,c,g,p,T,C,M){if(r(c)){var A=c;c=s(A,"key"),g=s(A,"jsonURL"),p=s(A,"audioURL"),T=s(A,"audioConfig"),C=s(A,"audioXhrSettings"),M=s(A,"jsonXhrSettings")}var R;if(!p)R=new o(v,c,g,M),a.call(this,v,"audiosprite",c,[R]),this.config.resourceLoad=!0,this.config.audioConfig=T,this.config.audioXhrSettings=C;else{var P=e.create(v,c,p,T,C);P&&(R=new o(v,c,g,M),a.call(this,v,"audiosprite",c,[P,R]),this.config.resourceLoad=!1)}},onFileComplete:function(f){var v=this.files.indexOf(f);if(v!==-1&&(this.pending--,this.config.resourceLoad&&f.type==="json"&&f.data.hasOwnProperty("resources"))){var c=f.data.resources,g=s(this.config,"audioConfig"),p=s(this.config,"audioXhrSettings"),T=e.create(this.loader,f.key,c,g,p);T&&(this.addToMultiFile(T),this.loader.addFile(T))}},addToCache:function(){if(this.isReadyToProcess()){var f=this.files[0],v=this.files[1];f.addToCache(),v.addToCache(),this.complete=!0}}});i.register("audioSprite",function(f,v,c,g,p,T){var C=this.systems.game,M=C.config.audio,A=C.device.audio;if(M&&M.noAudio||!A.webAudio&&!A.audioData)return this;var R;if(Array.isArray(f))for(var P=0;P<f.length;P++)R=new u(this,f[P]),R.files&&this.addFile(R.files);else R=new u(this,f,v,c,g,p,T),R.files&&this.addFile(R.files);return this})},85722:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g,p){var T="bin";if(o(v)){var C=v;v=r(C,"key"),c=r(C,"url"),g=r(C,"xhrSettings"),T=r(C,"extension",T),p=r(C,"dataType",p)}var M={type:"binary",cache:f.cacheManager.binary,extension:T,responseType:"arraybuffer",key:v,url:c,xhrSettings:g,config:{dataType:p}};i.call(this,f,M)},onProcess:function(){this.state=l.FILE_PROCESSING;var u=this.config.dataType;this.data=u?new u(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});s.register("binary",function(u,f,v,c){if(Array.isArray(u))for(var g=0;g<u.length;g++)this.addFile(new a(this,u[g]));else this.addFile(new a(this,u,f,c,v));return this}),h.exports=a},97025:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(95540),s=t(19550),r=t(41212),o=t(26430),a=t(21859),u=t(57318),f=new e({Extends:o,initialize:function(c,g,p,T,C,M){var A,R;if(r(g)){var P=g;g=i(P,"key"),A=new s(c,{key:g,url:i(P,"textureURL"),extension:i(P,"textureExtension","png"),normalMap:i(P,"normalMap"),xhrSettings:i(P,"textureXhrSettings")}),R=new u(c,{key:g,url:i(P,"fontDataURL"),extension:i(P,"fontDataExtension","xml"),xhrSettings:i(P,"fontDataXhrSettings")})}else A=new s(c,g,p,C),R=new u(c,g,T,M);A.linkFile?o.call(this,c,"bitmapfont",g,[A,R,A.linkFile]):o.call(this,c,"bitmapfont",g,[A,R])},addToCache:function(){if(this.isReadyToProcess()){var v=this.files[0],c=this.files[1];v.addToCache();var g=v.cache.get(v.key),p=a(c.data,v.cache.getFrame(v.key),0,0,g);this.loader.cacheManager.bitmapFont.add(v.key,{data:p,texture:v.key,frame:null}),this.complete=!0}}});l.register("bitmapFont",function(v,c,g,p,T){var C;if(Array.isArray(v))for(var M=0;M<v.length;M++)C=new f(this,v[M]),this.addFile(C.files);else C=new f(this,v,c,g,p,T),this.addFile(C.files);return this}),h.exports=f},16024:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g){var p="css";if(o(v)){var T=v;v=r(T,"key"),c=r(T,"url"),g=r(T,"xhrSettings"),p=r(T,"extension",p)}var C={type:"script",cache:!1,extension:p,responseType:"text",key:v,url:c,xhrSettings:g};i.call(this,f,C)},onProcess:function(){this.state=l.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});s.register("css",function(u,f,v){if(Array.isArray(u))for(var c=0;c<u.length;c++)this.addFile(new a(this,u[c]));else this.addFile(new a(this,u,f,v));return this}),h.exports=a},69559:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(38734),l=t(85722),i=t(83419),s=t(74099),r=t(95540),o=t(19550),a=t(41212),u=t(518),f=t(31403),v=t(46975),c=t(59327),g=t(26430),p=t(82038),T=t(55222),C=new i({Extends:g,initialize:function(A,R,P,L){if(P.multiAtlasURL){var F=new u(A,{key:R,url:P.multiAtlasURL,xhrSettings:L,config:P});g.call(this,A,"texture",R,[F])}else{var w=P.textureURL.substr(P.textureURL.length-3);P.type||(P.type=w.toLowerCase()==="ktx"?"KTX":"PVR");var O=new l(A,{key:R,url:P.textureURL,extension:w,xhrSettings:L,config:P});if(P.atlasURL){var B=new u(A,{key:R,url:P.atlasURL,xhrSettings:L,config:P});g.call(this,A,"texture",R,[O,B])}else g.call(this,A,"texture",R,[O])}this.config=P},onFileComplete:function(M){var A=this.files.indexOf(M);if(A!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(M.type==="json"&&M.data.hasOwnProperty("textures")){var R=M.data.textures,P=this.config,L=this.loader,F=L.baseURL,w=L.path,O=L.prefix,B=r(P,"multiBaseURL",this.baseURL),I=r(P,"multiPath",this.path),D=r(P,"prefix",this.prefix),N=r(P,"textureXhrSettings");B&&L.setBaseURL(B),I&&L.setPath(I),D&&L.setPrefix(D);for(var z=0;z<R.length;z++){var V=R[z].image,U="CMA"+this.multiKeyIndex+"_"+V,G=new l(L,U,V,N);if(this.addToMultiFile(G),L.addFile(G),R[z].normalMap){var b=new l(L,U,R[z].normalMap,N);b.type="normalMap",G.setLink(b),this.addToMultiFile(b),L.addFile(b)}}L.setBaseURL(F),L.setPath(w),L.setPrefix(O)}}},addToCache:function(){function M(B){console.warn('Compressed Texture Invalid: "'+F.key+'". '+B)}if(this.isReadyToProcess()){var A=this.config;if(A.multiAtlasURL)this.addMultiToCache();else{var R=this.loader.systems.renderer,P=this.loader.textureManager,L,F=this.files[0],w=this.files[1];if(A.type==="PVR"?L=p(F.data):A.type==="KTX"&&(L=f(F.data),L||M("KTX file contains unsupported format.")),L&&!T(L)&&(M("Texture dimensions failed verification. Check the texture format specifications for "+A.format+" 0x"+L.internalFormat.toString(16)+"."),L=null),L&&!R.supportsCompressedTexture(A.format,L.internalFormat)&&(M("Texture format "+A.format+" with internal format "+L.internalFormat+" not supported by the GPU. Texture invalid. This is often due to the texture using sRGB instead of linear RGB."),L=null),L){L.format=R.getCompressedTextureName(A.format,L.internalFormat);var O=w&&w.data?w.data:null;P.addCompressedTexture(F.key,L,O)}}this.complete=!0}},addMultiToCache:function(){for(var M=this.config,A=this.files[0],R=[],P=[],L=[],F=this.loader.systems.renderer,w=this.loader.textureManager,O,B=1;B<this.files.length;B++){var I=this.files[B];if(I.type!=="normalMap")for(var D=I.key.indexOf("_"),N=I.key.substr(D+1),z=I.data,V=0;V<A.data.textures.length;V++){var U=A.data.textures[V];if(U.image===N){M.type==="PVR"?O=p(z):M.type==="KTX"&&(O=f(z)),O&&F.supportsCompressedTexture(M.format,O.internalFormat)&&(O.format=F.getCompressedTextureName(M.format,O.internalFormat),P.push(O),R.push(U),I.linkFile&&L.push(I.linkFile.data));break}}}L.length===0&&(L=void 0),w.addAtlasJSONArray(this.key,P,R,L),this.complete=!0}});s.register("texture",function(M,A,R){var P=this.systems.renderer,L=function(w,O,B,I){var D={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(a(O)){var N=O;O=r(N,"key"),B=r(N,"url"),I=r(N,"xhrSettings")}var z=!1;for(var V in B)if(P.supportsCompressedTexture(V)){var U=B[V];typeof U=="string"?D.textureURL=U:D=v(U,D),D.format=V.toUpperCase(),z=!0;break}if(!z)console.warn("No supported compressed texture format or IMG fallback",O);else if(D.format==="IMG"){var G,b;D.multiAtlasURL?(b=new c(w,O,D.multiAtlasURL,D.multiPath,D.multiBaseURL,I),G=b.files):D.atlasURL?(b=new e(w,O,D.textureURL,D.atlasURL,I),G=b.files):G=new o(w,O,D.textureURL,I),w.addFile(G)}else{var Y=new C(w,O,D,I);w.addFile(Y.files)}};if(Array.isArray(M))for(var F=0;F<M.length;F++)L(this,M[F]);else L(this,M,A,R);return this}),h.exports=C},87674:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(98356),a=t(41212),u=new e({Extends:i,initialize:function(v,c,g,p,T,C){var M="ttf";if(a(c)){var A=c;c=r(A,"key"),g=r(A,"url"),p=r(A,"format","truetype"),T=r(A,"descriptors",null),C=r(A,"xhrSettings"),M=r(A,"extension",M)}else p===void 0&&(p="truetype");var R={type:"font",cache:!1,extension:M,responseType:"text",key:c,url:g,xhrSettings:C};i.call(this,v,R),this.data={format:p,descriptors:T},this.state=l.FILE_POPULATED},onProcess:function(){this.state=l.FILE_PROCESSING,this.src=o(this,this.loader.baseURL);var f,v=this.key,c="url("+this.src+') format("'+this.data.format+'")';this.data.descriptors?f=new FontFace(v,c,this.data.descriptors):f=new FontFace(v,c);var g=this;f.load().then(function(){document.fonts.add(f),document.body.classList.add("fonts-loaded"),g.onProcessComplete()}).catch(function(){console.warn("Font failed to load",c),g.onProcessComplete()})}});s.register("font",function(f,v,c,g,p){if(Array.isArray(f))for(var T=0;T<f.length;T++)this.addFile(new u(this,f[T]));else this.addFile(new u(this,f,v,c,g,p));return this}),h.exports=u},47931:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=t(73894),u=new e({Extends:i,initialize:function(v,c,g,p){var T="glsl";if(o(c)){var C=c;c=r(C,"key"),g=r(C,"url"),p=r(C,"xhrSettings"),T=r(C,"extension",T)}var M={type:"glsl",cache:v.cacheManager.shader,extension:T,responseType:"text",key:c,url:g,xhrSettings:p};i.call(this,v,M)},onProcess:function(){this.state=l.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){this.cache.add(this.key,new a(this.key,this.data))}});s.register("glsl",function(f,v,c){if(Array.isArray(f))for(var g=0;g<f.length;g++)this.addFile(new u(this,f[g]));else this.addFile(new u(this,f,v,c));return this}),h.exports=u},89749:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(54899),i=t(41299),s=t(95540),r=t(98356),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g){if(o(v)){var p=v;v=s(p,"key"),g=s(p,"config",g)}var T={type:"audio",cache:f.cacheManager.audio,extension:c.type,key:v,url:c.url,config:g};i.call(this,f,T),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 u=0;u<this.data.length;u++){var f=this.data[u];f.oncanplaythrough=null,f.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(u){var f=u.target;f.oncanplaythrough=null,f.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(l.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var u=this.config&&this.config.instances||1;this.filesTotal=u,this.filesLoaded=0,this.percentComplete=0;for(var f=0;f<u;f++){var v=new Audio;v.dataset||(v.dataset={}),v.dataset.name=this.key+("0"+f).slice(-2),v.dataset.used="false",this.locked?v.dataset.locked="true":(v.dataset.locked="false",v.preload="auto",v.oncanplaythrough=this.onProgress.bind(this),v.onerror=this.onError.bind(this)),this.data.push(v)}for(f=0;f<this.data.length;f++)v=this.data[f],v.src=r(this,this.loader.baseURL),this.locked||v.load();this.locked&&setTimeout(this.onLoad.bind(this))}});h.exports=a},88470:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g){var p="html";if(o(v)){var T=v;v=r(T,"key"),c=r(T,"url"),g=r(T,"xhrSettings"),p=r(T,"extension",p)}var C={type:"text",cache:f.cacheManager.html,extension:p,responseType:"text",key:v,url:c,xhrSettings:g};i.call(this,f,C)},onProcess:function(){this.state=l.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("html",function(u,f,v){if(Array.isArray(u))for(var c=0;c<u.length;c++)this.addFile(new a(this,u[c]));else this.addFile(new a(this,u,f,v));return this}),h.exports=a},14643:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g,p,T){g===void 0&&(g=512),p===void 0&&(p=512);var C="html";if(o(v)){var M=v;v=r(M,"key"),c=r(M,"url"),T=r(M,"xhrSettings"),C=r(M,"extension",C),g=r(M,"width",g),p=r(M,"height",p)}var A={type:"html",cache:f.textureManager,extension:C,responseType:"text",key:v,url:c,xhrSettings:T,config:{width:g,height:p}};i.call(this,f,A)},onProcess:function(){this.state=l.FILE_PROCESSING;var u=this.config.width,f=this.config.height,v=[];v.push('<svg width="'+u+'px" height="'+f+'px" viewBox="0 0 '+u+" "+f+'" xmlns="http://www.w3.org/2000/svg">'),v.push('<foreignObject width="100%" height="100%">'),v.push('<body xmlns="http://www.w3.org/1999/xhtml">'),v.push(this.xhrLoader.responseText),v.push("</body>"),v.push("</foreignObject>"),v.push("</svg>");var c=[v.join(`
|
||
`)],g=this;try{var p=new window.Blob(c,{type:"image/svg+xml;charset=utf-8"})}catch{g.state=l.FILE_ERRORED,g.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){i.revokeObjectURL(g.data),g.onProcessComplete()},this.data.onerror=function(){i.revokeObjectURL(g.data),g.onProcessError()},i.createObjectURL(this.data,p,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});s.register("htmlTexture",function(u,f,v,c,g){if(Array.isArray(u))for(var p=0;p<u.length;p++)this.addFile(new a(this,u[p]));else this.addFile(new a(this,u,f,v,c,g));return this}),h.exports=a},19550:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=t(98356),u=new e({Extends:i,initialize:function f(v,c,g,p,T){var C="png",M;if(o(c)){var A=c;c=r(A,"key"),g=r(A,"url"),M=r(A,"normalMap"),p=r(A,"xhrSettings"),C=r(A,"extension",C),T=r(A,"frameConfig")}Array.isArray(g)&&(M=g[1],g=g[0]);var R={type:"image",cache:v.textureManager,extension:C,responseType:"blob",key:c,url:g,xhrSettings:p,config:T};if(i.call(this,v,R),M){var P=new f(v,this.key,M,p,T);P.type="normalMap",this.setLink(P),v.addFile(P)}this.useImageElementLoad=v.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=l.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var f=this;this.data.onload=function(){i.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){i.revokeObjectURL(f.data),f.onProcessError()},i.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var f=this.state;this.state=l.FILE_PROCESSING,f===l.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=l.FILE_LOADING,this.src=a(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var f=this;this.data.onload=function(){f.state=l.FILE_LOADED,f.loader.nextFile(f,!0)},this.data.onerror=function(){f.loader.nextFile(f,!1)},this.data.src=this.src},addToCache:function(){var f=this.linkFile;f?f.state>=l.FILE_COMPLETE&&(f.type==="spritesheet"?f.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,f.data,this.data):this.cache.addImage(this.key,this.data,f.data)):this.cache.addImage(this.key,this.data)}});s.register("image",function(f,v,c){if(Array.isArray(f))for(var g=0;g<f.length;g++)this.addFile(new u(this,f[g]));else this.addFile(new u(this,f,v,c));return this}),h.exports=u},518:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(35154),a=t(41212),u=new e({Extends:i,initialize:function(v,c,g,p,T){var C="json";if(a(c)){var M=c;c=r(M,"key"),g=r(M,"url"),p=r(M,"xhrSettings"),C=r(M,"extension",C),T=r(M,"dataKey",T)}var A={type:"json",cache:v.cacheManager.json,extension:C,responseType:"text",key:c,url:g,xhrSettings:p,config:T};i.call(this,v,A),a(g)&&(T?this.data=o(g,T):this.data=g,this.state=l.FILE_POPULATED)},onProcess:function(){if(this.state!==l.FILE_POPULATED){this.state=l.FILE_PROCESSING;try{var f=JSON.parse(this.xhrLoader.responseText)}catch(c){throw this.onProcessError(),c}var v=this.config;typeof v=="string"?this.data=o(f,v,f):this.data=f}this.onProcessComplete()}});s.register("json",function(f,v,c,g){if(Array.isArray(f))for(var p=0;p<f.length;p++)this.addFile(new u(this,f[p]));else this.addFile(new u(this,f,v,g,c));return this}),h.exports=u},59327:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(95540),s=t(19550),r=t(41212),o=t(518),a=t(26430),u=new e({Extends:a,initialize:function(v,c,g,p,T,C,M){if(r(c)){var A=c;c=i(A,"key"),i(A,"url",!1)?g=i(A,"url"):g=i(A,"atlasURL"),C=i(A,"xhrSettings"),p=i(A,"path"),T=i(A,"baseURL"),M=i(A,"textureXhrSettings")}var R=new o(v,c,g,C);a.call(this,v,"multiatlas",c,[R]),this.config.path=p,this.config.baseURL=T,this.config.textureXhrSettings=M},onFileComplete:function(f){var v=this.files.indexOf(f);if(v!==-1&&(this.pending--,f.type==="json"&&f.data.hasOwnProperty("textures"))){var c=f.data.textures,g=this.config,p=this.loader,T=p.baseURL,C=p.path,M=p.prefix,A=i(g,"baseURL",this.baseURL),R=i(g,"path",this.path),P=i(g,"prefix",this.prefix),L=i(g,"textureXhrSettings");p.setBaseURL(A),p.setPath(R),p.setPrefix(P);for(var F=0;F<c.length;F++){var w=c[F].image,O="MA"+this.multiKeyIndex+"_"+w,B=new s(p,O,w,L);if(this.addToMultiFile(B),p.addFile(B),c[F].normalMap){var I=new s(p,O,c[F].normalMap,L);I.type="normalMap",B.setLink(I),this.addToMultiFile(I),p.addFile(I)}}p.setBaseURL(T),p.setPath(C),p.setPrefix(M)}},addToCache:function(){if(this.isReadyToProcess()){for(var f=this.files[0],v=[],c=[],g=[],p=1;p<this.files.length;p++){var T=this.files[p];if(T.type!=="normalMap")for(var C=T.key.indexOf("_"),M=T.key.substr(C+1),A=T.data,R=0;R<f.data.textures.length;R++){var P=f.data.textures[R];if(P.image===M){c.push(A),v.push(P),T.linkFile&&g.push(T.linkFile.data);break}}}g.length===0&&(g=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,c,v,g),this.complete=!0}}});l.register("multiatlas",function(f,v,c,g,p){var T;if(Array.isArray(f))for(var C=0;C<f.length;C++)T=new u(this,f[C]),this.addFile(T.files);else T=new u(this,f,v,c,g,p),this.addFile(T.files);return this}),h.exports=u},99297:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(95540),s=t(41212),r=t(26430),o=t(34328),a=new e({Extends:r,initialize:function(f,v,c,g){var p="js",T=[];if(s(v)){var C=v;v=i(C,"key"),c=i(C,"url"),g=i(C,"xhrSettings"),p=i(C,"extension",p)}Array.isArray(c)||(c=[c]);for(var M=0;M<c.length;M++){var A=new o(f,{key:v+"_"+M.toString(),url:c[M],extension:p,xhrSettings:g});A.onProcess=function(){this.onProcessComplete()},T.push(A)}r.call(this,f,"scripts",v,T)},addToCache:function(){if(this.isReadyToProcess()){for(var u=0;u<this.files.length;u++){var f=this.files[u];f.data=document.createElement("script"),f.data.language="javascript",f.data.type="text/javascript",f.data.defer=!1,f.data.text=f.xhrLoader.responseText,document.head.appendChild(f.data)}this.complete=!0}}});l.register("scripts",function(u,f,v){var c;if(Array.isArray(u))for(var g=0;g<u.length;g++)c=new a(this,u[g]),this.addFile(c.files);else c=new a(this,u,f,v),this.addFile(c.files);return this}),h.exports=a},58610:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(74099),s=t(518),r=new e({Extends:s,initialize:function(a,u,f,v,c){s.call(this,a,u,f,v,c),this.type="packfile"},onProcess:function(){if(this.state!==l.FILE_POPULATED&&(this.state=l.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var o={};o[this.config]=this.data,this.data=o}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});i.register("pack",function(o,a,u,f){if(Array.isArray(o))for(var v=0;v<o.length;v++)this.addFile(new r(this,o[v]));else this.addFile(new r(this,o,a,f,u));return this}),h.exports=r},48988:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g,p,T){var C="js";if(o(v)){var M=v;v=r(M,"key"),c=r(M,"url"),T=r(M,"xhrSettings"),C=r(M,"extension",C),g=r(M,"start"),p=r(M,"mapping")}var A={type:"plugin",cache:!1,extension:C,responseType:"text",key:v,url:c,xhrSettings:T,config:{start:g,mapping:p}};i.call(this,f,A),typeof c=="function"&&(this.data=c,this.state=l.FILE_POPULATED)},onProcess:function(){var u=this.loader.systems.plugins,f=this.config,v=r(f,"start",!1),c=r(f,"mapping",null);if(this.state===l.FILE_POPULATED)u.install(this.key,this.data,v,c);else{this.state=l.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 g=u.install(this.key,window[this.key],v,c);(v||c)&&(this.loader.systems[c]=g,this.loader.scene[c]=g)}this.onProcessComplete()}});s.register("plugin",function(u,f,v,c,g){if(Array.isArray(u))for(var p=0;p<u.length;p++)this.addFile(new a(this,u[p]));else this.addFile(new a(this,u,f,v,c,g));return this}),h.exports=a},67397:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g,p){var T="svg";if(o(v)){var C=v;v=r(C,"key"),c=r(C,"url"),g=r(C,"svgConfig",{}),p=r(C,"xhrSettings"),T=r(C,"extension",T)}var M={type:"svg",cache:f.textureManager,extension:T,responseType:"text",key:v,url:c,xhrSettings:p,config:{width:r(g,"width"),height:r(g,"height"),scale:r(g,"scale")}};i.call(this,f,M)},onProcess:function(){this.state=l.FILE_PROCESSING;var u=this.xhrLoader.responseText,f=[u],v=this.config.width,c=this.config.height,g=this.config.scale;t:if(v&&c||g){var p=null,T=new DOMParser;p=T.parseFromString(u,"text/xml");var C=p.getElementsByTagName("svg")[0],M=C.hasAttribute("viewBox"),A=parseFloat(C.getAttribute("width")),R=parseFloat(C.getAttribute("height"));if(!M&&A&&R)C.setAttribute("viewBox","0 0 "+A+" "+R);else if(M&&!A&&!R){var P=C.getAttribute("viewBox").split(/\s+|,/);A=P[2],R=P[3]}if(g)if(A&&R)v=A*g,c=R*g;else break t;C.setAttribute("width",v.toString()+"px"),C.setAttribute("height",c.toString()+"px"),f=[new XMLSerializer().serializeToString(C)]}try{var L=new window.Blob(f,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var F=this,w=!1;this.data.onload=function(){w||i.revokeObjectURL(F.data),F.onProcessComplete()},this.data.onerror=function(){w?F.onProcessError():(w=!0,i.revokeObjectURL(F.data),F.data.src="data:image/svg+xml,"+encodeURIComponent(f.join("")))},i.createObjectURL(this.data,L,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});s.register("svg",function(u,f,v,c){if(Array.isArray(u))for(var g=0;g<u.length;g++)this.addFile(new a(this,u[g]));else this.addFile(new a(this,u,f,v,c));return this}),h.exports=a},88423:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g){var p="js";if(o(v)){var T=v;v=r(T,"key"),c=r(T,"url"),g=r(T,"xhrSettings"),p=r(T,"extension",p)}var C={type:"text",extension:p,responseType:"text",key:v,url:c,xhrSettings:g};i.call(this,f,C)},onProcess:function(){this.state=l.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var u=this.data.concat(`(function(){
|
||
return new `+this.key+`();
|
||
}).call(this);`),f=eval;this.loader.sceneManager.add(this.key,f(u)),this.complete=!0}});s.register("sceneFile",function(u,f,v){if(Array.isArray(u))for(var c=0;c<u.length;c++)this.addFile(new a(this,u[c]));else this.addFile(new a(this,u,f,v));return this}),h.exports=a},56812:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g,p,T){var C="js";if(o(v)){var M=v;v=r(M,"key"),c=r(M,"url"),T=r(M,"xhrSettings"),C=r(M,"extension",C),g=r(M,"systemKey"),p=r(M,"sceneKey")}var A={type:"scenePlugin",cache:!1,extension:C,responseType:"text",key:v,url:c,xhrSettings:T,config:{systemKey:g,sceneKey:p}};i.call(this,f,A),typeof c=="function"&&(this.data=c,this.state=l.FILE_POPULATED)},onProcess:function(){var u=this.loader.systems.plugins,f=this.config,v=this.key,c=r(f,"systemKey",v),g=r(f,"sceneKey",v);this.state===l.FILE_POPULATED?u.installScenePlugin(c,this.data,g,this.loader.scene,!0):(this.state=l.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),u.installScenePlugin(c,window[this.key],g,this.loader.scene,!0)),this.onProcessComplete()}});s.register("scenePlugin",function(u,f,v,c,g){if(Array.isArray(u))for(var p=0;p<u.length;p++)this.addFile(new a(this,u[p]));else this.addFile(new a(this,u,f,v,c,g));return this}),h.exports=a},34328:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g,p){var T="js";if(o(v)){var C=v;v=r(C,"key"),c=r(C,"url"),g=r(C,"type","script"),p=r(C,"xhrSettings"),T=r(C,"extension",T)}else g===void 0&&(g="script");var M={type:g,cache:!1,extension:T,responseType:"text",key:v,url:c,xhrSettings:p};i.call(this,f,M)},onProcess:function(){this.state=l.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()}});s.register("script",function(u,f,v,c){if(Array.isArray(u))for(var g=0;g<u.length;g++)this.addFile(new a(this,u[g]));else this.addFile(new a(this,u,f,v,c));return this}),h.exports=a},85035:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(74099),s=t(19550),r=new e({Extends:s,initialize:function(a,u,f,v,c){s.call(this,a,u,f,c,v),this.type="spritesheet"},addToCache:function(){var o=this.linkFile;o?o.state>=l.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,o.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,o.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});i.register("spritesheet",function(o,a,u,f){if(Array.isArray(o))for(var v=0;v<o.length;v++)this.addFile(new r(this,o[v]));else this.addFile(new r(this,o,a,u,f));return this}),h.exports=r},78776:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=new e({Extends:i,initialize:function(f,v,c,g){var p="text",T="txt",C=f.cacheManager.text;if(o(v)){var M=v;v=r(M,"key"),c=r(M,"url"),g=r(M,"xhrSettings"),T=r(M,"extension",T),p=r(M,"type",p),C=r(M,"cache",C)}var A={type:p,cache:C,extension:T,responseType:"text",key:v,url:c,xhrSettings:g};i.call(this,f,A)},onProcess:function(){this.state=l.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(u,f,v){if(Array.isArray(u))for(var c=0;c<u.length;c++)this.addFile(new a(this,u[c]));else this.addFile(new a(this,u,f,v));return this}),h.exports=a},49477:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=t(80341),u=new e({Extends:i,initialize:function(v,c,g,p){var T="csv";if(o(c)){var C=c;c=r(C,"key"),g=r(C,"url"),p=r(C,"xhrSettings"),T=r(C,"extension",T)}var M={type:"tilemapCSV",cache:v.cacheManager.tilemap,extension:T,responseType:"text",key:c,url:g,xhrSettings:p};i.call(this,v,M),this.tilemapFormat=a.CSV},onProcess:function(){this.state=l.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var f={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,f)}});s.register("tilemapCSV",function(f,v,c){if(Array.isArray(f))for(var g=0;g<f.length;g++)this.addFile(new u(this,f[g]));else this.addFile(new u(this,f,v,c));return this}),h.exports=u},40807:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(518),s=t(80341),r=new e({Extends:i,initialize:function(a,u,f,v){i.call(this,a,u,f,v),this.type="tilemapJSON",this.cache=a.cacheManager.tilemap},addToCache:function(){var o={format:s.WELTMEISTER,data:this.data};this.cache.add(this.key,o)}});l.register("tilemapImpact",function(o,a,u){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new r(this,o[f]));else this.addFile(new r(this,o,a,u));return this}),h.exports=r},56775:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(518),s=t(80341),r=new e({Extends:i,initialize:function(a,u,f,v){i.call(this,a,u,f,v),this.type="tilemapJSON",this.cache=a.cacheManager.tilemap},addToCache:function(){var o={format:s.TILED_JSON,data:this.data};this.cache.add(this.key,o)}});l.register("tilemapTiledJSON",function(o,a,u){if(Array.isArray(o))for(var f=0;f<o.length;f++)this.addFile(new r(this,o[f]));else this.addFile(new r(this,o,a,u));return this}),h.exports=r},25771:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(74099),i=t(95540),s=t(19550),r=t(41212),o=t(26430),a=t(78776),u=new e({Extends:o,initialize:function(v,c,g,p,T,C){var M,A;if(r(c)){var R=c;c=i(R,"key"),M=new s(v,{key:c,url:i(R,"textureURL"),extension:i(R,"textureExtension","png"),normalMap:i(R,"normalMap"),xhrSettings:i(R,"textureXhrSettings")}),A=new a(v,{key:c,url:i(R,"atlasURL"),extension:i(R,"atlasExtension","txt"),xhrSettings:i(R,"atlasXhrSettings")})}else M=new s(v,c,g,T),A=new a(v,c,p,C);M.linkFile?o.call(this,v,"unityatlas",c,[M,A,M.linkFile]):o.call(this,v,"unityatlas",c,[M,A])},addToCache:function(){if(this.isReadyToProcess()){var f=this.files[0],v=this.files[1],c=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(f.key,f.data,v.data,c),this.complete=!0}}});l.register("unityAtlas",function(f,v,c,g,p){var T;if(Array.isArray(f))for(var C=0;C<f.length;C++)T=new u(this,f[C]),this.addFile(T.files);else T=new u(this,f,v,c,g,p),this.addFile(T.files);return this}),h.exports=u},33720:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(98356),o=t(95540),a=t(41212),u=new e({Extends:i,initialize:function(v,c,g,p){if(p===void 0&&(p=!1),a(c)){var T=c;c=o(T,"key"),g=o(T,"url",[]),p=o(T,"noAudio",!1)}var C=v.systems.game.device.video.getVideoURL(g);C||console.warn("VideoFile: No supported format for "+c);var M={type:"video",cache:v.cacheManager.video,extension:C.type,key:c,url:C.url,config:{noAudio:p}};i.call(this,v,M)},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=l.FILE_LOADED,this.loader.nextFile(this,!0)}});s.register("video",function(f,v,c){if(Array.isArray(f))for(var g=0;g<f.length;g++)this.addFile(new u(this,f[g]));else this.addFile(new u(this,f,v,c));return this}),h.exports=u},57318:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(23906),i=t(41299),s=t(74099),r=t(95540),o=t(41212),a=t(56836),u=new e({Extends:i,initialize:function(v,c,g,p){var T="xml";if(o(c)){var C=c;c=r(C,"key"),g=r(C,"url"),p=r(C,"xhrSettings"),T=r(C,"extension",T)}var M={type:"xml",cache:v.cacheManager.xml,extension:T,responseType:"text",key:c,url:g,xhrSettings:p};i.call(this,v,M)},onProcess:function(){this.state=l.FILE_PROCESSING,this.data=a(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});s.register("xml",function(f,v,c){if(Array.isArray(f))for(var g=0;g<f.length;g++)this.addFile(new u(this,f[g]));else this.addFile(new u(this,f,v,c));return this}),h.exports=u},64589:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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),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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(23906),l=t(79291),i={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)};i=l(!1,i,e),h.exports=i},53307:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){for(var e=0,l=0;l<t.length;l++)e+=+t[l];return e/t.length};h.exports=d},85710:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(6411),l=function(i,s){return e(i)/e(s)/e(i-s)};h.exports=l},30976:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)};h.exports=d},87842:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s){var r=(i-e)*.5,o=(s-l)*.5,a=t*t,u=t*a;return(2*l-2*i+r+o)*u+(-3*l+3*i-2*r-o)*a+r*t+l};h.exports=d},26302:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){e===void 0&&(e=0),l===void 0&&(l=10);var i=Math.pow(l,-e);return Math.ceil(t*i)/i};h.exports=d},45319:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return Math.max(e,Math.min(l,t))};h.exports=d},39506:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=function(i){return i*e.DEG_TO_RAD};h.exports=l},61241:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return Math.abs(t-e)};h.exports=d},38857:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(37867),s=t(29747),r=new i,o=new l({initialize:function a(u,f,v,c){u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c=a.DefaultOrder),this._x=u,this._y=f,this._z=v,this._order=c,this.onChangeCallback=s},x:{get:function(){return this._x},set:function(a){this._x=a,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(a){this._y=a,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(a){this._z=a,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(a){this._order=a,this.onChangeCallback(this)}},set:function(a,u,f,v){return v===void 0&&(v=this._order),this._x=a,this._y=u,this._z=f,this._order=v,this.onChangeCallback(this),this},copy:function(a){return this.set(a.x,a.y,a.z,a.order)},setFromQuaternion:function(a,u,f){return u===void 0&&(u=this._order),f===void 0&&(f=!1),r.fromQuat(a),this.setFromRotationMatrix(r,u,f)},setFromRotationMatrix:function(a,u,f){u===void 0&&(u=this._order),f===void 0&&(f=!1);var v=a.val,c=v[0],g=v[4],p=v[8],T=v[1],C=v[5],M=v[9],A=v[2],R=v[6],P=v[10],L=0,F=0,w=0,O=.99999;switch(u){case"XYZ":{F=Math.asin(e(p,-1,1)),Math.abs(p)<O?(L=Math.atan2(-M,P),w=Math.atan2(-g,c)):L=Math.atan2(R,C);break}case"YXZ":{L=Math.asin(-e(M,-1,1)),Math.abs(M)<O?(F=Math.atan2(p,P),w=Math.atan2(T,C)):F=Math.atan2(-A,c);break}case"ZXY":{L=Math.asin(e(R,-1,1)),Math.abs(R)<O?(F=Math.atan2(-A,P),w=Math.atan2(-g,C)):w=Math.atan2(T,c);break}case"ZYX":{F=Math.asin(-e(A,-1,1)),Math.abs(A)<O?(L=Math.atan2(R,P),w=Math.atan2(T,c)):w=Math.atan2(-g,C);break}case"YZX":{w=Math.asin(e(T,-1,1)),Math.abs(T)<O?(L=Math.atan2(-M,C),F=Math.atan2(-A,c)):F=Math.atan2(p,P);break}case"XZY":{w=Math.asin(-e(g,-1,1)),Math.abs(g)<O?(L=Math.atan2(R,C),F=Math.atan2(p,c)):L=Math.atan2(-M,P);break}}return this._x=L,this._y=F,this._z=w,this._order=u,f&&this.onChangeCallback(this),this}});o.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],o.DefaultOrder="XYZ",h.exports=o},6411:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){if(t===0)return 1;for(var e=t;--t;)e*=t;return e};h.exports=d},99472:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return Math.random()*(e-t)+t};h.exports=d},77623:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){e===void 0&&(e=0),l===void 0&&(l=10);var i=Math.pow(l,-e);return Math.floor(t*i)/i};h.exports=d},62945:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=function(i,s,r){return i=e(i,0,1),(r-s)*i+s};h.exports=l},2672:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s){s===void 0&&(s=new e);var r=i.length;if(!Array.isArray(i)||r===0)throw new Error("GetCentroid points be a non-empty array");if(r===1)s.x=i[0].x,s.y=i[0].y;else{for(var o=0;o<r;o++)s.x+=i[o].x,s.y+=i[o].y;s.x/=r,s.y/=r}return s};h.exports=l},38265:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t/e/1e3};h.exports=d},55133:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=function(i,s){s===void 0&&(s=new e);for(var r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=0;f<i.length;f++){var v=i[f];v.x>r&&(r=v.x),v.x<o&&(o=v.x),v.y>a&&(a=v.y),v.y<u&&(u=v.y)}return s.x=o,s.y=u,s.width=r-o,s.height=a-u,s};h.exports=l},78702:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t==parseFloat(t)?!(t%2):void 0};h.exports=d},94883:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t===parseFloat(t)?!(t%2):void 0};h.exports=d},28915:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return(e-t)*l+t};h.exports=d},94908:h=>{/**
|
||
* @author Greg McLean <GregDevProjects>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return l===void 0&&(l=0),t.clone().lerp(e,l)};h.exports=d},94434:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s){this.val=new Float32Array(9),s?this.copy(s):this.identity()},clone:function(){return new l(this)},set:function(i){return this.copy(i)},copy:function(i){var s=this.val,r=i.val;return s[0]=r[0],s[1]=r[1],s[2]=r[2],s[3]=r[3],s[4]=r[4],s[5]=r[5],s[6]=r[6],s[7]=r[7],s[8]=r[8],this},fromMat4:function(i){var s=i.val,r=this.val;return r[0]=s[0],r[1]=s[1],r[2]=s[2],r[3]=s[4],r[4]=s[5],r[5]=s[6],r[6]=s[8],r[7]=s[9],r[8]=s[10],this},fromArray:function(i){var s=this.val;return s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s[4]=i[4],s[5]=i[5],s[6]=i[6],s[7]=i[7],s[8]=i[8],this},identity:function(){var i=this.val;return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=1,i[5]=0,i[6]=0,i[7]=0,i[8]=1,this},transpose:function(){var i=this.val,s=i[1],r=i[2],o=i[5];return i[1]=i[3],i[2]=i[6],i[3]=s,i[5]=i[7],i[6]=r,i[7]=o,this},invert:function(){var i=this.val,s=i[0],r=i[1],o=i[2],a=i[3],u=i[4],f=i[5],v=i[6],c=i[7],g=i[8],p=g*u-f*c,T=-g*a+f*v,C=c*a-u*v,M=s*p+r*T+o*C;return M?(M=1/M,i[0]=p*M,i[1]=(-g*r+o*c)*M,i[2]=(f*r-o*u)*M,i[3]=T*M,i[4]=(g*s-o*v)*M,i[5]=(-f*s+o*a)*M,i[6]=C*M,i[7]=(-c*s+r*v)*M,i[8]=(u*s-r*a)*M,this):null},adjoint:function(){var i=this.val,s=i[0],r=i[1],o=i[2],a=i[3],u=i[4],f=i[5],v=i[6],c=i[7],g=i[8];return i[0]=u*g-f*c,i[1]=o*c-r*g,i[2]=r*f-o*u,i[3]=f*v-a*g,i[4]=s*g-o*v,i[5]=o*a-s*f,i[6]=a*c-u*v,i[7]=r*v-s*c,i[8]=s*u-r*a,this},determinant:function(){var i=this.val,s=i[0],r=i[1],o=i[2],a=i[3],u=i[4],f=i[5],v=i[6],c=i[7],g=i[8];return s*(g*u-f*c)+r*(-g*a+f*v)+o*(c*a-u*v)},multiply:function(i){var s=this.val,r=s[0],o=s[1],a=s[2],u=s[3],f=s[4],v=s[5],c=s[6],g=s[7],p=s[8],T=i.val,C=T[0],M=T[1],A=T[2],R=T[3],P=T[4],L=T[5],F=T[6],w=T[7],O=T[8];return s[0]=C*r+M*u+A*c,s[1]=C*o+M*f+A*g,s[2]=C*a+M*v+A*p,s[3]=R*r+P*u+L*c,s[4]=R*o+P*f+L*g,s[5]=R*a+P*v+L*p,s[6]=F*r+w*u+O*c,s[7]=F*o+w*f+O*g,s[8]=F*a+w*v+O*p,this},translate:function(i){var s=this.val,r=i.x,o=i.y;return s[6]=r*s[0]+o*s[3]+s[6],s[7]=r*s[1]+o*s[4]+s[7],s[8]=r*s[2]+o*s[5]+s[8],this},rotate:function(i){var s=this.val,r=s[0],o=s[1],a=s[2],u=s[3],f=s[4],v=s[5],c=Math.sin(i),g=Math.cos(i);return s[0]=g*r+c*u,s[1]=g*o+c*f,s[2]=g*a+c*v,s[3]=g*u-c*r,s[4]=g*f-c*o,s[5]=g*v-c*a,this},scale:function(i){var s=this.val,r=i.x,o=i.y;return s[0]=r*s[0],s[1]=r*s[1],s[2]=r*s[2],s[3]=o*s[3],s[4]=o*s[4],s[5]=o*s[5],this},fromQuat:function(i){var s=i.x,r=i.y,o=i.z,a=i.w,u=s+s,f=r+r,v=o+o,c=s*u,g=s*f,p=s*v,T=r*f,C=r*v,M=o*v,A=a*u,R=a*f,P=a*v,L=this.val;return L[0]=1-(T+M),L[3]=g+P,L[6]=p-R,L[1]=g-P,L[4]=1-(c+M),L[7]=C+A,L[2]=p+R,L[5]=C-A,L[8]=1-(c+T),this},normalFromMat4:function(i){var s=i.val,r=this.val,o=s[0],a=s[1],u=s[2],f=s[3],v=s[4],c=s[5],g=s[6],p=s[7],T=s[8],C=s[9],M=s[10],A=s[11],R=s[12],P=s[13],L=s[14],F=s[15],w=o*c-a*v,O=o*g-u*v,B=o*p-f*v,I=a*g-u*c,D=a*p-f*c,N=u*p-f*g,z=T*P-C*R,V=T*L-M*R,U=T*F-A*R,G=C*L-M*P,b=C*F-A*P,Y=M*F-A*L,W=w*Y-O*b+B*G+I*U-D*V+N*z;return W?(W=1/W,r[0]=(c*Y-g*b+p*G)*W,r[1]=(g*U-v*Y-p*V)*W,r[2]=(v*b-c*U+p*z)*W,r[3]=(u*b-a*Y-f*G)*W,r[4]=(o*Y-u*U+f*V)*W,r[5]=(a*U-o*b-f*z)*W,r[6]=(P*N-L*D+F*I)*W,r[7]=(L*B-R*N-F*O)*W,r[8]=(R*D-P*B+F*w)*W,this):null}});h.exports=l},37867:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(25836),i=1e-6,s=new e({initialize:function(c){this.val=new Float32Array(16),c?this.copy(c):this.identity()},clone:function(){return new s(this)},set:function(v){return this.copy(v)},setValues:function(v,c,g,p,T,C,M,A,R,P,L,F,w,O,B,I){var D=this.val;return D[0]=v,D[1]=c,D[2]=g,D[3]=p,D[4]=T,D[5]=C,D[6]=M,D[7]=A,D[8]=R,D[9]=P,D[10]=L,D[11]=F,D[12]=w,D[13]=O,D[14]=B,D[15]=I,this},copy:function(v){var c=v.val;return this.setValues(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15])},fromArray:function(v){return this.setValues(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(v,c,g){var p=r.fromQuat(g),T=p.val,C=c.x,M=c.y,A=c.z;return this.setValues(T[0]*C,T[1]*C,T[2]*C,0,T[4]*M,T[5]*M,T[6]*M,0,T[8]*A,T[9]*A,T[10]*A,0,v.x,v.y,v.z,1)},xyz:function(v,c,g){this.identity();var p=this.val;return p[12]=v,p[13]=c,p[14]=g,this},scaling:function(v,c,g){this.zero();var p=this.val;return p[0]=v,p[5]=c,p[10]=g,p[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 v=this.val,c=v[1],g=v[2],p=v[3],T=v[6],C=v[7],M=v[11];return v[1]=v[4],v[2]=v[8],v[3]=v[12],v[4]=c,v[6]=v[9],v[7]=v[13],v[8]=g,v[9]=T,v[11]=v[14],v[12]=p,v[13]=C,v[14]=M,this},getInverse:function(v){return this.copy(v),this.invert()},invert:function(){var v=this.val,c=v[0],g=v[1],p=v[2],T=v[3],C=v[4],M=v[5],A=v[6],R=v[7],P=v[8],L=v[9],F=v[10],w=v[11],O=v[12],B=v[13],I=v[14],D=v[15],N=c*M-g*C,z=c*A-p*C,V=c*R-T*C,U=g*A-p*M,G=g*R-T*M,b=p*R-T*A,Y=P*B-L*O,W=P*I-F*O,H=P*D-w*O,X=L*I-F*B,K=L*D-w*B,Z=F*D-w*I,Q=N*Z-z*K+V*X+U*H-G*W+b*Y;return Q?(Q=1/Q,this.setValues((M*Z-A*K+R*X)*Q,(p*K-g*Z-T*X)*Q,(B*b-I*G+D*U)*Q,(F*G-L*b-w*U)*Q,(A*H-C*Z-R*W)*Q,(c*Z-p*H+T*W)*Q,(I*V-O*b-D*z)*Q,(P*b-F*V+w*z)*Q,(C*K-M*H+R*Y)*Q,(g*H-c*K-T*Y)*Q,(O*G-B*V+D*N)*Q,(L*V-P*G-w*N)*Q,(M*W-C*X-A*Y)*Q,(c*X-g*W+p*Y)*Q,(B*z-O*U-I*N)*Q,(P*U-L*z+F*N)*Q)):this},adjoint:function(){var v=this.val,c=v[0],g=v[1],p=v[2],T=v[3],C=v[4],M=v[5],A=v[6],R=v[7],P=v[8],L=v[9],F=v[10],w=v[11],O=v[12],B=v[13],I=v[14],D=v[15];return this.setValues(M*(F*D-w*I)-L*(A*D-R*I)+B*(A*w-R*F),-(g*(F*D-w*I)-L*(p*D-T*I)+B*(p*w-T*F)),g*(A*D-R*I)-M*(p*D-T*I)+B*(p*R-T*A),-(g*(A*w-R*F)-M*(p*w-T*F)+L*(p*R-T*A)),-(C*(F*D-w*I)-P*(A*D-R*I)+O*(A*w-R*F)),c*(F*D-w*I)-P*(p*D-T*I)+O*(p*w-T*F),-(c*(A*D-R*I)-C*(p*D-T*I)+O*(p*R-T*A)),c*(A*w-R*F)-C*(p*w-T*F)+P*(p*R-T*A),C*(L*D-w*B)-P*(M*D-R*B)+O*(M*w-R*L),-(c*(L*D-w*B)-P*(g*D-T*B)+O*(g*w-T*L)),c*(M*D-R*B)-C*(g*D-T*B)+O*(g*R-T*M),-(c*(M*w-R*L)-C*(g*w-T*L)+P*(g*R-T*M)),-(C*(L*I-F*B)-P*(M*I-A*B)+O*(M*F-A*L)),c*(L*I-F*B)-P*(g*I-p*B)+O*(g*F-p*L),-(c*(M*I-A*B)-C*(g*I-p*B)+O*(g*A-p*M)),c*(M*F-A*L)-C*(g*F-p*L)+P*(g*A-p*M))},determinant:function(){var v=this.val,c=v[0],g=v[1],p=v[2],T=v[3],C=v[4],M=v[5],A=v[6],R=v[7],P=v[8],L=v[9],F=v[10],w=v[11],O=v[12],B=v[13],I=v[14],D=v[15],N=c*M-g*C,z=c*A-p*C,V=c*R-T*C,U=g*A-p*M,G=g*R-T*M,b=p*R-T*A,Y=P*B-L*O,W=P*I-F*O,H=P*D-w*O,X=L*I-F*B,K=L*D-w*B,Z=F*D-w*I;return N*Z-z*K+V*X+U*H-G*W+b*Y},multiply:function(v){var c=this.val,g=c[0],p=c[1],T=c[2],C=c[3],M=c[4],A=c[5],R=c[6],P=c[7],L=c[8],F=c[9],w=c[10],O=c[11],B=c[12],I=c[13],D=c[14],N=c[15],z=v.val,V=z[0],U=z[1],G=z[2],b=z[3];return c[0]=V*g+U*M+G*L+b*B,c[1]=V*p+U*A+G*F+b*I,c[2]=V*T+U*R+G*w+b*D,c[3]=V*C+U*P+G*O+b*N,V=z[4],U=z[5],G=z[6],b=z[7],c[4]=V*g+U*M+G*L+b*B,c[5]=V*p+U*A+G*F+b*I,c[6]=V*T+U*R+G*w+b*D,c[7]=V*C+U*P+G*O+b*N,V=z[8],U=z[9],G=z[10],b=z[11],c[8]=V*g+U*M+G*L+b*B,c[9]=V*p+U*A+G*F+b*I,c[10]=V*T+U*R+G*w+b*D,c[11]=V*C+U*P+G*O+b*N,V=z[12],U=z[13],G=z[14],b=z[15],c[12]=V*g+U*M+G*L+b*B,c[13]=V*p+U*A+G*F+b*I,c[14]=V*T+U*R+G*w+b*D,c[15]=V*C+U*P+G*O+b*N,this},multiplyLocal:function(v){var c=this.val,g=v.val;return this.setValues(c[0]*g[0]+c[1]*g[4]+c[2]*g[8]+c[3]*g[12],c[0]*g[1]+c[1]*g[5]+c[2]*g[9]+c[3]*g[13],c[0]*g[2]+c[1]*g[6]+c[2]*g[10]+c[3]*g[14],c[0]*g[3]+c[1]*g[7]+c[2]*g[11]+c[3]*g[15],c[4]*g[0]+c[5]*g[4]+c[6]*g[8]+c[7]*g[12],c[4]*g[1]+c[5]*g[5]+c[6]*g[9]+c[7]*g[13],c[4]*g[2]+c[5]*g[6]+c[6]*g[10]+c[7]*g[14],c[4]*g[3]+c[5]*g[7]+c[6]*g[11]+c[7]*g[15],c[8]*g[0]+c[9]*g[4]+c[10]*g[8]+c[11]*g[12],c[8]*g[1]+c[9]*g[5]+c[10]*g[9]+c[11]*g[13],c[8]*g[2]+c[9]*g[6]+c[10]*g[10]+c[11]*g[14],c[8]*g[3]+c[9]*g[7]+c[10]*g[11]+c[11]*g[15],c[12]*g[0]+c[13]*g[4]+c[14]*g[8]+c[15]*g[12],c[12]*g[1]+c[13]*g[5]+c[14]*g[9]+c[15]*g[13],c[12]*g[2]+c[13]*g[6]+c[14]*g[10]+c[15]*g[14],c[12]*g[3]+c[13]*g[7]+c[14]*g[11]+c[15]*g[15])},premultiply:function(v){return this.multiplyMatrices(v,this)},multiplyMatrices:function(v,c){var g=v.val,p=c.val,T=g[0],C=g[4],M=g[8],A=g[12],R=g[1],P=g[5],L=g[9],F=g[13],w=g[2],O=g[6],B=g[10],I=g[14],D=g[3],N=g[7],z=g[11],V=g[15],U=p[0],G=p[4],b=p[8],Y=p[12],W=p[1],H=p[5],X=p[9],K=p[13],Z=p[2],Q=p[6],j=p[10],J=p[14],tt=p[3],k=p[7],q=p[11],_=p[15];return this.setValues(T*U+C*W+M*Z+A*tt,R*U+P*W+L*Z+F*tt,w*U+O*W+B*Z+I*tt,D*U+N*W+z*Z+V*tt,T*G+C*H+M*Q+A*k,R*G+P*H+L*Q+F*k,w*G+O*H+B*Q+I*k,D*G+N*H+z*Q+V*k,T*b+C*X+M*j+A*q,R*b+P*X+L*j+F*q,w*b+O*X+B*j+I*q,D*b+N*X+z*j+V*q,T*Y+C*K+M*J+A*_,R*Y+P*K+L*J+F*_,w*Y+O*K+B*J+I*_,D*Y+N*K+z*J+V*_)},translate:function(v){return this.translateXYZ(v.x,v.y,v.z)},translateXYZ:function(v,c,g){var p=this.val;return p[12]=p[0]*v+p[4]*c+p[8]*g+p[12],p[13]=p[1]*v+p[5]*c+p[9]*g+p[13],p[14]=p[2]*v+p[6]*c+p[10]*g+p[14],p[15]=p[3]*v+p[7]*c+p[11]*g+p[15],this},scale:function(v){return this.scaleXYZ(v.x,v.y,v.z)},scaleXYZ:function(v,c,g){var p=this.val;return p[0]=p[0]*v,p[1]=p[1]*v,p[2]=p[2]*v,p[3]=p[3]*v,p[4]=p[4]*c,p[5]=p[5]*c,p[6]=p[6]*c,p[7]=p[7]*c,p[8]=p[8]*g,p[9]=p[9]*g,p[10]=p[10]*g,p[11]=p[11]*g,this},makeRotationAxis:function(v,c){var g=Math.cos(c),p=Math.sin(c),T=1-g,C=v.x,M=v.y,A=v.z,R=T*C,P=T*M;return this.setValues(R*C+g,R*M-p*A,R*A+p*M,0,R*M+p*A,P*M+g,P*A-p*C,0,R*A-p*M,P*A+p*C,T*A*A+g,0,0,0,0,1)},rotate:function(v,c){var g=this.val,p=c.x,T=c.y,C=c.z,M=Math.sqrt(p*p+T*T+C*C);if(Math.abs(M)<i)return this;M=1/M,p*=M,T*=M,C*=M;var A=Math.sin(v),R=Math.cos(v),P=1-R,L=g[0],F=g[1],w=g[2],O=g[3],B=g[4],I=g[5],D=g[6],N=g[7],z=g[8],V=g[9],U=g[10],G=g[11],b=g[12],Y=g[13],W=g[14],H=g[15],X=p*p*P+R,K=T*p*P+C*A,Z=C*p*P-T*A,Q=p*T*P-C*A,j=T*T*P+R,J=C*T*P+p*A,tt=p*C*P+T*A,k=T*C*P-p*A,q=C*C*P+R;return this.setValues(L*X+B*K+z*Z,F*X+I*K+V*Z,w*X+D*K+U*Z,O*X+N*K+G*Z,L*Q+B*j+z*J,F*Q+I*j+V*J,w*Q+D*j+U*J,O*Q+N*j+G*J,L*tt+B*k+z*q,F*tt+I*k+V*q,w*tt+D*k+U*q,O*tt+N*k+G*q,b,Y,W,H)},rotateX:function(v){var c=this.val,g=Math.sin(v),p=Math.cos(v),T=c[4],C=c[5],M=c[6],A=c[7],R=c[8],P=c[9],L=c[10],F=c[11];return c[4]=T*p+R*g,c[5]=C*p+P*g,c[6]=M*p+L*g,c[7]=A*p+F*g,c[8]=R*p-T*g,c[9]=P*p-C*g,c[10]=L*p-M*g,c[11]=F*p-A*g,this},rotateY:function(v){var c=this.val,g=Math.sin(v),p=Math.cos(v),T=c[0],C=c[1],M=c[2],A=c[3],R=c[8],P=c[9],L=c[10],F=c[11];return c[0]=T*p-R*g,c[1]=C*p-P*g,c[2]=M*p-L*g,c[3]=A*p-F*g,c[8]=T*g+R*p,c[9]=C*g+P*p,c[10]=M*g+L*p,c[11]=A*g+F*p,this},rotateZ:function(v){var c=this.val,g=Math.sin(v),p=Math.cos(v),T=c[0],C=c[1],M=c[2],A=c[3],R=c[4],P=c[5],L=c[6],F=c[7];return c[0]=T*p+R*g,c[1]=C*p+P*g,c[2]=M*p+L*g,c[3]=A*p+F*g,c[4]=R*p-T*g,c[5]=P*p-C*g,c[6]=L*p-M*g,c[7]=F*p-A*g,this},fromRotationTranslation:function(v,c){var g=v.x,p=v.y,T=v.z,C=v.w,M=g+g,A=p+p,R=T+T,P=g*M,L=g*A,F=g*R,w=p*A,O=p*R,B=T*R,I=C*M,D=C*A,N=C*R;return this.setValues(1-(w+B),L+N,F-D,0,L-N,1-(P+B),O+I,0,F+D,O-I,1-(P+w),0,c.x,c.y,c.z,1)},fromQuat:function(v){var c=v.x,g=v.y,p=v.z,T=v.w,C=c+c,M=g+g,A=p+p,R=c*C,P=c*M,L=c*A,F=g*M,w=g*A,O=p*A,B=T*C,I=T*M,D=T*A;return this.setValues(1-(F+O),P+D,L-I,0,P-D,1-(R+O),w+B,0,L+I,w-B,1-(R+F),0,0,0,0,1)},frustum:function(v,c,g,p,T,C){var M=1/(c-v),A=1/(p-g),R=1/(T-C);return this.setValues(T*2*M,0,0,0,0,T*2*A,0,0,(c+v)*M,(p+g)*A,(C+T)*R,-1,0,0,C*T*2*R,0)},perspective:function(v,c,g,p){var T=1/Math.tan(v/2),C=1/(g-p);return this.setValues(T/c,0,0,0,0,T,0,0,0,0,(p+g)*C,-1,0,0,2*p*g*C,0)},perspectiveLH:function(v,c,g,p){return this.setValues(2*g/v,0,0,0,0,2*g/c,0,0,0,0,-p/(g-p),1,0,0,g*p/(g-p),0)},ortho:function(v,c,g,p,T,C){var M=v-c,A=g-p,R=T-C;return M=M===0?M:1/M,A=A===0?A:1/A,R=R===0?R:1/R,this.setValues(-2*M,0,0,0,0,-2*A,0,0,0,0,2*R,0,(v+c)*M,(p+g)*A,(C+T)*R,1)},lookAtRH:function(v,c,g){var p=this.val;return f.subVectors(v,c),f.lengthSq()===0&&(f.z=1),f.normalize(),a.crossVectors(g,f),a.lengthSq()===0&&(Math.abs(g.z)===1?f.x+=1e-4:f.z+=1e-4,f.normalize(),a.crossVectors(g,f)),a.normalize(),u.crossVectors(f,a),p[0]=a.x,p[1]=a.y,p[2]=a.z,p[4]=u.x,p[5]=u.y,p[6]=u.z,p[8]=f.x,p[9]=f.y,p[10]=f.z,this},lookAt:function(v,c,g){var p=v.x,T=v.y,C=v.z,M=g.x,A=g.y,R=g.z,P=c.x,L=c.y,F=c.z;if(Math.abs(p-P)<i&&Math.abs(T-L)<i&&Math.abs(C-F)<i)return this.identity();var w=p-P,O=T-L,B=C-F,I=1/Math.sqrt(w*w+O*O+B*B);w*=I,O*=I,B*=I;var D=A*B-R*O,N=R*w-M*B,z=M*O-A*w;I=Math.sqrt(D*D+N*N+z*z),I?(I=1/I,D*=I,N*=I,z*=I):(D=0,N=0,z=0);var V=O*z-B*N,U=B*D-w*z,G=w*N-O*D;return I=Math.sqrt(V*V+U*U+G*G),I?(I=1/I,V*=I,U*=I,G*=I):(V=0,U=0,G=0),this.setValues(D,V,w,0,N,U,O,0,z,G,B,0,-(D*p+N*T+z*C),-(V*p+U*T+G*C),-(w*p+O*T+B*C),1)},yawPitchRoll:function(v,c,g){this.zero(),r.zero(),o.zero();var p=this.val,T=r.val,C=o.val,M=Math.sin(g),A=Math.cos(g);return p[10]=1,p[15]=1,p[0]=A,p[1]=M,p[4]=-M,p[5]=A,M=Math.sin(c),A=Math.cos(c),T[0]=1,T[15]=1,T[5]=A,T[10]=A,T[9]=-M,T[6]=M,M=Math.sin(v),A=Math.cos(v),C[5]=1,C[15]=1,C[0]=A,C[2]=-M,C[8]=M,C[10]=A,this.multiplyLocal(r),this.multiplyLocal(o),this},setWorldMatrix:function(v,c,g,p,T){return this.yawPitchRoll(v.y,v.x,v.z),r.scaling(g.x,g.y,g.z),o.xyz(c.x,c.y,c.z),this.multiplyLocal(r),this.multiplyLocal(o),p&&this.multiplyLocal(p),T&&this.multiplyLocal(T),this},multiplyToMat4:function(v,c){var g=this.val,p=v.val,T=g[0],C=g[1],M=g[2],A=g[3],R=g[4],P=g[5],L=g[6],F=g[7],w=g[8],O=g[9],B=g[10],I=g[11],D=g[12],N=g[13],z=g[14],V=g[15],U=p[0],G=p[1],b=p[2],Y=p[3],W=p[4],H=p[5],X=p[6],K=p[7],Z=p[8],Q=p[9],j=p[10],J=p[11],tt=p[12],k=p[13],q=p[14],_=p[15];return c.setValues(U*T+G*R+b*w+Y*D,G*C+G*P+b*O+Y*N,b*M+G*L+b*B+Y*z,Y*A+G*F+b*I+Y*V,W*T+H*R+X*w+K*D,W*C+H*P+X*O+K*N,W*M+H*L+X*B+K*z,W*A+H*F+X*I+K*V,Z*T+Q*R+j*w+J*D,Z*C+Q*P+j*O+J*N,Z*M+Q*L+j*B+J*z,Z*A+Q*F+j*I+J*V,tt*T+k*R+q*w+_*D,tt*C+k*P+q*O+_*N,tt*M+k*L+q*B+_*z,tt*A+k*F+q*I+_*V)},fromRotationXYTranslation:function(v,c,g){var p=c.x,T=c.y,C=c.z,M=Math.sin(v.x),A=Math.cos(v.x),R=Math.sin(v.y),P=Math.cos(v.y),L=p,F=T,w=C,O=-M,B=0-O*R,I=0-A*R,D=O*P,N=A*P;return g||(L=P*p+R*C,F=B*p+A*T+D*C,w=I*p+M*T+N*C),this.setValues(P,B,I,0,0,A,M,0,R,D,N,0,L,F,w,1)},getMaxScaleOnAxis:function(){var v=this.val,c=v[0]*v[0]+v[1]*v[1]+v[2]*v[2],g=v[4]*v[4]+v[5]*v[5]+v[6]*v[6],p=v[8]*v[8]+v[9]*v[9]+v[10]*v[10];return Math.sqrt(Math.max(c,g,p))}}),r=new s,o=new s,a=new l,u=new l,f=new l;h.exports=s},86883:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return Math.min(t+e,l)};h.exports=d},50040:h=>{/**
|
||
* @author Vladislav Forsh <vlad@robowhale.com>
|
||
* @copyright 2021 RoboWhale
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=t.length;if(e===0)return 0;t.sort(function(i,s){return i-s});var l=Math.floor(e/2);return e%2===0?(t[l]+t[l-1])/2:t[l]};h.exports=d},37204:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return Math.max(t-e,l)};h.exports=d},65201:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){l===void 0&&(l=e+1);var s=(t-e)/(l-e);return s>1?i!==void 0?(s=(i-t)/(i-l),s<0&&(s=0)):s=1:s<0&&(s=0),s};h.exports=d},15746:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(94434),i=t(29747),s=t(25836),r=1e-6,o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),u=new s(1,0,0),f=new s(0,1,0),v=new s,c=new l,g=new e({initialize:function(T,C,M,A){this.onChangeCallback=i,this.set(T,C,M,A)},x:{get:function(){return this._x},set:function(p){this._x=p,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(p){this._y=p,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(p){this._z=p,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(p){this._w=p,this.onChangeCallback(this)}},copy:function(p){return this.set(p)},set:function(p,T,C,M,A){return A===void 0&&(A=!0),typeof p=="object"?(this._x=p.x||0,this._y=p.y||0,this._z=p.z||0,this._w=p.w||0):(this._x=p||0,this._y=T||0,this._z=C||0,this._w=M||0),A&&this.onChangeCallback(this),this},add:function(p){return this._x+=p.x,this._y+=p.y,this._z+=p.z,this._w+=p.w,this.onChangeCallback(this),this},subtract:function(p){return this._x-=p.x,this._y-=p.y,this._z-=p.z,this._w-=p.w,this.onChangeCallback(this),this},scale:function(p){return this._x*=p,this._y*=p,this._z*=p,this._w*=p,this.onChangeCallback(this),this},length:function(){var p=this.x,T=this.y,C=this.z,M=this.w;return Math.sqrt(p*p+T*T+C*C+M*M)},lengthSq:function(){var p=this.x,T=this.y,C=this.z,M=this.w;return p*p+T*T+C*C+M*M},normalize:function(){var p=this.x,T=this.y,C=this.z,M=this.w,A=p*p+T*T+C*C+M*M;return A>0&&(A=1/Math.sqrt(A),this._x=p*A,this._y=T*A,this._z=C*A,this._w=M*A),this.onChangeCallback(this),this},dot:function(p){return this.x*p.x+this.y*p.y+this.z*p.z+this.w*p.w},lerp:function(p,T){T===void 0&&(T=0);var C=this.x,M=this.y,A=this.z,R=this.w;return this.set(C+T*(p.x-C),M+T*(p.y-M),A+T*(p.z-A),R+T*(p.w-R))},rotationTo:function(p,T){var C=p.x*T.x+p.y*T.y+p.z*T.z;return C<-.999999?(v.copy(u).cross(p).length()<r&&v.copy(f).cross(p),v.normalize(),this.setAxisAngle(v,Math.PI)):C>.999999?this.set(0,0,0,1):(v.copy(p).cross(T),this._x=v.x,this._y=v.y,this._z=v.z,this._w=1+C,this.normalize())},setAxes:function(p,T,C){var M=c.val;return M[0]=T.x,M[3]=T.y,M[6]=T.z,M[1]=C.x,M[4]=C.y,M[7]=C.z,M[2]=-p.x,M[5]=-p.y,M[8]=-p.z,this.fromMat3(c).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(p,T){T=T*.5;var C=Math.sin(T);return this.set(C*p.x,C*p.y,C*p.z,Math.cos(T))},multiply:function(p){var T=this.x,C=this.y,M=this.z,A=this.w,R=p.x,P=p.y,L=p.z,F=p.w;return this.set(T*F+A*R+C*L-M*P,C*F+A*P+M*R-T*L,M*F+A*L+T*P-C*R,A*F-T*R-C*P-M*L)},slerp:function(p,T){var C=this.x,M=this.y,A=this.z,R=this.w,P=p.x,L=p.y,F=p.z,w=p.w,O=C*P+M*L+A*F+R*w;O<0&&(O=-O,P=-P,L=-L,F=-F,w=-w);var B=1-T,I=T;if(1-O>r){var D=Math.acos(O),N=Math.sin(D);B=Math.sin((1-T)*D)/N,I=Math.sin(T*D)/N}return this.set(B*C+I*P,B*M+I*L,B*A+I*F,B*R+I*w)},invert:function(){var p=this.x,T=this.y,C=this.z,M=this.w,A=p*p+T*T+C*C+M*M,R=A?1/A:0;return this.set(-p*R,-T*R,-C*R,M*R)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(p){p*=.5;var T=this.x,C=this.y,M=this.z,A=this.w,R=Math.sin(p),P=Math.cos(p);return this.set(T*P+A*R,C*P+M*R,M*P-C*R,A*P-T*R)},rotateY:function(p){p*=.5;var T=this.x,C=this.y,M=this.z,A=this.w,R=Math.sin(p),P=Math.cos(p);return this.set(T*P-M*R,C*P+A*R,M*P+T*R,A*P-C*R)},rotateZ:function(p){p*=.5;var T=this.x,C=this.y,M=this.z,A=this.w,R=Math.sin(p),P=Math.cos(p);return this.set(T*P+C*R,C*P-T*R,M*P+A*R,A*P-M*R)},calculateW:function(){var p=this.x,T=this.y,C=this.z;return this.w=-Math.sqrt(1-p*p-T*T-C*C),this},setFromEuler:function(p,T){var C=p.x/2,M=p.y/2,A=p.z/2,R=Math.cos(C),P=Math.cos(M),L=Math.cos(A),F=Math.sin(C),w=Math.sin(M),O=Math.sin(A);switch(p.order){case"XYZ":{this.set(F*P*L+R*w*O,R*w*L-F*P*O,R*P*O+F*w*L,R*P*L-F*w*O,T);break}case"YXZ":{this.set(F*P*L+R*w*O,R*w*L-F*P*O,R*P*O-F*w*L,R*P*L+F*w*O,T);break}case"ZXY":{this.set(F*P*L-R*w*O,R*w*L+F*P*O,R*P*O+F*w*L,R*P*L-F*w*O,T);break}case"ZYX":{this.set(F*P*L-R*w*O,R*w*L+F*P*O,R*P*O-F*w*L,R*P*L+F*w*O,T);break}case"YZX":{this.set(F*P*L+R*w*O,R*w*L+F*P*O,R*P*O-F*w*L,R*P*L-F*w*O,T);break}case"XZY":{this.set(F*P*L-R*w*O,R*w*L-F*P*O,R*P*O+F*w*L,R*P*L+F*w*O,T);break}}return this},setFromRotationMatrix:function(p){var T=p.val,C=T[0],M=T[4],A=T[8],R=T[1],P=T[5],L=T[9],F=T[2],w=T[6],O=T[10],B=C+P+O,I;return B>0?(I=.5/Math.sqrt(B+1),this.set((w-L)*I,(A-F)*I,(R-M)*I,.25/I)):C>P&&C>O?(I=2*Math.sqrt(1+C-P-O),this.set(.25*I,(M+R)/I,(A+F)/I,(w-L)/I)):P>O?(I=2*Math.sqrt(1+P-C-O),this.set((M+R)/I,.25*I,(L+w)/I,(A-F)/I)):(I=2*Math.sqrt(1+O-C-P),this.set((A+F)/I,(L+w)/I,.25*I,(R-M)/I)),this},fromMat3:function(p){var T=p.val,C=T[0]+T[4]+T[8],M;if(C>0)M=Math.sqrt(C+1),this.w=.5*M,M=.5/M,this._x=(T[7]-T[5])*M,this._y=(T[2]-T[6])*M,this._z=(T[3]-T[1])*M;else{var A=0;T[4]>T[0]&&(A=1),T[8]>T[A*3+A]&&(A=2);var R=o[A],P=o[R];M=Math.sqrt(T[A*3+A]-T[R*3+R]-T[P*3+P]+1),a[A]=.5*M,M=.5/M,a[R]=(T[R*3+A]+T[A*3+R])*M,a[P]=(T[P*3+A]+T[A*3+P])*M,this._x=a[0],this._y=a[1],this._z=a[2],this._w=(T[P*3+R]-T[R*3+P])*M}return this.onChangeCallback(this),this}});h.exports=g},43396:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=function(i){return i*e.RAD_TO_DEG};h.exports=l},74362:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=1);var l=Math.random()*2*Math.PI;return t.x=Math.cos(l)*e,t.y=Math.sin(l)*e,t};h.exports=d},60706:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=1);var l=Math.random()*2*Math.PI,i=Math.random()*2-1,s=Math.sqrt(1-i*i)*e;return t.x=Math.cos(l)*s,t.y=Math.sin(l)*s,t.z=i*e,t};h.exports=d},67421:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e=1),t.x=(Math.random()*2-1)*e,t.y=(Math.random()*2-1)*e,t.z=(Math.random()*2-1)*e,t.w=(Math.random()*2-1)*e,t};h.exports=d},36305:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.x,i=t.y;return t.x=l*Math.cos(e)-i*Math.sin(e),t.y=l*Math.sin(e)+i*Math.cos(e),t};h.exports=d},11520:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=Math.cos(i),r=Math.sin(i),o=t.x-e,a=t.y-l;return t.x=o*s-a*r+e,t.y=o*r+a*s+l,t};h.exports=d},1163:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s){var r=i+Math.atan2(t.y-l,t.x-e);return t.x=e+s*Math.cos(r),t.y=l+s*Math.sin(r),t};h.exports=d},70336:h=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s){return t.x=e+s*Math.cos(i),t.y=l+s*Math.sin(i),t};h.exports=d},72678:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(25836),l=t(37867),i=t(15746),s=new l,r=new i,o=new e,a=function(u,f,v){return r.setAxisAngle(f,v),s.fromRotationTranslation(r,o.set(0,0,0)),u.transformMat4(s)};h.exports=a},2284:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t>0?Math.ceil(t):Math.floor(t)};h.exports=d},41013:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){e===void 0&&(e=0),l===void 0&&(l=10);var i=Math.pow(l,-e);return Math.round(t*i)/i};h.exports=d},7602:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t<=e?0:t>=l?1:(t=(t-e)/(l-e),t*t*(3-2*t))};h.exports=d},54261:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t=Math.max(0,Math.min(1,(t-e)/(l-e))),t*t*t*(t*(t*6-15)+10)};h.exports=d},44408:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o){o===void 0&&(o=new e);var a=0,u=0,f=s*r;return i>0&&i<=f&&(i>s-1?(u=Math.floor(i/s),a=i-u*s):a=i),o.set(a,u)};h.exports=l},85955:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a,u,f,v){v===void 0&&(v=new e);var c=Math.sin(a),g=Math.cos(a),p=g*u,T=c*u,C=-c*f,M=g*f,A=1/(p*M+C*-T);return v.x=M*A*i+-C*A*s+(o*C-r*M)*A,v.y=p*A*s+-T*A*i+(-o*p+r*T)*A,v};h.exports=l},26099:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(43855),i=new e({initialize:function(r,o){this.x=0,this.y=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0):(o===void 0&&(o=r),this.x=r||0,this.y=o||0)},clone:function(){return new i(this.x,this.y)},copy:function(s){return this.x=s.x||0,this.y=s.y||0,this},setFromObject:function(s){return this.x=s.x||0,this.y=s.y||0,this},set:function(s,r){return r===void 0&&(r=s),this.x=s,this.y=r,this},setTo:function(s,r){return this.set(s,r)},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},invert:function(){return this.set(this.y,this.x)},setToPolar:function(s,r){return r==null&&(r=1),this.x=Math.cos(s)*r,this.y=Math.sin(s)*r,this},equals:function(s){return this.x===s.x&&this.y===s.y},fuzzyEquals:function(s,r){return l(this.x,s.x,r)&&l(this.y,s.y,r)},angle:function(){var s=Math.atan2(this.y,this.x);return s<0&&(s+=2*Math.PI),s},setAngle:function(s){return this.setToPolar(s,this.length())},add:function(s){return this.x+=s.x,this.y+=s.y,this},subtract:function(s){return this.x-=s.x,this.y-=s.y,this},multiply:function(s){return this.x*=s.x,this.y*=s.y,this},scale:function(s){return isFinite(s)?(this.x*=s,this.y*=s):(this.x=0,this.y=0),this},divide:function(s){return this.x/=s.x,this.y/=s.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(s){var r=s.x-this.x,o=s.y-this.y;return Math.sqrt(r*r+o*o)},distanceSq:function(s){var r=s.x-this.x,o=s.y-this.y;return r*r+o*o},length:function(){var s=this.x,r=this.y;return Math.sqrt(s*s+r*r)},setLength:function(s){return this.normalize().scale(s)},lengthSq:function(){var s=this.x,r=this.y;return s*s+r*r},normalize:function(){var s=this.x,r=this.y,o=s*s+r*r;return o>0&&(o=1/Math.sqrt(o),this.x=s*o,this.y=r*o),this},normalizeRightHand:function(){var s=this.x;return this.x=this.y*-1,this.y=s,this},normalizeLeftHand:function(){var s=this.x;return this.x=this.y,this.y=s*-1,this},dot:function(s){return this.x*s.x+this.y*s.y},cross:function(s){return this.x*s.y-this.y*s.x},lerp:function(s,r){r===void 0&&(r=0);var o=this.x,a=this.y;return this.x=o+r*(s.x-o),this.y=a+r*(s.y-a),this},transformMat3:function(s){var r=this.x,o=this.y,a=s.val;return this.x=a[0]*r+a[3]*o+a[6],this.y=a[1]*r+a[4]*o+a[7],this},transformMat4:function(s){var r=this.x,o=this.y,a=s.val;return this.x=a[0]*r+a[4]*o+a[12],this.y=a[1]*r+a[5]*o+a[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(s){var r=this.length();return r&&r>s&&this.scale(s/r),this},reflect:function(s){return s=s.clone().normalize(),this.subtract(s.scale(2*this.dot(s)))},mirror:function(s){return this.reflect(s).negate()},rotate:function(s){var r=Math.cos(s),o=Math.sin(s);return this.set(r*this.x-o*this.y,o*this.x+r*this.y)},project:function(s){var r=this.dot(s)/s.dot(s);return this.copy(s).scale(r)},projectUnit:function(s,r){r===void 0&&(r=new i);var o=this.x*s.x+this.y*s.y;return o!==0&&(r.x=o*s.x,r.y=o*s.y),r}});i.ZERO=new i,i.RIGHT=new i(1,0),i.LEFT=new i(-1,0),i.UP=new i(0,-1),i.DOWN=new i(0,1),i.ONE=new i(1,1),h.exports=i},25836:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o){this.x=0,this.y=0,this.z=0,typeof s=="object"?(this.x=s.x||0,this.y=s.y||0,this.z=s.z||0):(this.x=s||0,this.y=r||0,this.z=o||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(i){return this.x=Math.min(this.x,i.x),this.y=Math.min(this.y,i.y),this.z=Math.min(this.z,i.z),this},max:function(i){return this.x=Math.max(this.x,i.x),this.y=Math.max(this.y,i.y),this.z=Math.max(this.z,i.z),this},clone:function(){return new l(this.x,this.y,this.z)},addVectors:function(i,s){return this.x=i.x+s.x,this.y=i.y+s.y,this.z=i.z+s.z,this},subVectors:function(i,s){return this.x=i.x-s.x,this.y=i.y-s.y,this.z=i.z-s.z,this},crossVectors:function(i,s){var r=i.x,o=i.y,a=i.z,u=s.x,f=s.y,v=s.z;return this.x=o*v-a*f,this.y=a*u-r*v,this.z=r*f-o*u,this},equals:function(i){return this.x===i.x&&this.y===i.y&&this.z===i.z},copy:function(i){return this.x=i.x,this.y=i.y,this.z=i.z||0,this},set:function(i,s,r){return typeof i=="object"?(this.x=i.x||0,this.y=i.y||0,this.z=i.z||0):(this.x=i||0,this.y=s||0,this.z=r||0),this},setFromMatrixPosition:function(i){return this.fromArray(i.val,12)},setFromMatrixColumn:function(i,s){return this.fromArray(i.val,s*4)},fromArray:function(i,s){return s===void 0&&(s=0),this.x=i[s],this.y=i[s+1],this.z=i[s+2],this},add:function(i){return this.x+=i.x,this.y+=i.y,this.z+=i.z||0,this},addScalar:function(i){return this.x+=i,this.y+=i,this.z+=i,this},addScale:function(i,s){return this.x+=i.x*s,this.y+=i.y*s,this.z+=i.z*s||0,this},subtract:function(i){return this.x-=i.x,this.y-=i.y,this.z-=i.z||0,this},multiply:function(i){return this.x*=i.x,this.y*=i.y,this.z*=i.z||1,this},scale:function(i){return isFinite(i)?(this.x*=i,this.y*=i,this.z*=i):(this.x=0,this.y=0,this.z=0),this},divide:function(i){return this.x/=i.x,this.y/=i.y,this.z/=i.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(i){var s=i.x-this.x,r=i.y-this.y,o=i.z-this.z||0;return Math.sqrt(s*s+r*r+o*o)},distanceSq:function(i){var s=i.x-this.x,r=i.y-this.y,o=i.z-this.z||0;return s*s+r*r+o*o},length:function(){var i=this.x,s=this.y,r=this.z;return Math.sqrt(i*i+s*s+r*r)},lengthSq:function(){var i=this.x,s=this.y,r=this.z;return i*i+s*s+r*r},normalize:function(){var i=this.x,s=this.y,r=this.z,o=i*i+s*s+r*r;return o>0&&(o=1/Math.sqrt(o),this.x=i*o,this.y=s*o,this.z=r*o),this},dot:function(i){return this.x*i.x+this.y*i.y+this.z*i.z},cross:function(i){var s=this.x,r=this.y,o=this.z,a=i.x,u=i.y,f=i.z;return this.x=r*f-o*u,this.y=o*a-s*f,this.z=s*u-r*a,this},lerp:function(i,s){s===void 0&&(s=0);var r=this.x,o=this.y,a=this.z;return this.x=r+s*(i.x-r),this.y=o+s*(i.y-o),this.z=a+s*(i.z-a),this},applyMatrix3:function(i){var s=this.x,r=this.y,o=this.z,a=i.val;return this.x=a[0]*s+a[3]*r+a[6]*o,this.y=a[1]*s+a[4]*r+a[7]*o,this.z=a[2]*s+a[5]*r+a[8]*o,this},applyMatrix4:function(i){var s=this.x,r=this.y,o=this.z,a=i.val,u=1/(a[3]*s+a[7]*r+a[11]*o+a[15]);return this.x=(a[0]*s+a[4]*r+a[8]*o+a[12])*u,this.y=(a[1]*s+a[5]*r+a[9]*o+a[13])*u,this.z=(a[2]*s+a[6]*r+a[10]*o+a[14])*u,this},transformMat3:function(i){var s=this.x,r=this.y,o=this.z,a=i.val;return this.x=s*a[0]+r*a[3]+o*a[6],this.y=s*a[1]+r*a[4]+o*a[7],this.z=s*a[2]+r*a[5]+o*a[8],this},transformMat4:function(i){var s=this.x,r=this.y,o=this.z,a=i.val;return this.x=a[0]*s+a[4]*r+a[8]*o+a[12],this.y=a[1]*s+a[5]*r+a[9]*o+a[13],this.z=a[2]*s+a[6]*r+a[10]*o+a[14],this},transformCoordinates:function(i){var s=this.x,r=this.y,o=this.z,a=i.val,u=s*a[0]+r*a[4]+o*a[8]+a[12],f=s*a[1]+r*a[5]+o*a[9]+a[13],v=s*a[2]+r*a[6]+o*a[10]+a[14],c=s*a[3]+r*a[7]+o*a[11]+a[15];return this.x=u/c,this.y=f/c,this.z=v/c,this},transformQuat:function(i){var s=this.x,r=this.y,o=this.z,a=i.x,u=i.y,f=i.z,v=i.w,c=v*s+u*o-f*r,g=v*r+f*s-a*o,p=v*o+a*r-u*s,T=-a*s-u*r-f*o;return this.x=c*v+T*-a+g*-f-p*-u,this.y=g*v+T*-u+p*-a-c*-f,this.z=p*v+T*-f+c*-u-g*-a,this},project:function(i){var s=this.x,r=this.y,o=this.z,a=i.val,u=a[0],f=a[1],v=a[2],c=a[3],g=a[4],p=a[5],T=a[6],C=a[7],M=a[8],A=a[9],R=a[10],P=a[11],L=a[12],F=a[13],w=a[14],O=a[15],B=1/(s*c+r*C+o*P+O);return this.x=(s*u+r*g+o*M+L)*B,this.y=(s*f+r*p+o*A+F)*B,this.z=(s*v+r*T+o*R+w)*B,this},projectViewMatrix:function(i,s){return this.applyMatrix4(i).applyMatrix4(s)},unprojectViewMatrix:function(i,s){return this.applyMatrix4(i).applyMatrix4(s)},unproject:function(i,s){var r=i.x,o=i.y,a=i.z,u=i.w,f=this.x-r,v=u-this.y-1-o,c=this.z;return this.x=2*f/a-1,this.y=2*v/u-1,this.z=2*c-1,this.project(s)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});l.ZERO=new l,l.RIGHT=new l(1,0,0),l.LEFT=new l(-1,0,0),l.UP=new l(0,-1,0),l.DOWN=new l(0,1,0),l.FORWARD=new l(0,0,1),l.BACK=new l(0,0,-1),l.ONE=new l(1,1,1),h.exports=l},61369:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o,a){this.x=0,this.y=0,this.z=0,this.w=0,typeof s=="object"?(this.x=s.x||0,this.y=s.y||0,this.z=s.z||0,this.w=s.w||0):(this.x=s||0,this.y=r||0,this.z=o||0,this.w=a||0)},clone:function(){return new l(this.x,this.y,this.z,this.w)},copy:function(i){return this.x=i.x,this.y=i.y,this.z=i.z||0,this.w=i.w||0,this},equals:function(i){return this.x===i.x&&this.y===i.y&&this.z===i.z&&this.w===i.w},set:function(i,s,r,o){return typeof i=="object"?(this.x=i.x||0,this.y=i.y||0,this.z=i.z||0,this.w=i.w||0):(this.x=i||0,this.y=s||0,this.z=r||0,this.w=o||0),this},add:function(i){return this.x+=i.x,this.y+=i.y,this.z+=i.z||0,this.w+=i.w||0,this},subtract:function(i){return this.x-=i.x,this.y-=i.y,this.z-=i.z||0,this.w-=i.w||0,this},scale:function(i){return this.x*=i,this.y*=i,this.z*=i,this.w*=i,this},length:function(){var i=this.x,s=this.y,r=this.z,o=this.w;return Math.sqrt(i*i+s*s+r*r+o*o)},lengthSq:function(){var i=this.x,s=this.y,r=this.z,o=this.w;return i*i+s*s+r*r+o*o},normalize:function(){var i=this.x,s=this.y,r=this.z,o=this.w,a=i*i+s*s+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),this.x=i*a,this.y=s*a,this.z=r*a,this.w=o*a),this},dot:function(i){return this.x*i.x+this.y*i.y+this.z*i.z+this.w*i.w},lerp:function(i,s){s===void 0&&(s=0);var r=this.x,o=this.y,a=this.z,u=this.w;return this.x=r+s*(i.x-r),this.y=o+s*(i.y-o),this.z=a+s*(i.z-a),this.w=u+s*(i.w-u),this},multiply:function(i){return this.x*=i.x,this.y*=i.y,this.z*=i.z||1,this.w*=i.w||1,this},divide:function(i){return this.x/=i.x,this.y/=i.y,this.z/=i.z||1,this.w/=i.w||1,this},distance:function(i){var s=i.x-this.x,r=i.y-this.y,o=i.z-this.z||0,a=i.w-this.w||0;return Math.sqrt(s*s+r*r+o*o+a*a)},distanceSq:function(i){var s=i.x-this.x,r=i.y-this.y,o=i.z-this.z||0,a=i.w-this.w||0;return s*s+r*r+o*o+a*a},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(i){var s=this.x,r=this.y,o=this.z,a=this.w,u=i.val;return this.x=u[0]*s+u[4]*r+u[8]*o+u[12]*a,this.y=u[1]*s+u[5]*r+u[9]*o+u[13]*a,this.z=u[2]*s+u[6]*r+u[10]*o+u[14]*a,this.w=u[3]*s+u[7]*r+u[11]*o+u[15]*a,this},transformQuat:function(i){var s=this.x,r=this.y,o=this.z,a=i.x,u=i.y,f=i.z,v=i.w,c=v*s+u*o-f*r,g=v*r+f*s-a*o,p=v*o+a*r-u*s,T=-a*s-u*r-f*o;return this.x=c*v+T*-a+g*-f-p*-u,this.y=g*v+T*-u+p*-a-c*-f,this.z=p*v+T*-f+c*-u-g*-a,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});l.prototype.sub=l.prototype.subtract,l.prototype.mul=l.prototype.multiply,l.prototype.div=l.prototype.divide,l.prototype.dist=l.prototype.distance,l.prototype.distSq=l.prototype.distanceSq,l.prototype.len=l.prototype.length,l.prototype.lenSq=l.prototype.lengthSq,h.exports=l},60417:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return Math.abs(t-e)<=l};h.exports=d},15994:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=l-e;return e+((t-e)%i+i)%i};h.exports=d},31040:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){return Math.atan2(i-e,l-t)};h.exports=d},55495:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)};h.exports=d},128:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)};h.exports=d},41273:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){return Math.atan2(l-t,i-e)};h.exports=d},1432:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=function(i){return i>Math.PI&&(i-=e.TAU),Math.abs(((i+e.PI_OVER_2)%e.TAU-e.TAU)%e.TAU)};h.exports=l},49127:(h,d,t)=>{/**
|
||
* @author samme
|
||
* @copyright 2025 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(12407),l=function(i,s){return e(s-i)};h.exports=l},52285:(h,d,t)=>{/**
|
||
* @author samme
|
||
* @copyright 2025 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=t(12407),i=e.TAU,s=function(r,o){var a=l(o-r);return a>0&&(a-=i),a};h.exports=s},67317:(h,d,t)=>{/**
|
||
* @author samme
|
||
* @copyright 2025 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(86554),l=function(i,s){return e(s-i)};h.exports=l},12407:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};h.exports=d},53993:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author @samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(99472),l=function(){return e(-Math.PI,Math.PI)};h.exports=l},86564:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author @samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(99472),l=function(){return e(-180,180)};h.exports=l},90154:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(12407),l=function(i){return e(i+Math.PI)};h.exports=l},48736:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=function(i,s,r){return r===void 0&&(r=.05),i===s||(Math.abs(s-i)<=r||Math.abs(s-i)>=e.TAU-r?i=s:(Math.abs(s-i)>Math.PI&&(s<i?s+=e.TAU:s-=e.TAU),s>i?i+=r:s<i&&(i-=r))),i};h.exports=l},61430:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=e-t;if(l===0)return 0;var i=Math.floor((l- -180)/360);return l-i*360};h.exports=d},86554:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(15994),l=function(i){return e(i,-Math.PI,Math.PI)};h.exports=l},30954:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(15994),l=function(i){return e(i,-180,180)};h.exports=l},25588:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={TAU:Math.PI*2,PI_OVER_2:Math.PI/2,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};h.exports=d},20339:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=t-l,r=e-i;return Math.sqrt(s*s+r*r)};h.exports=d},52816:h=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.x-e.x,i=t.y-e.y;return Math.sqrt(l*l+i*i)};h.exports=d},64559:h=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.x-e.x,i=t.y-e.y;return l*l+i*i};h.exports=d},82340:h=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){return Math.max(Math.abs(t-l),Math.abs(e-i))};h.exports=d},14390:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s){return s===void 0&&(s=2),Math.sqrt(Math.pow(l-t,s)+Math.pow(i-e,s))};h.exports=d},2243:h=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){return Math.abs(t-l)+Math.abs(e-i)};h.exports=d},89774:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=t-l,r=e-i;return s*s+r*r};h.exports=d},50994:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}},62640:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(54178),l=t(41521),i=t(79980),s=t(85433),r=t(99140),o=t(48857),a=t(81596),u=t(59133),f=t(98516),v=t(35248),c=t(82500),g=t(49752);h.exports={Power0:a,Power1:u.Out,Power2:s.Out,Power3:f.Out,Power4:v.Out,Linear:a,Quad:u.Out,Cubic:s.Out,Quart:f.Out,Quint:v.Out,Sine:c.Out,Expo:o.Out,Circ:i.Out,Elastic:r.Out,Back:e.Out,Bounce:l.Out,Stepped:g,"Quad.easeIn":u.In,"Cubic.easeIn":s.In,"Quart.easeIn":f.In,"Quint.easeIn":v.In,"Sine.easeIn":c.In,"Expo.easeIn":o.In,"Circ.easeIn":i.In,"Elastic.easeIn":r.In,"Back.easeIn":e.In,"Bounce.easeIn":l.In,"Quad.easeOut":u.Out,"Cubic.easeOut":s.Out,"Quart.easeOut":f.Out,"Quint.easeOut":v.Out,"Sine.easeOut":c.Out,"Expo.easeOut":o.Out,"Circ.easeOut":i.Out,"Elastic.easeOut":r.Out,"Back.easeOut":e.Out,"Bounce.easeOut":l.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":s.InOut,"Quart.easeInOut":f.InOut,"Quint.easeInOut":v.InOut,"Sine.easeInOut":c.InOut,"Expo.easeInOut":o.InOut,"Circ.easeInOut":i.InOut,"Elastic.easeInOut":r.InOut,"Back.easeInOut":e.InOut,"Bounce.easeInOut":l.InOut}},1639:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e=1.70158),t*t*((e+1)*t-e)};h.exports=d},50099:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=1.70158);var l=e*1.525;return(t*=2)<1?.5*(t*t*((l+1)*t-l)):.5*((t-=2)*t*((l+1)*t+l)+2)};h.exports=d},41286:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e=1.70158),--t*t*((e+1)*t+e)+1};h.exports=d},54178:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(1639),Out:t(41286),InOut:t(50099)}},59590:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=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)};h.exports=d},41788:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=!1;return t<.5?(t=1-t*2,e=!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,e?(1-t)*.5:t*.5+.5};h.exports=d},69905:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=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};h.exports=d},41521:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(59590),Out:t(69905),InOut:t(41788)}},91861:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return 1-Math.sqrt(1-t*t)};h.exports=d},4177:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};h.exports=d},57512:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return Math.sqrt(1- --t*t)};h.exports=d},79980:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(91861),Out:t(57512),InOut:t(4177)}},51150:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t*t*t};h.exports=d},82820:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};h.exports=d},35033:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return--t*t*t+1};h.exports=d},85433:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(51150),Out:t(35033),InOut:t(82820)}},69965:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(e===void 0&&(e=.1),l===void 0&&(l=.1),t===0)return 0;if(t===1)return 1;var i=l/4;return e<1?e=1:i=l*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/l))};h.exports=d},50665:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(e===void 0&&(e=.1),l===void 0&&(l=.1),t===0)return 0;if(t===1)return 1;var i=l/4;return e<1?e=1:i=l*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?-.5*(e*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/l)):e*Math.pow(2,-10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/l)*.5+1};h.exports=d},7744:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(e===void 0&&(e=.1),l===void 0&&(l=.1),t===0)return 0;if(t===1)return 1;var i=l/4;return e<1?e=1:i=l*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-i)*(2*Math.PI)/l)+1};h.exports=d},99140:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(69965),Out:t(7744),InOut:t(50665)}},24590:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return Math.pow(2,10*(t-1))-.001};h.exports=d},87844:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};h.exports=d},89433:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return 1-Math.pow(2,-10*t)};h.exports=d},48857:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(24590),Out:t(89433),InOut:t(87844)}},48820:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t};h.exports=d},81596:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports=t(7147)},34826:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t*t};h.exports=d},20544:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};h.exports=d},92029:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t*(2-t)};h.exports=d},59133:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(34826),Out:t(92029),InOut:t(20544)}},64413:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t*t*t*t};h.exports=d},78137:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};h.exports=d},45840:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return 1- --t*t*t*t};h.exports=d},98516:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(64413),Out:t(45840),InOut:t(78137)}},87745:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t*t*t*t*t};h.exports=d},16509:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};h.exports=d},17868:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return--t*t*t*t*t+1};h.exports=d},35248:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(87745),Out:t(17868),InOut:t(16509)}},80461:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};h.exports=d},34025:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};h.exports=d},52768:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};h.exports=d},82500:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={In:t(80461),Out:t(52768),InOut:t(34025)}},72251:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e=1),t<=0?0:t>=1?1:((e*t|0)+1)*(1/e)};h.exports=d},49752:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports=t(72251)},75698:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e=1e-4),Math.ceil(t-e)};h.exports=d},43855:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return l===void 0&&(l=1e-4),Math.abs(t-e)<l};h.exports=d},25777:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e=1e-4),Math.floor(t+e)};h.exports=d},5470:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return l===void 0&&(l=1e-4),t>e-l};h.exports=d},94977:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return l===void 0&&(l=1e-4),t<e+l};h.exports=d},48379:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}},75508:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36383),l=t(79291),i={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),GetCentroid:t(2672),GetSpeed:t(38265),GetVec2Bounds:t(55133),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),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)};i=l(!1,i,e),h.exports=i},89318:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(85710),l=function(i,s){for(var r=0,o=i.length-1,a=0;a<=o;a++)r+=Math.pow(1-s,o-a)*Math.pow(s,a)*i[a]*e(o,a);return r};h.exports=l},77259:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87842),l=function(i,s){var r=i.length-1,o=r*s,a=Math.floor(o);return i[0]===i[r]?(s<0&&(a=Math.floor(o=r*(1+s))),e(o-a,i[(a-1+r)%r],i[a],i[(a+1)%r],i[(a+2)%r])):s<0?i[0]-(e(-o,i[0],i[0],i[1],i[1])-i[0]):s>1?i[r]-(e(o-r,i[r],i[r],i[r-1],i[r-1])-i[r]):e(o-a,i[a?a-1:0],i[a],i[r<a+1?r:a+1],i[r<a+2?r:a+2])};h.exports=l},36316:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function d(s,r){var o=1-s;return o*o*o*r}function t(s,r){var o=1-s;return 3*o*o*s*r}function e(s,r){return 3*(1-s)*s*s*r}function l(s,r){return s*s*s*r}var i=function(s,r,o,a,u){return d(s,r)+t(s,o)+e(s,a)+l(s,u)};h.exports=i},28392:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(28915),l=function(i,s){var r=i.length-1,o=r*s,a=Math.floor(o);return s<0?e(i[0],i[1],o):s>1?e(i[r],i[r-1],r-o):e(i[a],i[a+1>r?r:a+1],o-a)};h.exports=l},32112:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function d(i,s){var r=1-i;return r*r*s}function t(i,s){return 2*(1-i)*i*s}function e(i,s){return i*i*s}var l=function(i,s,r,o){return d(i,s)+t(i,r)+e(i,o)};h.exports=l},47235:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7602),l=function(i,s,r){return s+(r-s)*e(i,0,1)};h.exports=l},50178:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(54261),l=function(i,s,r){return s+(r-s)*e(i,0,1)};h.exports=l},38289:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}},98439:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)};h.exports=d},50030:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t>0&&(t&t-1)===0&&e>0&&(e&e-1)===0};h.exports=d},81230:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t>0&&(t&t-1)===0};h.exports=d},49001:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}},28453:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s){s===void 0&&(s=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],s&&this.init(s)},rnd:function(){var i=2091639*this.s0+this.c*23283064365386963e-26;return this.c=i|0,this.s0=this.s1,this.s1=this.s2,this.s2=i-this.c,this.s2},hash:function(i){var s,r=this.n;i=i.toString();for(var o=0;o<i.length;o++)r+=i.charCodeAt(o),s=.02519603282416938*r,r=s>>>0,s-=r,s*=r,r=s>>>0,s-=r,r+=s*4294967296;return this.n=r,(r>>>0)*23283064365386963e-26},init:function(i){typeof i=="string"?this.state(i):this.sow(i)},sow:function(i){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!i)for(var s=0;s<i.length&&i[s]!=null;s++){var r=i[s];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(i,s){return Math.floor(this.realInRange(0,s-i+1)+i)},between:function(i,s){return Math.floor(this.realInRange(0,s-i+1)+i)},realInRange:function(i,s){return this.frac()*(s-i)+i},normal:function(){return 1-2*this.frac()},uuid:function(){var i="",s="";for(s=i="";i++<36;s+=~i%5|i*3&4?(i^15?8^this.frac()*(i^20?16:4):4).toString(16):"-");return s},pick:function(i){return i[this.integerInRange(0,i.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(i){return i[~~(Math.pow(this.frac(),2)*(i.length-.5)+.5)]},timestamp:function(i,s){return this.realInRange(i||9466848e5,s||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(i){return typeof i=="string"&&i.match(/^!rnd/)&&(i=i.split(","),this.c=parseFloat(i[1]),this.s0=parseFloat(i[2]),this.s1=parseFloat(i[3]),this.s2=parseFloat(i[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(i){for(var s=i.length-1,r=s;r>0;r--){var o=Math.floor(this.frac()*(r+1)),a=i[o];i[o]=i[r],i[r]=a}return i}});h.exports=l},63448:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){return l===void 0&&(l=0),e===0?t:(t-=l,t=e*Math.ceil(t/e),i?(l+t)/e:l+t)};h.exports=d},56583:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){return l===void 0&&(l=0),e===0?t:(t-=l,t=e*Math.floor(t/e),i?(l+t)/e:l+t)};h.exports=d},77720:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){return l===void 0&&(l=0),e===0?t:(t-=l,t=e*Math.round(t/e),i?(l+t)/e:l+t)};h.exports=d},73697:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}},85454:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/t(63595);var e=t(8054),l=t(79291),i={Actions:t(61061),Animations:t(60421),BlendModes:t(10312),Cache:t(83388),Cameras:t(26638),Core:t(42857),Class:t(83419),Curves:t(25410),Data:t(44965),Display:t(27460),DOM:t(84902),Events:t(93055),Filters:t(11889),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)};i.Sound=t(23717),i=l(!1,i,e),h.exports=i,t.g.Phaser=i},71289:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(92209),i=t(88571),s=new e({Extends:i,Mixins:[l.Acceleration,l.Angular,l.Bounce,l.Collision,l.Debug,l.Drag,l.Enable,l.Friction,l.Gravity,l.Immovable,l.Mass,l.Pushable,l.Size,l.Velocity],initialize:function(o,a,u,f,v){i.call(this,o,a,u,f,v),this.body=null}});h.exports=s},86689:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(39506),i=t(20339),s=t(89774),r=t(66022),o=t(95540),a=t(46975),u=t(72441),f=t(47956),v=t(37277),c=t(44594),g=t(26099),p=t(82248),T=new e({initialize:function(M){this.scene=M,this.systems=M.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,M.sys.events.once(c.BOOT,this.boot,this),M.sys.events.on(c.START,this.start,this)},boot:function(){this.world=new p(this.scene,this.config),this.add=new r(this.world),this.systems.events.once(c.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new p(this.scene,this.config),this.add=new r(this.world));var C=this.systems.events;o(this.config,"customUpdate",!1)||C.on(c.UPDATE,this.world.update,this.world),C.on(c.POST_UPDATE,this.world.postUpdate,this.world),C.once(c.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(c.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(c.UPDATE,this.world.update,this.world)},getConfig:function(){var C=this.systems.game.config.physics,M=this.systems.settings.physics,A=a(o(M,"arcade",{}),o(C,"arcade",{}));return A},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(C,M,A,R,P){return A===void 0&&(A=null),R===void 0&&(R=null),P===void 0&&(P=A),this.world.collideObjects(C,M,A,R,P,!0)},collide:function(C,M,A,R,P){return A===void 0&&(A=null),R===void 0&&(R=null),P===void 0&&(P=A),this.world.collideObjects(C,M,A,R,P,!1)},collideTiles:function(C,M,A,R,P){return this.world.collideTiles(C,M,A,R,P)},overlapTiles:function(C,M,A,R,P){return this.world.overlapTiles(C,M,A,R,P)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(C,M,A,R,P,L){R===void 0&&(R=60);var F=Math.atan2(A-C.y,M-C.x);return C.body.acceleration.setToPolar(F,R),P!==void 0&&L!==void 0&&C.body.maxVelocity.set(P,L),F},accelerateToObject:function(C,M,A,R,P){return this.accelerateTo(C,M.x,M.y,A,R,P)},closest:function(C,M){M||(M=Array.from(this.world.bodies));for(var A=Number.MAX_VALUE,R=null,P=C.x,L=C.y,F=M.length,w=0;w<F;w++){var O=M[w],B=O.body||O;if(!(C===O||C===B||C===B.gameObject||C===B.center)){var I=s(P,L,B.center.x,B.center.y);I<A&&(R=O,A=I)}}return R},furthest:function(C,M){M||(M=Array.from(this.world.bodies));for(var A=-1,R=null,P=C.x,L=C.y,F=M.length,w=0;w<F;w++){var O=M[w],B=O.body||O;if(!(C===O||C===B||C===B.gameObject||C===B.center)){var I=s(P,L,B.center.x,B.center.y);I>A&&(R=O,A=I)}}return R},moveTo:function(C,M,A,R,P){R===void 0&&(R=60),P===void 0&&(P=0);var L=Math.atan2(A-C.y,M-C.x);return P>0&&(R=i(C.x,C.y,M,A)/(P/1e3)),C.body.velocity.setToPolar(L,R),L},moveToObject:function(C,M,A,R){return this.moveTo(C,M.x,M.y,A,R)},velocityFromAngle:function(C,M,A){return M===void 0&&(M=60),A===void 0&&(A=new g),A.setToPolar(l(C),M)},velocityFromRotation:function(C,M,A){return M===void 0&&(M=60),A===void 0&&(A=new g),A.setToPolar(C,M)},overlapRect:function(C,M,A,R,P,L){return f(this.world,C,M,A,R,P,L)},overlapCirc:function(C,M,A,R,P){return u(this.world,C,M,A,R,P)},shutdown:function(){if(this.world){var C=this.systems.events;C.off(c.UPDATE,this.world.update,this.world),C.off(c.POST_UPDATE,this.world.postUpdate,this.world),C.off(c.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(c.START,this.start,this),this.scene=null,this.systems=null}});v.register("ArcadePhysics",T,"arcadePhysics"),h.exports=T},13759:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(92209),i=t(68287),s=new e({Extends:i,Mixins:[l.Acceleration,l.Angular,l.Bounce,l.Collision,l.Debug,l.Drag,l.Enable,l.Friction,l.Gravity,l.Immovable,l.Mass,l.Pushable,l.Size,l.Velocity],initialize:function(o,a,u,f,v){i.call(this,o,a,u,f,v),this.body=null}});h.exports=s},37742:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(78389),i=t(37747),s=t(63012),r=t(43396),o=t(87841),a=t(37303),u=t(95829),f=t(26099),v=new e({Mixins:[l],initialize:function(g,p){var T=64,C=64,M={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},A=p!==void 0;A&&p.displayWidth&&(T=p.displayWidth,C=p.displayHeight),A||(p=M),this.world=g,this.gameObject=A?p:void 0,this.isBody=!0,this.transform={x:p.x,y:p.y,rotation:p.angle,scaleX:p.scaleX,scaleY:p.scaleY,displayOriginX:p.displayOriginX,displayOriginY:p.displayOriginY},this.debugShowBody=g.defaults.debugShowBody,this.debugShowVelocity=g.defaults.debugShowVelocity,this.debugBodyColor=g.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new f,this.position=new f(p.x-p.scaleX*p.displayOriginX,p.y-p.scaleY*p.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=p.angle,this.preRotation=p.angle,this.width=T,this.height=C,this.sourceWidth=T,this.sourceHeight=C,p.frame&&(this.sourceWidth=p.frame.realWidth,this.sourceHeight=p.frame.realHeight),this.halfWidth=Math.abs(T/2),this.halfHeight=Math.abs(C/2),this.center=new f(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new f,this.newVelocity=new f,this.deltaMax=new f,this.acceleration=new f,this.allowDrag=!0,this.drag=new f,this.allowGravity=!0,this.gravity=new f,this.bounce=new f,this.worldBounce=null,this.customBoundsRectangle=g.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new f(1e4,1e4),this.maxSpeed=-1,this.friction=new f(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=i.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new f(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=u(!1),this.touching=u(!0),this.wasTouching=u(!0),this.blocked=u(!0),this.syncBounds=!1,this.physicsType=i.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=p.scaleX,this._sy=p.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new o,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var c=this.gameObject,g=this.transform;if(c.parentContainer){var p=c.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);g.x=p.tx,g.y=p.ty,g.rotation=r(p.rotation),g.scaleX=p.scaleX,g.scaleY=p.scaleY,g.displayOriginX=c.displayOriginX,g.displayOriginY=c.displayOriginY}else g.x=c.x,g.y=c.y,g.rotation=c.angle,g.scaleX=c.scaleX,g.scaleY=c.scaleY,g.displayOriginX=c.displayOriginX,g.displayOriginY=c.displayOriginY;var T=!1;if(this.syncBounds){var C=c.getBounds(this._bounds);this.width=C.width,this.height=C.height,T=!0}else{var M=Math.abs(g.scaleX),A=Math.abs(g.scaleY);(this._sx!==M||this._sy!==A)&&(this.width=this.sourceWidth*M,this.height=this.sourceHeight*A,this._sx=M,this._sy=A,T=!0)}T&&(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 c=this.transform;this.position.x=c.x+c.scaleX*(this.offset.x-c.displayOriginX),this.position.y=c.y+c.scaleY*(this.offset.y-c.displayOriginY),this.updateCenter()},resetFlags:function(c){c===void 0&&(c=!1);var g=this.wasTouching,p=this.touching,T=this.blocked;c?u(!0,g):(g.none=p.none,g.up=p.up,g.down=p.down,g.left=p.left,g.right=p.right),u(!0,p),u(!0,T),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(c,g){if(c&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var p=this.position;this.prev.x=p.x,this.prev.y=p.y,this.prevFrame.x=p.x,this.prevFrame.y=p.y}c&&this.update(g)},update:function(c){var g=this.prev,p=this.position,T=this.velocity;if(g.set(p.x,p.y),!this.moves){this._dx=p.x-g.x,this._dy=p.y-g.y;return}if(this.directControl){var C=this.autoFrame;T.set((p.x-C.x)/c,(p.y-C.y)/c),this.world.updateMotion(this,c),this._dx=p.x-C.x,this._dy=p.y-C.y}else this.world.updateMotion(this,c),this.newVelocity.set(T.x*c,T.y*c),p.add(this.newVelocity),this._dx=p.x-g.x,this._dy=p.y-g.y;var M=T.x,A=T.y;if(this.updateCenter(),this.angle=Math.atan2(A,M),this.speed=Math.sqrt(M*M+A*A),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var R=this.blocked;this.world.emit(s.WORLD_BOUNDS,this,R.up,R.down,R.left,R.right)}},postUpdate:function(){var c=this.position,g=c.x-this.prevFrame.x,p=c.y-this.prevFrame.y,T=this.gameObject;if(this.moves){var C=this.deltaMax.x,M=this.deltaMax.y;C!==0&&g!==0&&(g<0&&g<-C?g=-C:g>0&&g>C&&(g=C)),M!==0&&p!==0&&(p<0&&p<-M?p=-M:p>0&&p>M&&(p=M)),T&&(T.x+=g,T.y+=p)}g<0?this.facing=i.FACING_LEFT:g>0&&(this.facing=i.FACING_RIGHT),p<0?this.facing=i.FACING_UP:p>0&&(this.facing=i.FACING_DOWN),this.allowRotation&&T&&(T.angle+=this.deltaZ()),this._tx=g,this._ty=p,this.autoFrame.set(c.x,c.y)},setBoundsRectangle:function(c){return this.customBoundsRectangle=c||this.world.bounds,this},checkWorldBounds:function(){var c=this.position,g=this.velocity,p=this.blocked,T=this.customBoundsRectangle,C=this.world.checkCollision,M=this.worldBounce?-this.worldBounce.x:-this.bounce.x,A=this.worldBounce?-this.worldBounce.y:-this.bounce.y,R=!1;return c.x<T.x&&C.left?(c.x=T.x,g.x*=M,p.left=!0,R=!0):this.right>T.right&&C.right&&(c.x=T.right-this.width,g.x*=M,p.right=!0,R=!0),c.y<T.y&&C.up?(c.y=T.y,g.y*=A,p.up=!0,R=!0):this.bottom>T.bottom&&C.down&&(c.y=T.bottom-this.height,g.y*=A,p.down=!0,R=!0),R&&(this.blocked.none=!1,this.updateCenter()),R},setOffset:function(c,g){return g===void 0&&(g=c),this.offset.set(c,g),this},setGameObject:function(c,g){if(g===void 0&&(g=!0),!c||!c.hasTransformComponent)return this;var p=this.world;return this.gameObject&&this.gameObject.body&&(p.disable(this.gameObject),this.gameObject.body=null),c.body&&p.disable(c),this.gameObject=c,c.body=this,this.setSize(),this.enable=g,this},setSize:function(c,g,p){p===void 0&&(p=!0);var T=this.gameObject;if(T&&(!c&&T.frame&&(c=T.frame.realWidth),!g&&T.frame&&(g=T.frame.realHeight)),this.sourceWidth=c,this.sourceHeight=g,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(),p&&T&&T.getCenter){var C=(T.width-c)/2,M=(T.height-g)/2;this.offset.set(C,M)}return this.isCircle=!1,this.radius=0,this},setCircle:function(c,g,p){return g===void 0&&(g=this.offset.x),p===void 0&&(p=this.offset.y),c>0?(this.isCircle=!0,this.radius=c,this.sourceWidth=c*2,this.sourceHeight=c*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(g,p),this.updateCenter()):this.isCircle=!1,this},reset:function(c,g){this.stop();var p=this.gameObject;p&&(p.setPosition(c,g),this.rotation=p.angle,this.preRotation=p.angle);var T=this.position;p&&p.getTopLeft?p.getTopLeft(T):T.set(c,g),this.prev.copy(T),this.prevFrame.copy(T),this.autoFrame.copy(T),p&&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(c){return c.x=this.x,c.y=this.y,c.right=this.right,c.bottom=this.bottom,c},hitTest:function(c,g){if(!this.isCircle)return a(this,c,g);if(this.radius>0&&c>=this.left&&c<=this.right&&g>=this.top&&g<=this.bottom){var p=(this.center.x-c)*(this.center.x-c),T=(this.center.y-g)*(this.center.y-g);return p+T<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.add(this)},drawDebug:function(c){var g=this.position,p=g.x+this.halfWidth,T=g.y+this.halfHeight;this.debugShowBody&&(c.lineStyle(c.defaultStrokeWidth,this.debugBodyColor),this.isCircle?c.strokeCircle(p,T,this.width/2):(this.checkCollision.up&&c.lineBetween(g.x,g.y,g.x+this.width,g.y),this.checkCollision.right&&c.lineBetween(g.x+this.width,g.y,g.x+this.width,g.y+this.height),this.checkCollision.down&&c.lineBetween(g.x,g.y+this.height,g.x+this.width,g.y+this.height),this.checkCollision.left&&c.lineBetween(g.x,g.y,g.x,g.y+this.height))),this.debugShowVelocity&&(c.lineStyle(c.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),c.lineBetween(p,T,p+this.velocity.x/2,T+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(c){return c===void 0&&(c=!0),this.directControl=c,this},setCollideWorldBounds:function(c,g,p,T){c===void 0&&(c=!0),this.collideWorldBounds=c;var C=g!==void 0,M=p!==void 0;return(C||M)&&(this.worldBounce||(this.worldBounce=new f),C&&(this.worldBounce.x=g),M&&(this.worldBounce.y=p)),T!==void 0&&(this.onWorldBounds=T),this},setVelocity:function(c,g){return this.velocity.set(c,g),c=this.velocity.x,g=this.velocity.y,this.speed=Math.sqrt(c*c+g*g),this},setVelocityX:function(c){return this.setVelocity(c,this.velocity.y)},setVelocityY:function(c){return this.setVelocity(this.velocity.x,c)},setMaxVelocity:function(c,g){return this.maxVelocity.set(c,g),this},setMaxVelocityX:function(c){return this.maxVelocity.x=c,this},setMaxVelocityY:function(c){return this.maxVelocity.y=c,this},setMaxSpeed:function(c){return this.maxSpeed=c,this},setSlideFactor:function(c,g){return this.slideFactor.set(c,g),this},setBounce:function(c,g){return this.bounce.set(c,g),this},setBounceX:function(c){return this.bounce.x=c,this},setBounceY:function(c){return this.bounce.y=c,this},setAcceleration:function(c,g){return this.acceleration.set(c,g),this},setAccelerationX:function(c){return this.acceleration.x=c,this},setAccelerationY:function(c){return this.acceleration.y=c,this},setAllowDrag:function(c){return c===void 0&&(c=!0),this.allowDrag=c,this},setAllowGravity:function(c){return c===void 0&&(c=!0),this.allowGravity=c,this},setAllowRotation:function(c){return c===void 0&&(c=!0),this.allowRotation=c,this},setDrag:function(c,g){return this.drag.set(c,g),this},setDamping:function(c){return this.useDamping=c,this},setDragX:function(c){return this.drag.x=c,this},setDragY:function(c){return this.drag.y=c,this},setGravity:function(c,g){return this.gravity.set(c,g),this},setGravityX:function(c){return this.gravity.x=c,this},setGravityY:function(c){return this.gravity.y=c,this},setFriction:function(c,g){return this.friction.set(c,g),this},setFrictionX:function(c){return this.friction.x=c,this},setFrictionY:function(c){return this.friction.y=c,this},setAngularVelocity:function(c){return this.angularVelocity=c,this},setAngularAcceleration:function(c){return this.angularAcceleration=c,this},setAngularDrag:function(c){return this.angularDrag=c,this},setMass:function(c){return this.mass=c,this},setImmovable:function(c){return c===void 0&&(c=!0),this.immovable=c,this},setEnable:function(c){return c===void 0&&(c=!0),this.enable=c,this},processX:function(c,g,p,T){this.x+=c,this.updateCenter(),g!==null&&(this.velocity.x=g*this.slideFactor.x);var C=this.blocked;p&&(C.left=!0,C.none=!1),T&&(C.right=!0,C.none=!1)},processY:function(c,g,p,T){this.y+=c,this.updateCenter(),g!==null&&(this.velocity.y=g*this.slideFactor.y);var C=this.blocked;p&&(C.up=!0,C.none=!1),T&&(C.down=!0,C.none=!1)},x:{get:function(){return this.position.x},set:function(c){this.position.x=c}},y:{get:function(){return this.position.y},set:function(c){this.position.y=c}},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}}});h.exports=v},79342:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o,a,u,f,v){this.world=s,this.name="",this.active=!0,this.overlapOnly=r,this.object1=o,this.object2=a,this.collideCallback=u,this.processCallback=f,this.callbackContext=v},setName:function(i){return this.name=i,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}});h.exports=l},66022:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(71289),l=t(13759),i=t(37742),s=t(83419),r=t(37747),o=t(60758),a=t(72624),u=t(71464),f=new s({initialize:function(c){this.world=c,this.scene=c.scene,this.sys=c.scene.sys},collider:function(v,c,g,p,T){return this.world.addCollider(v,c,g,p,T)},overlap:function(v,c,g,p,T){return this.world.addOverlap(v,c,g,p,T)},existing:function(v,c){var g=c?r.STATIC_BODY:r.DYNAMIC_BODY;return this.world.enableBody(v,g),v},staticImage:function(v,c,g,p){var T=new e(this.scene,v,c,g,p);return this.sys.displayList.add(T),this.world.enableBody(T,r.STATIC_BODY),T},image:function(v,c,g,p){var T=new e(this.scene,v,c,g,p);return this.sys.displayList.add(T),this.world.enableBody(T,r.DYNAMIC_BODY),T},staticSprite:function(v,c,g,p){var T=new l(this.scene,v,c,g,p);return this.sys.displayList.add(T),this.sys.updateList.add(T),this.world.enableBody(T,r.STATIC_BODY),T},sprite:function(v,c,g,p){var T=new l(this.scene,v,c,g,p);return this.sys.displayList.add(T),this.sys.updateList.add(T),this.world.enableBody(T,r.DYNAMIC_BODY),T},staticGroup:function(v,c){return this.sys.updateList.add(new u(this.world,this.world.scene,v,c))},group:function(v,c){return this.sys.updateList.add(new o(this.world,this.world.scene,v,c))},body:function(v,c,g,p){var T=new i(this.world);return T.position.set(v,c),g&&p&&T.setSize(g,p),this.world.add(T,r.DYNAMIC_BODY),T},staticBody:function(v,c,g,p){var T=new a(this.world);return T.position.set(v,c),g&&p&&T.setSize(g,p),this.world.add(T,r.STATIC_BODY),T},destroy:function(){this.world=null,this.scene=null,this.sys=null}});h.exports=f},79599:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=0;if(!Array.isArray(t))e=t;else for(var l=0;l<t.length;l++)e|=t[l];return e};h.exports=d},64897:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37747),l=function(i,s,r,o){var a=0,u=i.deltaAbsX()+s.deltaAbsX()+o;return i._dx===0&&s._dx===0?(i.embedded=!0,s.embedded=!0):i._dx>s._dx?(a=i.right-s.x,a>u&&!r||i.checkCollision.right===!1||s.checkCollision.left===!1?a=0:(i.touching.none=!1,i.touching.right=!0,s.touching.none=!1,s.touching.left=!0,s.physicsType===e.STATIC_BODY&&!r&&(i.blocked.none=!1,i.blocked.right=!0),i.physicsType===e.STATIC_BODY&&!r&&(s.blocked.none=!1,s.blocked.left=!0))):i._dx<s._dx&&(a=i.x-s.width-s.x,-a>u&&!r||i.checkCollision.left===!1||s.checkCollision.right===!1?a=0:(i.touching.none=!1,i.touching.left=!0,s.touching.none=!1,s.touching.right=!0,s.physicsType===e.STATIC_BODY&&!r&&(i.blocked.none=!1,i.blocked.left=!0),i.physicsType===e.STATIC_BODY&&!r&&(s.blocked.none=!1,s.blocked.right=!0))),i.overlapX=a,s.overlapX=a,a};h.exports=l},45170:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37747),l=function(i,s,r,o){var a=0,u=i.deltaAbsY()+s.deltaAbsY()+o;return i._dy===0&&s._dy===0?(i.embedded=!0,s.embedded=!0):i._dy>s._dy?(a=i.bottom-s.y,a>u&&!r||i.checkCollision.down===!1||s.checkCollision.up===!1?a=0:(i.touching.none=!1,i.touching.down=!0,s.touching.none=!1,s.touching.up=!0,s.physicsType===e.STATIC_BODY&&!r&&(i.blocked.none=!1,i.blocked.down=!0),i.physicsType===e.STATIC_BODY&&!r&&(s.blocked.none=!1,s.blocked.up=!0))):i._dy<s._dy&&(a=i.y-s.bottom,-a>u&&!r||i.checkCollision.up===!1||s.checkCollision.down===!1?a=0:(i.touching.none=!1,i.touching.up=!0,s.touching.none=!1,s.touching.down=!0,s.physicsType===e.STATIC_BODY&&!r&&(i.blocked.none=!1,i.blocked.up=!0),i.physicsType===e.STATIC_BODY&&!r&&(s.blocked.none=!1,s.blocked.down=!0))),i.overlapY=a,s.overlapY=a,a};h.exports=l},60758:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(13759),l=t(83419),i=t(78389),s=t(37747),r=t(95540),o=t(26479),a=t(41212),u=new l({Extends:o,Mixins:[i],initialize:function(v,c,g,p){if(!g&&!p)p={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(a(g))p=g,g=null,p.internalCreateCallback=this.createCallbackHandler,p.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(g)&&a(g[0])){var T=this;g.forEach(function(C){C.internalCreateCallback=T.createCallbackHandler,C.internalRemoveCallback=T.removeCallbackHandler,C.classType=r(C,"classType",e)}),p=null}else p={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=v,p&&(p.classType=r(p,"classType",e)),this.physicsType=s.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:r(p,"collideWorldBounds",!1),setBoundsRectangle:r(p,"customBoundsRectangle",null),setAccelerationX:r(p,"accelerationX",0),setAccelerationY:r(p,"accelerationY",0),setAllowDrag:r(p,"allowDrag",!0),setAllowGravity:r(p,"allowGravity",!0),setAllowRotation:r(p,"allowRotation",!0),setDamping:r(p,"useDamping",!1),setBounceX:r(p,"bounceX",0),setBounceY:r(p,"bounceY",0),setDragX:r(p,"dragX",0),setDragY:r(p,"dragY",0),setEnable:r(p,"enable",!0),setGravityX:r(p,"gravityX",0),setGravityY:r(p,"gravityY",0),setFrictionX:r(p,"frictionX",0),setFrictionY:r(p,"frictionY",0),setMaxSpeed:r(p,"maxSpeed",-1),setMaxVelocityX:r(p,"maxVelocityX",1e4),setMaxVelocityY:r(p,"maxVelocityY",1e4),setVelocityX:r(p,"velocityX",0),setVelocityY:r(p,"velocityY",0),setAngularVelocity:r(p,"angularVelocity",0),setAngularAcceleration:r(p,"angularAcceleration",0),setAngularDrag:r(p,"angularDrag",0),setMass:r(p,"mass",1),setImmovable:r(p,"immovable",!1)},o.call(this,c,g,p),this.type="PhysicsGroup"},createCallbackHandler:function(f){(!f.body||f.body.physicsType!==s.DYNAMIC_BODY)&&(f.body&&(f.body.destroy(),f.body=null),this.world.enableBody(f,s.DYNAMIC_BODY));var v=f.body;for(var c in this.defaults)v[c](this.defaults[c])},removeCallbackHandler:function(f){f.body&&this.world.disableBody(f)},setVelocity:function(f,v,c){c===void 0&&(c=0);for(var g=this.getChildren(),p=0;p<g.length;p++)g[p].body.velocity.set(f+p*c,v+p*c);return this},setVelocityX:function(f,v){v===void 0&&(v=0);for(var c=this.getChildren(),g=0;g<c.length;g++)c[g].body.velocity.x=f+g*v;return this},setVelocityY:function(f,v){v===void 0&&(v=0);for(var c=this.getChildren(),g=0;g<c.length;g++)c[g].body.velocity.y=f+g*v;return this}});h.exports=u},3017:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d,t,e,l,i,s,r,o,a,u,f,v,c,g,p,T,C,M=function(w,O,B){d=w,t=O;var I=d.velocity.x,D=t.velocity.x;return e=d.pushable,a=d._dx<0,u=d._dx>0,f=d._dx===0,p=Math.abs(d.right-t.x)<=Math.abs(t.right-d.x),r=D-I*d.bounce.x,l=t.pushable,v=t._dx<0,c=t._dx>0,g=t._dx===0,T=!p,o=I-D*t.bounce.x,C=Math.abs(B),A()},A=function(){return u&&p&&t.blocked.right?(d.processX(-C,r,!1,!0),1):a&&T&&t.blocked.left?(d.processX(C,r,!0),1):c&&T&&d.blocked.right?(t.processX(-C,o,!1,!0),2):v&&p&&d.blocked.left?(t.processX(C,o,!0),2):0},R=function(){var w=d.velocity.x,O=t.velocity.x,B=Math.sqrt(O*O*t.mass/d.mass)*(O>0?1:-1),I=Math.sqrt(w*w*d.mass/t.mass)*(w>0?1:-1),D=(B+I)*.5;return B-=D,I-=D,i=D+B*d.bounce.x,s=D+I*t.bounce.x,a&&T?P(0):v&&p?P(1):u&&p?P(2):c&&T?P(3):!1},P=function(w){if(e&&l)C*=.5,w===0||w===3?(d.processX(C,i),t.processX(-C,s)):(d.processX(-C,i),t.processX(C,s));else if(e&&!l)w===0||w===3?d.processX(C,r,!0):d.processX(-C,r,!1,!0);else if(!e&&l)w===0||w===3?t.processX(-C,o,!1,!0):t.processX(C,o,!0);else{var O=C*.5;w===0?g?(d.processX(C,0,!0),t.processX(0,null,!1,!0)):c?(d.processX(O,0,!0),t.processX(-O,0,!1,!0)):(d.processX(O,t.velocity.x,!0),t.processX(-O,null,!1,!0)):w===1?f?(d.processX(0,null,!1,!0),t.processX(C,0,!0)):u?(d.processX(-O,0,!1,!0),t.processX(O,0,!0)):(d.processX(-O,null,!1,!0),t.processX(O,d.velocity.x,!0)):w===2?g?(d.processX(-C,0,!1,!0),t.processX(0,null,!0)):v?(d.processX(-O,0,!1,!0),t.processX(O,0,!0)):(d.processX(-O,t.velocity.x,!1,!0),t.processX(O,null,!0)):w===3&&(f?(d.processX(0,null,!0),t.processX(-C,0,!1,!0)):a?(d.processX(O,0,!0),t.processX(-O,0,!1,!0)):(d.processX(O,t.velocity.y,!0),t.processX(-O,null,!1,!0)))}return!0},L=function(w){if(w===1?t.velocity.x=0:p?t.processX(C,o,!0):t.processX(-C,o,!1,!0),d.moves){var O=d.directControl?d.y-d.autoFrame.y:d.y-d.prev.y;t.y+=O*d.friction.y,t._dy=t.y-t.prev.y}},F=function(w){if(w===2?d.velocity.x=0:T?d.processX(C,r,!0):d.processX(-C,r,!1,!0),t.moves){var O=t.directControl?t.y-t.autoFrame.y:t.y-t.prev.y;d.y+=O*t.friction.y,d._dy=d.y-d.prev.y}};h.exports={BlockCheck:A,Check:R,Set:M,Run:P,RunImmovableBody1:L,RunImmovableBody2:F}},47962:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d,t,e,l,i,s,r,o,a,u,f,v,c,g,p,T,C,M=function(w,O,B){d=w,t=O;var I=d.velocity.y,D=t.velocity.y;return e=d.pushable,a=d._dy<0,u=d._dy>0,f=d._dy===0,p=Math.abs(d.bottom-t.y)<=Math.abs(t.bottom-d.y),r=D-I*d.bounce.y,l=t.pushable,v=t._dy<0,c=t._dy>0,g=t._dy===0,T=!p,o=I-D*t.bounce.y,C=Math.abs(B),A()},A=function(){return u&&p&&t.blocked.down?(d.processY(-C,r,!1,!0),1):a&&T&&t.blocked.up?(d.processY(C,r,!0),1):c&&T&&d.blocked.down?(t.processY(-C,o,!1,!0),2):v&&p&&d.blocked.up?(t.processY(C,o,!0),2):0},R=function(){var w=d.velocity.y,O=t.velocity.y,B=Math.sqrt(O*O*t.mass/d.mass)*(O>0?1:-1),I=Math.sqrt(w*w*d.mass/t.mass)*(w>0?1:-1),D=(B+I)*.5;return B-=D,I-=D,i=D+B*d.bounce.y,s=D+I*t.bounce.y,a&&T?P(0):v&&p?P(1):u&&p?P(2):c&&T?P(3):!1},P=function(w){if(e&&l)C*=.5,w===0||w===3?(d.processY(C,i),t.processY(-C,s)):(d.processY(-C,i),t.processY(C,s));else if(e&&!l)w===0||w===3?d.processY(C,r,!0):d.processY(-C,r,!1,!0);else if(!e&&l)w===0||w===3?t.processY(-C,o,!1,!0):t.processY(C,o,!0);else{var O=C*.5;w===0?g?(d.processY(C,0,!0),t.processY(0,null,!1,!0)):c?(d.processY(O,0,!0),t.processY(-O,0,!1,!0)):(d.processY(O,t.velocity.y,!0),t.processY(-O,null,!1,!0)):w===1?f?(d.processY(0,null,!1,!0),t.processY(C,0,!0)):u?(d.processY(-O,0,!1,!0),t.processY(O,0,!0)):(d.processY(-O,null,!1,!0),t.processY(O,d.velocity.y,!0)):w===2?g?(d.processY(-C,0,!1,!0),t.processY(0,null,!0)):v?(d.processY(-O,0,!1,!0),t.processY(O,0,!0)):(d.processY(-O,t.velocity.y,!1,!0),t.processY(O,null,!0)):w===3&&(f?(d.processY(0,null,!0),t.processY(-C,0,!1,!0)):a?(d.processY(O,0,!0),t.processY(-O,0,!1,!0)):(d.processY(O,t.velocity.y,!0),t.processY(-O,null,!1,!0)))}return!0},L=function(w){if(w===1?t.velocity.y=0:p?t.processY(C,o,!0):t.processY(-C,o,!1,!0),d.moves){var O=d.directControl?d.x-d.autoFrame.x:d.x-d.prev.x;t.x+=O*d.friction.x,t._dx=t.x-t.prev.x}},F=function(w){if(w===2?d.velocity.y=0:T?d.processY(C,r,!0):d.processY(-C,r,!1,!0),t.moves){var O=t.directControl?t.x-t.autoFrame.x:t.x-t.prev.x;d.x+=O*t.friction.x,d._dx=d.x-d.prev.x}};h.exports={BlockCheck:A,Check:R,Set:M,Run:P,RunImmovableBody1:L,RunImmovableBody2:F}},14087:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(64897),l=t(3017),i=function(s,r,o,a,u){u===void 0&&(u=e(s,r,o,a));var f=s.immovable,v=r.immovable;if(o||u===0||f&&v||s.customSeparateX||r.customSeparateX)return u!==0||s.embedded&&r.embedded;var c=l.Set(s,r,u);return!f&&!v?c>0?!0:l.Check():(f?l.RunImmovableBody1(c):v&&l.RunImmovableBody2(c),!0)};h.exports=i},89936:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45170),l=t(47962),i=function(s,r,o,a,u){u===void 0&&(u=e(s,r,o,a));var f=s.immovable,v=r.immovable;if(o||u===0||f&&v||s.customSeparateY||r.customSeparateY)return u!==0||s.embedded&&r.embedded;var c=l.Set(s,r,u);return!f&&!v?c>0?!0:l.Check():(f?l.RunImmovableBody1(c):v&&l.RunImmovableBody2(c),!0)};h.exports=i},95829:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===void 0&&(e={}),e.none=t,e.up=!1,e.down=!1,e.left=!1,e.right=!1,t||(e.up=!0,e.down=!0,e.left=!0,e.right=!0),e};h.exports=d},72624:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87902),l=t(83419),i=t(78389),s=t(37747),r=t(37303),o=t(95829),a=t(26099),u=new l({Mixins:[i],initialize:function(v,c){var g=64,p=64,T={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},C=c!==void 0;C&&c.displayWidth&&(g=c.displayWidth,p=c.displayHeight),C||(c=T),this.world=v,this.gameObject=C?c:void 0,this.isBody=!0,this.debugShowBody=v.defaults.debugShowStaticBody,this.debugBodyColor=v.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(c.x-g*c.originX,c.y-p*c.originY),this.width=g,this.height=p,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.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=o(!1),this.touching=o(!0),this.wasTouching=o(!0),this.blocked=o(!0),this.physicsType=s.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(f,v,c){if(v===void 0&&(v=!0),c===void 0&&(c=!0),!f||!f.hasTransformComponent)return this;var g=this.world;return this.gameObject&&this.gameObject.body&&(g.disable(this.gameObject),this.gameObject.body=null),f.body&&g.disable(f),this.gameObject=f,f.body=this,this.setSize(),v&&this.updateFromGameObject(),this.enable=c,this},updateFromGameObject:function(){this.world.staticTree.remove(this);var f=this.gameObject;return f.getTopLeft(this.position),this.width=f.displayWidth,this.height=f.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(f,v){return v===void 0&&(v=f),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(f,v),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(f,v,c){c===void 0&&(c=!0);var g=this.gameObject;if(g&&g.frame&&(f||(f=g.frame.realWidth),v||(v=g.frame.realHeight)),this.world.staticTree.remove(this),this.width=f,this.height=v,this.halfWidth=Math.floor(f/2),this.halfHeight=Math.floor(v/2),c&&g&&g.getCenter){var p=g.displayWidth/2,T=g.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(p-this.halfWidth,T-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(f,v,c){return v===void 0&&(v=this.offset.x),c===void 0&&(c=this.offset.y),f>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=f,this.width=f*2,this.height=f*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(v,c),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(f,v){var c=this.gameObject;f===void 0&&(f=c.x),v===void 0&&(v=c.y),this.world.staticTree.remove(this),c.setPosition(f,v),c.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(f){return f.x=this.x,f.y=this.y,f.right=this.right,f.bottom=this.bottom,f},hitTest:function(f,v){return this.isCircle?e(this,f,v):r(this,f,v)},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.add(this)},drawDebug:function(f){var v=this.position,c=v.x+this.halfWidth,g=v.y+this.halfHeight;this.debugShowBody&&(f.lineStyle(f.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?f.strokeCircle(c,g,this.width/2):f.strokeRect(v.x,v.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(f){return f<=0&&(f=.1),this.mass=f,this},x:{get:function(){return this.position.x},set:function(f){this.world.staticTree.remove(this),this.position.x=f,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(f){this.world.staticTree.remove(this),this.position.y=f,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}}});h.exports=u},71464:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(13759),l=t(83419),i=t(78389),s=t(37747),r=t(95540),o=t(26479),a=t(41212),u=new l({Extends:o,Mixins:[i],initialize:function(v,c,g,p){!g&&!p?p={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:e}:a(g)?(p=g,g=null,p.internalCreateCallback=this.createCallbackHandler,p.internalRemoveCallback=this.removeCallbackHandler,p.createMultipleCallback=this.createMultipleCallbackHandler,p.classType=r(p,"classType",e)):Array.isArray(g)&&a(g[0])?(p=g,g=null,p.forEach(function(T){T.internalCreateCallback=this.createCallbackHandler,T.internalRemoveCallback=this.removeCallbackHandler,T.createMultipleCallback=this.createMultipleCallbackHandler,T.classType=r(T,"classType",e)},this)):p={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=v,this.physicsType=s.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,o.call(this,c,g,p),this.type="StaticPhysicsGroup"},createCallbackHandler:function(f){(!f.body||f.body.physicsType!==s.STATIC_BODY)&&(f.body&&(f.body.destroy(),f.body=null),this.world.enableBody(f,s.STATIC_BODY))},removeCallbackHandler:function(f){f.body&&this.world.disableBody(f)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var f=Array.from(this.children),v=0;v<f.length;v++)f[v].body.reset();return this}});h.exports=u},82248:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(55495),l=t(37742),i=t(45319),s=t(83419),r=t(79342),o=t(37747),a=t(20339),u=t(52816),f=t(50792),v=t(63012),c=t(43855),g=t(5470),p=t(94977),T=t(64897),C=t(45170),M=t(96523),A=t(35154),R=t(36383),P=t(25774),L=t(96602),F=t(87841),w=t(59542),O=t(40012),B=t(14087),I=t(89936),D=t(72624),N=t(2483),z=t(61340),V=t(26099),U=t(15994),G=new s({Extends:f,initialize:function(Y,W){f.call(this),this.scene=Y,this.bodies=new Set,this.staticBodies=new Set,this.pendingDestroy=new Set,this.colliders=new P,this.gravity=new V(A(W,"gravity.x",0),A(W,"gravity.y",0)),this.bounds=new F(A(W,"x",0),A(W,"y",0),A(W,"width",Y.sys.scale.width),A(W,"height",Y.sys.scale.height)),this.checkCollision={up:A(W,"checkCollision.up",!0),down:A(W,"checkCollision.down",!0),left:A(W,"checkCollision.left",!0),right:A(W,"checkCollision.right",!0)},this.fps=A(W,"fps",60),this.fixedStep=A(W,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=A(W,"timeScale",1),this.OVERLAP_BIAS=A(W,"overlapBias",4),this.TILE_BIAS=A(W,"tileBias",16),this.forceX=A(W,"forceX",!1),this.isPaused=A(W,"isPaused",!1),this._total=0,this.drawDebug=A(W,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:A(W,"debugShowBody",!0),debugShowStaticBody:A(W,"debugShowStaticBody",!0),debugShowVelocity:A(W,"debugShowVelocity",!0),bodyDebugColor:A(W,"debugBodyColor",16711935),staticBodyDebugColor:A(W,"debugStaticBodyColor",255),velocityDebugColor:A(W,"debugVelocityColor",65280)},this.maxEntries=A(W,"maxEntries",16),this.useTree=A(W,"useTree",!0),this.tree=new w(this.maxEntries),this.staticTree=new w(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new z,this._tempMatrix2=new z,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(b,Y){Y===void 0&&(Y=o.DYNAMIC_BODY),Array.isArray(b)||(b=[b]);for(var W=0;W<b.length;W++){var H=b[W];if(H.isParent)for(var X=H.getChildren(),K=0;K<X.length;K++){var Z=X[K];Z.isParent?this.enable(Z,Y):this.enableBody(Z,Y)}else this.enableBody(H,Y)}},enableBody:function(b,Y){return Y===void 0&&(Y=o.DYNAMIC_BODY),b.hasTransformComponent&&(b.body||(Y===o.DYNAMIC_BODY?b.body=new l(this,b):Y===o.STATIC_BODY&&(b.body=new D(this,b))),this.add(b.body)),b},add:function(b){return b.physicsType===o.DYNAMIC_BODY?this.bodies.add(b):b.physicsType===o.STATIC_BODY&&(this.staticBodies.add(b),this.staticTree.insert(b)),b.enable=!0,b},disable:function(b){Array.isArray(b)||(b=[b]);for(var Y=0;Y<b.length;Y++){var W=b[Y];if(W.isParent)for(var H=W.getChildren(),X=0;X<H.length;X++){var K=H[X];K.isParent?this.disable(K):this.disableBody(K.body)}else this.disableBody(W.body)}},disableBody:function(b){this.remove(b),b.enable=!1},remove:function(b){b.physicsType===o.DYNAMIC_BODY?(this.tree.remove(b),this.bodies.delete(b)):b.physicsType===o.STATIC_BODY&&(this.staticBodies.delete(b),this.staticTree.remove(b))},createDebugGraphic:function(){var b=this.scene.sys.add.graphics({x:0,y:0});return b.setDepth(Number.MAX_VALUE),this.debugGraphic=b,this.drawDebug=!0,b},setBounds:function(b,Y,W,H,X,K,Z,Q){return this.bounds.setTo(b,Y,W,H),X!==void 0&&this.setBoundsCollision(X,K,Z,Q),this},setBoundsCollision:function(b,Y,W,H){return b===void 0&&(b=!0),Y===void 0&&(Y=!0),W===void 0&&(W=!0),H===void 0&&(H=!0),this.checkCollision.left=b,this.checkCollision.right=Y,this.checkCollision.up=W,this.checkCollision.down=H,this},pause:function(){return this.isPaused=!0,this.emit(v.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(v.RESUME),this},addCollider:function(b,Y,W,H,X){W===void 0&&(W=null),H===void 0&&(H=null),X===void 0&&(X=W);var K=new r(this,!1,b,Y,W,H,X);return this.colliders.add(K),K},addOverlap:function(b,Y,W,H,X){W===void 0&&(W=null),H===void 0&&(H=null),X===void 0&&(X=W);var K=new r(this,!0,b,Y,W,H,X);return this.colliders.add(K),K},removeCollider:function(b){return this.colliders.remove(b),this},setFPS:function(b){return this.fps=b,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(b,Y){if(!(this.isPaused||this.bodies.size===0)){var W=this._frameTime,H=this._frameTimeMS*this.timeScale;this._elapsed+=Y;var X=this.bodies,K=this._elapsed>=H;if(this.fixedStep||(W=Y*.001,K=!0,this._elapsed=0),X.forEach(function(J){J.enable&&J.preUpdate(K,W)}),K){this._elapsed-=H,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(Array.from(X)));for(var Z=this.colliders.update(),Q=0;Q<Z.length;Q++){var j=Z[Q];j.active&&j.update()}this.emit(v.WORLD_STEP,W)}for(;this._elapsed>=H;)this._elapsed-=H,this.step(W)}},step:function(b){var Y=this.bodies;Y.forEach(function(K){K.enable&&K.update(b)}),this.useTree&&(this.tree.clear(),this.tree.load(Array.from(Y)));for(var W=this.colliders.update(),H=0;H<W.length;H++){var X=W[H];X.active&&X.update()}this.emit(v.WORLD_STEP,b),this.stepsLastFrame++},singleStep:function(){this.update(0,this._frameTimeMS),this.postUpdate()},postUpdate:function(){var b=this.bodies,Y=this.staticBodies;if(this.stepsLastFrame&&(this.stepsLastFrame=0,b.forEach(function(Z){Z.enable&&Z.postUpdate()})),this.drawDebug){var W=this.debugGraphic;W.clear(),b.forEach(function(Z){Z.willDrawDebug()&&Z.drawDebug(W)}),Y.forEach(function(Z){Z.willDrawDebug()&&Z.drawDebug(W)})}var H=this.pendingDestroy;if(H.size>0){var X=this.tree,K=this.staticTree;H.forEach(function(Z){Z.physicsType===o.DYNAMIC_BODY?(X.remove(Z),b.delete(Z)):Z.physicsType===o.STATIC_BODY&&(K.remove(Z),Y.delete(Z)),Z.world=void 0,Z.gameObject=void 0}),H.clear()}},updateMotion:function(b,Y){b.allowRotation&&this.computeAngularVelocity(b,Y),this.computeVelocity(b,Y)},computeAngularVelocity:function(b,Y){var W=b.angularVelocity,H=b.angularAcceleration,X=b.angularDrag,K=b.maxAngular;H?W+=H*Y:b.allowDrag&&X&&(X*=Y,g(W-X,0,.1)?W-=X:p(W+X,0,.1)?W+=X:W=0),W=i(W,-K,K);var Z=W-b.angularVelocity;b.angularVelocity+=Z,b.rotation+=b.angularVelocity*Y},computeVelocity:function(b,Y){var W=b.velocity.x,H=b.acceleration.x,X=b.drag.x,K=b.maxVelocity.x,Z=b.velocity.y,Q=b.acceleration.y,j=b.drag.y,J=b.maxVelocity.y,tt=b.speed,k=b.maxSpeed,q=b.allowDrag,_=b.useDamping;b.allowGravity&&(W+=(this.gravity.x+b.gravity.x)*Y,Z+=(this.gravity.y+b.gravity.y)*Y),H?W+=H*Y:q&&X&&(_?(X=Math.pow(X,Y),W*=X,tt=Math.sqrt(W*W+Z*Z),c(tt,0,.001)&&(W=0)):(X*=Y,g(W-X,0,.01)?W-=X:p(W+X,0,.01)?W+=X:W=0)),Q?Z+=Q*Y:q&&j&&(_?(j=Math.pow(j,Y),Z*=j,tt=Math.sqrt(W*W+Z*Z),c(tt,0,.001)&&(Z=0)):(j*=Y,g(Z-j,0,.01)?Z-=j:p(Z+j,0,.01)?Z+=j:Z=0)),W=i(W,-K,K),Z=i(Z,-J,J),b.velocity.set(W,Z),k>-1&&b.velocity.length()>k&&(b.velocity.normalize().scale(k),tt=k),b.speed=tt},separate:function(b,Y,W,H,X){var K,Z,Q=!1,j=!0;if(!b.enable||!Y.enable||b.checkCollision.none||Y.checkCollision.none||!this.intersects(b,Y)||W&&W.call(H,b.gameObject||b,Y.gameObject||Y)===!1)return Q;if(b.isCircle||Y.isCircle){var J=this.separateCircle(b,Y,X);J.result?(Q=!0,j=!1):(K=J.x,Z=J.y,j=!0)}if(j){var tt=!1,k=!1,q=this.OVERLAP_BIAS;X?(tt=B(b,Y,X,q,K),k=I(b,Y,X,q,Z)):this.forceX||Math.abs(this.gravity.y+b.gravity.y)<Math.abs(this.gravity.x+b.gravity.x)?(tt=B(b,Y,X,q,K),this.intersects(b,Y)&&(k=I(b,Y,X,q,Z))):(k=I(b,Y,X,q,Z),this.intersects(b,Y)&&(tt=B(b,Y,X,q,K))),Q=tt||k}return Q&&(X?(b.onOverlap||Y.onOverlap)&&this.emit(v.OVERLAP,b.gameObject,Y.gameObject,b,Y):(b.onCollide||Y.onCollide)&&this.emit(v.COLLIDE,b.gameObject,Y.gameObject,b,Y)),Q},separateCircle:function(b,Y,W){T(b,Y,!1,0),C(b,Y,!1,0);var H=b.isCircle,X=Y.isCircle,K=b.center,Z=Y.center,Q=b.immovable,j=Y.immovable,J=b.velocity,tt=Y.velocity,k=0,q=!0;if(H!==X){q=!1;var _=K.x,rt=K.y,at=b.halfWidth,ht=Y.position.x,ot=Y.position.y,nt=Y.right,it=Y.bottom;X&&(_=Z.x,rt=Z.y,at=Y.halfWidth,ht=b.position.x,ot=b.position.y,nt=b.right,it=b.bottom),rt<ot?_<ht?k=a(_,rt,ht,ot)-at:_>nt&&(k=a(_,rt,nt,ot)-at):rt>it&&(_<ht?k=a(_,rt,ht,it)-at:_>nt&&(k=a(_,rt,nt,it)-at)),k*=-1}else k=b.halfWidth+Y.halfWidth-u(K,Z);b.overlapR=k,Y.overlapR=k;var lt=e(K,Z),dt=(k+R.EPSILON)*Math.cos(lt),ct=(k+R.EPSILON)*Math.sin(lt),Bt={overlap:k,result:!1,x:dt,y:ct};if(W&&(!q||q&&k!==0))return Bt.result=!0,Bt;if(!q&&k===0||Q&&j||b.customSeparateX||Y.customSeparateX)return Bt.x=void 0,Bt.y=void 0,Bt;var Lt=!b.pushable&&!Y.pushable;if(q){var zt=K.x-Z.x,Kt=K.y-Z.y,fe=Math.sqrt(Math.pow(zt,2)+Math.pow(Kt,2)),pe=(Z.x-K.x)/fe||0,le=(Z.y-K.y)/fe||0,de=2*(J.x*pe+J.y*le-tt.x*pe-tt.y*le)/(b.mass+Y.mass);(Q||j||!b.pushable||!Y.pushable)&&(de*=2),!Q&&b.pushable&&(J.x=J.x-de/b.mass*pe,J.y=J.y-de/b.mass*le,J.multiply(b.bounce)),!j&&Y.pushable&&(tt.x=tt.x+de/Y.mass*pe,tt.y=tt.y+de/Y.mass*le,tt.multiply(Y.bounce)),!Q&&!j&&(dt*=.5,ct*=.5),(!Q||b.pushable||Lt)&&(b.x-=dt,b.y-=ct,b.updateCenter()),(!j||Y.pushable||Lt)&&(Y.x+=dt,Y.y+=ct,Y.updateCenter()),Bt.result=!0}else(!Q||b.pushable||Lt)&&(b.x-=dt,b.y-=ct,b.updateCenter()),(!j||Y.pushable||Lt)&&(Y.x+=dt,Y.y+=ct,Y.updateCenter()),Bt.x=void 0,Bt.y=void 0;return Bt},intersects:function(b,Y){return b===Y?!1:!b.isCircle&&!Y.isCircle?!(b.right<=Y.left||b.bottom<=Y.top||b.left>=Y.right||b.top>=Y.bottom):b.isCircle?Y.isCircle?u(b.center,Y.center)<=b.halfWidth+Y.halfWidth:this.circleBodyIntersects(b,Y):this.circleBodyIntersects(Y,b)},circleBodyIntersects:function(b,Y){var W=i(b.center.x,Y.left,Y.right),H=i(b.center.y,Y.top,Y.bottom),X=(b.center.x-W)*(b.center.x-W),K=(b.center.y-H)*(b.center.y-H);return X+K<=b.halfWidth*b.halfWidth},overlap:function(b,Y,W,H,X){return W===void 0&&(W=null),H===void 0&&(H=null),X===void 0&&(X=W),this.collideObjects(b,Y,W,H,X,!0)},collide:function(b,Y,W,H,X){return W===void 0&&(W=null),H===void 0&&(H=null),X===void 0&&(X=W),this.collideObjects(b,Y,W,H,X,!1)},collideObjects:function(b,Y,W,H,X,K){var Z,Q;b.isParent&&(b.physicsType===void 0||Y===void 0||b===Y)&&(b=Array.from(b.children)),Y&&Y.isParent&&Y.physicsType===void 0&&(Y=Array.from(Y.children));var j=Array.isArray(b),J=Array.isArray(Y);if(this._total=0,!j&&!J)this.collideHandler(b,Y,W,H,X,K);else if(!j&&J)for(Z=0;Z<Y.length;Z++)this.collideHandler(b,Y[Z],W,H,X,K);else if(j&&!J)if(Y)for(Z=0;Z<b.length;Z++)this.collideHandler(b[Z],Y,W,H,X,K);else for(Z=0;Z<b.length;Z++){var tt=b[Z];for(Q=Z+1;Q<b.length;Q++)Z!==Q&&this.collideHandler(tt,b[Q],W,H,X,K)}else for(Z=0;Z<b.length;Z++)for(Q=0;Q<Y.length;Q++)this.collideHandler(b[Z],Y[Q],W,H,X,K);return this._total>0},collideHandler:function(b,Y,W,H,X,K){if(Y===void 0&&b.isParent)return this.collideGroupVsGroup(b,b,W,H,X,K);if(!b||!Y)return!1;if(b.body||b.isBody){if(Y.body||Y.isBody)return this.collideSpriteVsSprite(b,Y,W,H,X,K);if(Y.isParent)return this.collideSpriteVsGroup(b,Y,W,H,X,K);if(Y.isTilemap)return this.collideSpriteVsTilemapLayer(b,Y,W,H,X,K)}else if(b.isParent){if(Y.body||Y.isBody)return this.collideSpriteVsGroup(Y,b,W,H,X,K);if(Y.isParent)return this.collideGroupVsGroup(b,Y,W,H,X,K);if(Y.isTilemap)return this.collideGroupVsTilemapLayer(b,Y,W,H,X,K)}else if(b.isTilemap){if(Y.body||Y.isBody)return this.collideSpriteVsTilemapLayer(Y,b,W,H,X,K);if(Y.isParent)return this.collideGroupVsTilemapLayer(Y,b,W,H,X,K)}},canCollide:function(b,Y){return b&&Y&&(b.collisionMask&Y.collisionCategory)!==0&&(Y.collisionMask&b.collisionCategory)!==0},collideSpriteVsSprite:function(b,Y,W,H,X,K){var Z=b.isBody?b:b.body,Q=Y.isBody?Y:Y.body;return this.canCollide(Z,Q)?(this.separate(Z,Q,H,X,K)&&(W&&W.call(X,b,Y),this._total++),!0):!1},collideSpriteVsGroup:function(b,Y,W,H,X,K){var Z=b.isBody?b:b.body;if(!(Y.getLength()===0||!Z||!Z.enable||Z.checkCollision.none||!this.canCollide(Z,Y))){var Q,j,J;if(this.useTree||Y.physicsType===o.STATIC_BODY){var tt=this.treeMinMax;tt.minX=Z.left,tt.minY=Z.top,tt.maxX=Z.right,tt.maxY=Z.bottom;var k=Y.physicsType===o.DYNAMIC_BODY?this.tree.search(tt):this.staticTree.search(tt);for(j=k.length,Q=0;Q<j;Q++)J=k[Q],!(Z===J||!J.enable||J.checkCollision.none||!Y.contains(J.gameObject))&&this.separate(Z,J,H,X,K)&&(W&&W.call(X,Z.gameObject,J.gameObject),this._total++)}else{var q=Y.getChildren(),_=q.indexOf(b);for(j=q.length,Q=0;Q<j;Q++)J=q[Q].body,!(!J||Q===_||!J.enable)&&this.separate(Z,J,H,X,K)&&(W&&W.call(X,Z.gameObject,J.gameObject),this._total++)}}},collideGroupVsTilemapLayer:function(b,Y,W,H,X,K){if(!this.canCollide(b,Y))return!1;var Z=b.getChildren();if(Z.length===0)return!1;for(var Q=!1,j=0;j<Z.length;j++)(Z[j].body||Z[j].isBody)&&this.collideSpriteVsTilemapLayer(Z[j],Y,W,H,X,K)&&(Q=!0);return Q},collideTiles:function(b,Y,W,H,X){return Y.length===0||b.body&&!b.body.enable||b.isBody&&!b.enable?!1:this.collideSpriteVsTilesHandler(b,Y,W,H,X,!1,!1)},overlapTiles:function(b,Y,W,H,X){return Y.length===0||b.body&&!b.body.enable||b.isBody&&!b.enable?!1:this.collideSpriteVsTilesHandler(b,Y,W,H,X,!0,!1)},collideSpriteVsTilemapLayer:function(b,Y,W,H,X,K){var Z=b.isBody?b:b.body;if(!Z.enable||Z.checkCollision.none||!this.canCollide(Z,Y))return!1;var Q=Y.layer,j=Z.x-Q.tileWidth*Y.scaleX,J=Z.y-Q.tileHeight*Y.scaleY,tt=Z.width+Q.tileWidth*Y.scaleX,k=Z.height+Q.tileHeight*Y.scaleY,q=K?null:this.tileFilterOptions,_=M(j,J,tt,k,q,Y.scene.cameras.main,Y.layer);return _.length===0?!1:this.collideSpriteVsTilesHandler(b,_,W,H,X,K,!0)},collideSpriteVsTilesHandler:function(b,Y,W,H,X,K,Z){for(var Q=b.isBody?b:b.body,j,J={left:0,right:0,top:0,bottom:0},tt,k=!1,q=0;q<Y.length;q++){j=Y[q],tt=j.tilemapLayer;var _=tt.tileToWorldXY(j.x,j.y);J.left=_.x,J.top=_.y,J.right=J.left+j.width*tt.scaleX,J.bottom=J.top+j.height*tt.scaleY,N(J,Q)&&(!H||H.call(X,b,j))&&L(j,b)&&(K||O(q,Q,j,J,tt,this.TILE_BIAS,Z))&&(this._total++,k=!0,W&&W.call(X,b,j),K&&Q.onOverlap?this.emit(v.TILE_OVERLAP,b,j,Q):Q.onCollide&&this.emit(v.TILE_COLLIDE,b,j,Q))}return k},collideGroupVsGroup:function(b,Y,W,H,X,K){if(!(b.getLength()===0||Y.getLength()===0||!this.canCollide(b,Y)))for(var Z=b.getChildren(),Q=0;Q<Z.length;Q++)this.collideSpriteVsGroup(Z[Q],Y,W,H,X,K)},wrap:function(b,Y){b.body?this.wrapObject(b,Y):b.getChildren?this.wrapArray(b.getChildren(),Y):Array.isArray(b)?this.wrapArray(b,Y):this.wrapObject(b,Y)},wrapArray:function(b,Y){for(var W=0;W<b.length;W++)this.wrapObject(b[W],Y)},wrapObject:function(b,Y){Y===void 0&&(Y=0),b.x=U(b.x,this.bounds.left-Y,this.bounds.right+Y),b.y=U(b.y,this.bounds.top-Y,this.bounds.bottom+Y)},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)}});h.exports=G},1093:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};h.exports=d},59023:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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}};h.exports=d},62069:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,l,i){return this.body.setCollideWorldBounds(t,e,l,i),this}};h.exports=d},78389:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(79599),l={setCollisionCategory:function(i){var s=this.body?this.body:this;return s.collisionCategory=i,this},willCollideWith:function(i){var s=this.body?this.body:this;return(s.collisionMask&i)!==0},addCollidesWith:function(i){var s=this.body?this.body:this;return s.collisionMask=s.collisionMask|i,this},removeCollidesWith:function(i){var s=this.body?this.body:this;return s.collisionMask=s.collisionMask&~i,this},setCollidesWith:function(i){var s=this.body?this.body:this;return s.collisionMask=e(i),this},resetCollisionCategory:function(){var i=this.body?this.body:this;return i.collisionCategory=1,i.collisionMask=2147483647,this}};h.exports=l},87118:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setDebug:function(t,e,l){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=l,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}}};h.exports=d},52819:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}};h.exports=d},4074:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,e,l,i,s){return t&&this.body.reset(e,l),i&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return t===void 0&&(t=!1),e===void 0&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};h.exports=d},40831:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};h.exports=d},26775:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};h.exports=d},9437:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};h.exports=d},30621:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setMass:function(t){return this.body.mass=t,this}};h.exports=d},72441:(h,d,t)=>{var e=t(47956),l=t(96503),i=t(2044),s=t(81491),r=function(o,a,u,f,v,c){var g=e(o,a-f,u-f,2*f,2*f,v,c);if(g.length===0)return g;for(var p=new l(a,u,f),T=new l,C=[],M=0;M<g.length;M++){var A=g[M];A.isCircle?(T.setTo(A.center.x,A.center.y,A.halfWidth),i(p,T)&&C.push(A)):s(p,A)&&C.push(A)}return C};h.exports=r},47956:h=>{var d=function(t,e,l,i,s,r,o){r===void 0&&(r=!0),o===void 0&&(o=!1);var a=[],u=[],f=t.treeMinMax;if(f.minX=e,f.minY=l,f.maxX=e+i,f.maxY=l+s,o&&(u=t.staticTree.search(f)),r&&t.useTree)a=t.tree.search(f);else if(r)for(var v=Array.from(t.bodies),c={position:{x:e,y:l},left:e,top:l,right:e+i,bottom:l+s,isCircle:!1},g=t.intersects,p=0;p<v.length;p++){var T=v[p];g(T,c)&&a.push(T)}return u.concat(a)};h.exports=d},62121:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};h.exports=d},29384:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,l){return this.body.setSize(t,e,l),this},setBodySize:function(t,e,l){return this.body.setSize(t,e,l),this},setCircle:function(t,e,l){return this.body.setCircle(t,e,l),this}};h.exports=d},15098:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}};h.exports=d},92209:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Acceleration:t(1093),Angular:t(59023),Bounce:t(62069),Collision:t(78389),Debug:t(87118),Drag:t(52819),Enable:t(4074),Friction:t(40831),Gravity:t(26775),Immovable:t(9437),Mass:t(30621),OverlapCirc:t(72441),OverlapRect:t(47956),Pushable:t(62121),Size:t(29384),Velocity:t(15098)}},37747:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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};h.exports=d},20009:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="collide"},36768:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="overlap"},60473:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pause"},89954:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resume"},61804:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="tilecollide"},7161:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="tileoverlap"},34689:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="worldbounds"},16006:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="worldstep"},63012:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37747),l=t(79291),i={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)};i=l(!1,i,e),h.exports=i},96602:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t):!0};h.exports=d},36294:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};h.exports=d},67013:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};h.exports=d},40012:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(21329),l=t(53442),i=t(2483),s=function(r,o,a,u,f,v,c){var g=u.left,p=u.top,T=u.right,C=u.bottom,M=a.faceLeft||a.faceRight,A=a.faceTop||a.faceBottom;if(c||(M=!0,A=!0),!M&&!A)return!1;var R=0,P=0,L=0,F=1;if(o.deltaAbsX()>o.deltaAbsY()?L=-1:o.deltaAbsX()<o.deltaAbsY()&&(F=-1),o.deltaX()!==0&&o.deltaY()!==0&&M&&A&&(L=Math.min(Math.abs(o.position.x-T),Math.abs(o.right-g)),F=Math.min(Math.abs(o.position.y-C),Math.abs(o.bottom-p))),L<F){if(M&&(R=e(o,a,g,T,v,c),R!==0&&!i(u,o)))return!0;A&&(P=l(o,a,p,C,v,c))}else{if(A&&(P=l(o,a,p,C,v,c),P!==0&&!i(u,o)))return!0;M&&(R=e(o,a,g,T,v,c))}return R!==0||P!==0};h.exports=s},21329:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(36294),l=function(i,s,r,o,a,u){var f=0,v=s.faceLeft,c=s.faceRight,g=s.collideLeft,p=s.collideRight;return u||(v=!0,c=!0,g=!0,p=!0),i.deltaX()<0&&p&&i.checkCollision.left?c&&i.x<o&&(f=i.x-o,f<-a&&(f=0)):i.deltaX()>0&&g&&i.checkCollision.right&&v&&i.right>r&&(f=i.right-r,f>a&&(f=0)),f!==0&&(i.customSeparateX?i.overlapX=f:e(i,f)),f};h.exports=l},53442:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(67013),l=function(i,s,r,o,a,u){var f=0,v=s.faceTop,c=s.faceBottom,g=s.collideUp,p=s.collideDown;return u||(v=!0,c=!0,g=!0,p=!0),i.deltaY()<0&&p&&i.checkCollision.up?c&&i.y<o&&(f=i.y-o,f<-a&&(f=0)):i.deltaY()>0&&g&&i.checkCollision.down&&v&&i.bottom>r&&(f=i.bottom-r,f>a&&(f=0)),f!==0&&(i.customSeparateY?i.overlapY=f:e(i,f)),f};h.exports=l},2483:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)};h.exports=d},55173:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};h.exports=e},44563:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Arcade:t(27064),Matter:t(3875)}},68174:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(26099),i=new e({initialize:function(){this.boundsCenter=new l,this.centerDiff=new l},parseBody:function(s){if(s=s.hasOwnProperty("body")?s.body:s,!s.hasOwnProperty("bounds")||!s.hasOwnProperty("centerOfMass"))return!1;var r=this.boundsCenter,o=this.centerDiff,a=s.bounds.max.x-s.bounds.min.x,u=s.bounds.max.y-s.bounds.min.y,f=a*s.centerOfMass.x,v=u*s.centerOfMass.y;return r.set(a/2,u/2),o.set(f-r.x,v-r.y),!0},getTopLeft:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.boundsCenter,u=this.centerDiff;return new l(r+a.x+u.x,o+a.y+u.y)}return!1},getTopCenter:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.boundsCenter,u=this.centerDiff;return new l(r+u.x,o+a.y+u.y)}return!1},getTopRight:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.boundsCenter,u=this.centerDiff;return new l(r-(a.x-u.x),o+a.y+u.y)}return!1},getLeftCenter:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.boundsCenter,u=this.centerDiff;return new l(r+a.x+u.x,o+u.y)}return!1},getCenter:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.centerDiff;return new l(r+a.x,o+a.y)}return!1},getRightCenter:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.boundsCenter,u=this.centerDiff;return new l(r-(a.x-u.x),o+u.y)}return!1},getBottomLeft:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.boundsCenter,u=this.centerDiff;return new l(r+a.x+u.x,o-(a.y-u.y))}return!1},getBottomCenter:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.boundsCenter,u=this.centerDiff;return new l(r+u.x,o-(a.y-u.y))}return!1},getBottomRight:function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),this.parseBody(s)){var a=this.boundsCenter,u=this.centerDiff;return new l(r-(a.x-u.x),o-(a.y-u.y))}return!1}});h.exports=i},19933:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(6790);e.Body=t(22562),e.Composite=t(69351),e.World=t(4372),e.Collision=t(52284),e.Detector=t(81388),e.Pairs=t(99561),e.Pair=t(4506),e.Query=t(73296),e.Resolver=t(66272),e.Constraint=t(48140),e.Common=t(53402),e.Engine=t(48413),e.Events=t(35810),e.Sleeping=t(53614),e.Plugin=t(73832),e.Bodies=t(66280),e.Composites=t(74116),e.Axes=t(66615),e.Bounds=t(15647),e.Svg=t(74058),e.Vector=t(31725),e.Vertices=t(41598),e.World.add=e.Composite.add,e.World.remove=e.Composite.remove,e.World.addComposite=e.Composite.addComposite,e.World.addBody=e.Composite.addBody,e.World.addConstraint=e.Composite.addConstraint,e.World.clear=e.Composite.clear,h.exports=e},28137:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66280),l=t(83419),i=t(74116),s=t(48140),r=t(74058),o=t(75803),a=t(23181),u=t(34803),f=t(73834),v=t(19496),c=t(85791),g=t(98713),p=t(41598),T=new l({initialize:function(M){this.world=M,this.scene=M.scene,this.sys=M.scene.sys},rectangle:function(C,M,A,R,P){var L=e.rectangle(C,M,A,R,P);return this.world.add(L),L},trapezoid:function(C,M,A,R,P,L){var F=e.trapezoid(C,M,A,R,P,L);return this.world.add(F),F},circle:function(C,M,A,R,P){var L=e.circle(C,M,A,R,P);return this.world.add(L),L},polygon:function(C,M,A,R,P){var L=e.polygon(C,M,A,R,P);return this.world.add(L),L},fromVertices:function(C,M,A,R,P,L,F){typeof A=="string"&&(A=p.fromPath(A));var w=e.fromVertices(C,M,A,R,P,L,F);return this.world.add(w),w},fromPhysicsEditor:function(C,M,A,R,P){P===void 0&&(P=!0);var L=v.parseBody(C,M,A,R);return P&&!this.world.has(L)&&this.world.add(L),L},fromSVG:function(C,M,A,R,P,L){R===void 0&&(R=1),P===void 0&&(P={}),L===void 0&&(L=!0);for(var F=A.getElementsByTagName("path"),w=[],O=0;O<F.length;O++){var B=r.pathToVertices(F[O],30);R!==1&&p.scale(B,R,R),w.push(B)}var I=e.fromVertices(C,M,w,P);return L&&this.world.add(I),I},fromJSON:function(C,M,A,R,P){R===void 0&&(R={}),P===void 0&&(P=!0);var L=c.parseBody(C,M,A,R);return L&&P&&this.world.add(L),L},imageStack:function(C,M,A,R,P,L,F,w,O){F===void 0&&(F=0),w===void 0&&(w=0),O===void 0&&(O={});var B=this.world,I=this.sys.displayList;O.addToWorld=!1;var D=i.stack(A,R,P,L,F,w,function(N,z){var V=new a(B,N,z,C,M,O);return I.add(V),V.body});return B.add(D),D},stack:function(C,M,A,R,P,L,F){var w=i.stack(C,M,A,R,P,L,F);return this.world.add(w),w},pyramid:function(C,M,A,R,P,L,F){var w=i.pyramid(C,M,A,R,P,L,F);return this.world.add(w),w},chain:function(C,M,A,R,P,L){return i.chain(C,M,A,R,P,L)},mesh:function(C,M,A,R,P){return i.mesh(C,M,A,R,P)},newtonsCradle:function(C,M,A,R,P){var L=i.newtonsCradle(C,M,A,R,P);return this.world.add(L),L},car:function(C,M,A,R,P){var L=i.car(C,M,A,R,P);return this.world.add(L),L},softBody:function(C,M,A,R,P,L,F,w,O,B){var I=i.softBody(C,M,A,R,P,L,F,w,O,B);return this.world.add(I),I},joint:function(C,M,A,R,P){return this.constraint(C,M,A,R,P)},spring:function(C,M,A,R,P){return this.constraint(C,M,A,R,P)},constraint:function(C,M,A,R,P){R===void 0&&(R=1),P===void 0&&(P={}),P.bodyA=C.type==="body"?C:C.body,P.bodyB=M.type==="body"?M:M.body,isNaN(A)||(P.length=A),P.stiffness=R;var L=s.create(P);return this.world.add(L),L},worldConstraint:function(C,M,A,R){A===void 0&&(A=1),R===void 0&&(R={}),R.bodyB=C.type==="body"?C:C.body,isNaN(M)||(R.length=M),R.stiffness=A;var P=s.create(R);return this.world.add(P),P},mouseSpring:function(C){return this.pointerConstraint(C)},pointerConstraint:function(C){C===void 0&&(C={}),C.hasOwnProperty("render")||(C.render={visible:!1});var M=new g(this.scene,this.world,C);return this.world.add(M.constraint),M},image:function(C,M,A,R,P){var L=new a(this.world,C,M,A,R,P);return this.sys.displayList.add(L),L},tileBody:function(C,M){return new f(this.world,C,M)},sprite:function(C,M,A,R,P){var L=new u(this.world,C,M,A,R,P);return this.sys.displayList.add(L),this.sys.updateList.add(L),L},gameObject:function(C,M,A){return o(this.world,C,M,A)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});h.exports=T},75803:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(9503),l=t(95540),i=t(26099);function s(o){return!!o.get&&typeof o.get=="function"||!!o.set&&typeof o.set=="function"}var r=function(o,a,u,f){u===void 0&&(u={}),f===void 0&&(f=!0);var v=a.x,c=a.y;a.body={temp:!0,position:{x:v,y:c}};var g=[e.Bounce,e.Collision,e.Force,e.Friction,e.Gravity,e.Mass,e.Sensor,e.SetBody,e.Sleep,e.Static,e.Transform,e.Velocity];if(g.forEach(function(T){for(var C in T)s(T[C])?Object.defineProperty(a,C,{get:T[C].get,set:T[C].set}):Object.defineProperty(a,C,{value:T[C]})}),a.world=o,a._tempVec2=new i(v,c),u.hasOwnProperty("type")&&u.type==="body")a.setExistingBody(u,f);else{var p=l(u,"shape",null);p||(p="rectangle"),u.addToWorld=f,a.setBody(p,u)}return a};h.exports=r},23181:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(9503),i=t(95643),s=t(95540),r=t(88571),o=t(26099),a=new e({Extends:r,Mixins:[l.Bounce,l.Collision,l.Force,l.Friction,l.Gravity,l.Mass,l.Sensor,l.SetBody,l.Sleep,l.Static,l.Transform,l.Velocity],initialize:function(f,v,c,g,p,T){i.call(this,f.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(g,p),this.setSizeToFrame(),this.setOrigin(),this.initRenderNodes(this._defaultRenderNodesMap),this.world=f,this._tempVec2=new o(v,c);var C=s(T,"shape",null);C?this.setBody(C,T):this.setRectangle(this.width,this.height,T),this.setPosition(v,c)}});h.exports=a},42045:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(60461),l=t(66615),i=t(66280),s=t(22562),r=t(68174),o=t(15647),a=t(83419),u=t(52284),f=t(53402),v=t(69351),c=t(74116),g=t(48140),p=t(81388),T=t(20339),C=t(28137),M=t(95540),A=t(35154),R=t(46975),P=t(4506),L=t(99561),F=t(37277),w=t(73296),O=t(66272),B=t(44594),I=t(74058),D=t(31725),N=t(41598),z=t(68243);f.setDecomp(t(55973));var V=new a({initialize:function(G){this.scene=G,this.systems=G.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=s,this.composite=v,this.collision=u,this.detector=p,this.pair=P,this.pairs=L,this.query=w,this.resolver=O,this.constraint=g,this.bodies=i,this.composites=c,this.axes=l,this.bounds=o,this.svg=I,this.vector=D,this.vertices=N,this.verts=N,this._tempVec2=D.create(),O._restingThresh=A(this.config,"restingThresh",4),O._restingThreshTangent=A(this.config,"restingThreshTangent",6),O._positionDampen=A(this.config,"positionDampen",.9),O._positionWarming=A(this.config,"positionWarming",.8),O._frictionNormalMultiplier=A(this.config,"frictionNormalMultiplier",5),G.sys.events.once(B.BOOT,this.boot,this),G.sys.events.on(B.START,this.start,this)},boot:function(){this.world=new z(this.scene,this.config),this.add=new C(this.world),this.bodyBounds=new r,this.systems.events.once(B.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new z(this.scene,this.config),this.add=new C(this.world));var U=this.systems.events;U.on(B.UPDATE,this.world.update,this.world),U.on(B.POST_UPDATE,this.world.postUpdate,this.world),U.once(B.SHUTDOWN,this.shutdown,this)},getConfig:function(){var U=this.systems.game.config.physics,G=this.systems.settings.physics,b=R(M(G,"matter",{}),M(U,"matter",{}));return b},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(U,G){this.world.step(U,G)},containsPoint:function(U,G,b){U=this.getMatterBodies(U);var Y=D.create(G,b),W=w.point(U,Y);return W.length>0},intersectPoint:function(U,G,b){b=this.getMatterBodies(b);var Y=D.create(U,G),W=[],H=w.point(b,Y);return H.forEach(function(X){W.indexOf(X)===-1&&W.push(X)}),W},intersectRect:function(U,G,b,Y,W,H){W===void 0&&(W=!1),H=this.getMatterBodies(H);var X={min:{x:U,y:G},max:{x:U+b,y:G+Y}},K=[],Z=w.region(H,X,W);return Z.forEach(function(Q){K.indexOf(Q)===-1&&K.push(Q)}),K},intersectRay:function(U,G,b,Y,W,H){W===void 0&&(W=1),H=this.getMatterBodies(H);for(var X=[],K=w.ray(H,D.create(U,G),D.create(b,Y),W),Z=0;Z<K.length;Z++)X.push(K[Z].body);return X},intersectBody:function(U,G){G=this.getMatterBodies(G);for(var b=[],Y=w.collides(U,G),W=0;W<Y.length;W++){var H=Y[W];H.bodyA===U?b.push(H.bodyB):b.push(H.bodyA)}return b},overlap:function(U,G,b,Y,W){b===void 0&&(b=null),Y===void 0&&(Y=null),W===void 0&&(W=b),Array.isArray(U)||(U=[U]),U=this.getMatterBodies(U),G=this.getMatterBodies(G);for(var H=!1,X=0;X<U.length;X++)for(var K=U[X],Z=w.collides(K,G),Q=0;Q<Z.length;Q++){var j=Z[Q],J=j.bodyA.id===K.id?j.bodyB:j.bodyA;if(!Y||Y.call(W,K,J,j)){if(H=!0,b)b.call(W,K,J,j);else if(!Y)return!0}}return H},setCollisionCategory:function(U,G){return U=this.getMatterBodies(U),U.forEach(function(b){b.collisionFilter.category=G}),this},setCollisionGroup:function(U,G){return U=this.getMatterBodies(U),U.forEach(function(b){b.collisionFilter.group=G}),this},setCollidesWith:function(U,G){U=this.getMatterBodies(U);var b=0;if(!Array.isArray(G))b=G;else for(var Y=0;Y<G.length;Y++)b|=G[Y];return U.forEach(function(W){W.collisionFilter.mask=b}),this},getMatterBodies:function(U){if(!U)return this.world.getAllBodies();Array.isArray(U)||(U=[U]);for(var G=[],b=0;b<U.length;b++){var Y=U[b].hasOwnProperty("body")?U[b].body:U[b];G.push(Y)}return G},setVelocity:function(U,G,b){U=this.getMatterBodies(U);var Y=this._tempVec2;return Y.x=G,Y.y=b,U.forEach(function(W){s.setVelocity(W,Y)}),this},setVelocityX:function(U,G){U=this.getMatterBodies(U);var b=this._tempVec2;return b.x=G,U.forEach(function(Y){b.y=Y.velocity.y,s.setVelocity(Y,b)}),this},setVelocityY:function(U,G){U=this.getMatterBodies(U);var b=this._tempVec2;return b.y=G,U.forEach(function(Y){b.x=Y.velocity.x,s.setVelocity(Y,b)}),this},setAngularVelocity:function(U,G){return U=this.getMatterBodies(U),U.forEach(function(b){s.setAngularVelocity(b,G)}),this},applyForce:function(U,G){U=this.getMatterBodies(U);var b=this._tempVec2;return U.forEach(function(Y){b.x=Y.position.x,b.y=Y.position.y,s.applyForce(Y,b,G)}),this},applyForceFromPosition:function(U,G,b,Y){U=this.getMatterBodies(U);var W=this._tempVec2;return U.forEach(function(H){Y===void 0&&(Y=H.angle),W.x=b*Math.cos(Y),W.y=b*Math.sin(Y),s.applyForce(H,G,W)}),this},applyForceFromAngle:function(U,G,b){U=this.getMatterBodies(U);var Y=this._tempVec2;return U.forEach(function(W){b===void 0&&(b=W.angle),Y.x=G*Math.cos(b),Y.y=G*Math.sin(b),s.applyForce(W,{x:W.position.x,y:W.position.y},Y)}),this},getConstraintLength:function(U){var G=U.pointA.x,b=U.pointA.y,Y=U.pointB.x,W=U.pointB.y;return U.bodyA&&(G+=U.bodyA.position.x,b+=U.bodyA.position.y),U.bodyB&&(Y+=U.bodyB.position.x,W+=U.bodyB.position.y),T(G,b,Y,W)},alignBody:function(U,G,b,Y){U=U.hasOwnProperty("body")?U.body:U;var W;switch(Y){case e.TOP_LEFT:case e.LEFT_TOP:W=this.bodyBounds.getTopLeft(U,G,b);break;case e.TOP_CENTER:W=this.bodyBounds.getTopCenter(U,G,b);break;case e.TOP_RIGHT:case e.RIGHT_TOP:W=this.bodyBounds.getTopRight(U,G,b);break;case e.LEFT_CENTER:W=this.bodyBounds.getLeftCenter(U,G,b);break;case e.CENTER:W=this.bodyBounds.getCenter(U,G,b);break;case e.RIGHT_CENTER:W=this.bodyBounds.getRightCenter(U,G,b);break;case e.LEFT_BOTTOM:case e.BOTTOM_LEFT:W=this.bodyBounds.getBottomLeft(U,G,b);break;case e.BOTTOM_CENTER:W=this.bodyBounds.getBottomCenter(U,G,b);break;case e.BOTTOM_RIGHT:case e.RIGHT_BOTTOM:W=this.bodyBounds.getBottomRight(U,G,b);break}return W&&s.setPosition(U,W),this},shutdown:function(){var U=this.systems.events;this.world&&(U.off(B.UPDATE,this.world.update,this.world),U.off(B.POST_UPDATE,this.world.postUpdate,this.world)),U.off(B.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(B.START,this.start,this),this.scene=null,this.systems=null}});F.register("MatterPhysics",V,"matterPhysics"),h.exports=V},34803:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(9674),l=t(83419),i=t(9503),s=t(95643),r=t(95540),o=t(68287),a=t(26099),u=new l({Extends:o,Mixins:[i.Bounce,i.Collision,i.Force,i.Friction,i.Gravity,i.Mass,i.Sensor,i.SetBody,i.Sleep,i.Static,i.Transform,i.Velocity],initialize:function(v,c,g,p,T,C){s.call(this,v.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new e(this),this.setTexture(p,T),this.setSizeToFrame(),this.setOrigin(),this.initRenderNodes(this._defaultRenderNodesMap),this.world=v,this._tempVec2=new a(c,g);var M=r(C,"shape",null);M?this.setBody(M,C):this.setRectangle(this.width,this.height,C),this.setPosition(c,g)}});h.exports=u},73834:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66280),l=t(22562),i=t(83419),s=t(9503),r=t(62644),o=t(50792),a=t(95540),u=t(97022),f=t(41598),v=new i({Extends:o,Mixins:[s.Bounce,s.Collision,s.Friction,s.Gravity,s.Mass,s.Sensor,s.Sleep,s.Static],initialize:function(g,p,T){o.call(this),this.tile=p,this.world=g,p.physics.matterBody&&p.physics.matterBody.destroy(),p.physics.matterBody=this;var C=a(T,"body",null),M=a(T,"addToWorld",!0);if(C)this.setBody(C,M);else{var A=p.getCollisionGroup(),R=a(A,"objects",[]);R.length>0?this.setFromTileCollision(T):this.setFromTileRectangle(T)}if(p.flipX||p.flipY){var P={x:p.getCenterX(),y:p.getCenterY()},L=p.flipX?-1:1,F=p.flipY?-1:1;l.scale(C,L,F,P)}},setFromTileRectangle:function(c){c===void 0&&(c={}),u(c,"isStatic")||(c.isStatic=!0),u(c,"addToWorld")||(c.addToWorld=!0);var g=this.tile.getBounds(),p=g.x+g.width/2,T=g.y+g.height/2,C=e.rectangle(p,T,g.width,g.height,c);return this.setBody(C,c.addToWorld),this},setFromTileCollision:function(c){c===void 0&&(c={}),u(c,"isStatic")||(c.isStatic=!0),u(c,"addToWorld")||(c.addToWorld=!0);for(var g=this.tile.tilemapLayer.scaleX,p=this.tile.tilemapLayer.scaleY,T=this.tile.getLeft(),C=this.tile.getTop(),M=this.tile.getCollisionGroup(),A=a(M,"objects",[]),R=[],P=0;P<A.length;P++){var L=A[P],F=T+L.x*g,w=C+L.y*p,O=L.width*g,B=L.height*p,I=null;if(L.rectangle)I=e.rectangle(F+O/2,w+B/2,O,B,c);else if(L.ellipse)I=e.circle(F+O/2,w+B/2,O/2,c);else if(L.polygon||L.polyline){var D=L.polygon?L.polygon:L.polyline,N=D.map(function(G){return{x:G.x*g,y:G.y*p}}),z=f.create(N),V=f.centre(z);F+=V.x,w+=V.y,I=e.fromVertices(F,w,z,c)}I&&R.push(I)}if(R.length===1)this.setBody(R[0],c.addToWorld);else if(R.length>1){var U=r(c);U.parts=R,this.setBody(l.create(U),U.addToWorld)}return this},setBody:function(c,g){return g===void 0&&(g=!0),this.body&&this.removeBody(),this.body=c,this.body.gameObject=this,g&&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()}});h.exports=v},19496:(h,d,t)=>{/**
|
||
* @author Joachim Grill <joachim@codeandweb.com>
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2018 CodeAndWeb GmbH
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66280),l=t(22562),i=t(53402),s=t(95540),r=t(41598),o={parseBody:function(a,u,f,v){v===void 0&&(v={});for(var c=s(f,"fixtures",[]),g=[],p=0;p<c.length;p++)for(var T=this.parseFixture(c[p]),C=0;C<T.length;C++)g.push(T[C]);var M=i.clone(f,!0);i.extend(M,v,!0),delete M.fixtures,delete M.type;var A=l.create(M);return l.setParts(A,g),l.setPosition(A,{x:a,y:u}),A},parseFixture:function(a){var u=i.extend({},!1,a);delete u.circle,delete u.vertices;var f;if(a.circle){var v=s(a.circle,"x"),c=s(a.circle,"y"),g=s(a.circle,"radius");f=[e.circle(v,c,g,u)]}else a.vertices&&(f=this.parseVertices(a.vertices,u));return f},parseVertices:function(a,u){u===void 0&&(u={});for(var f=[],v=0;v<a.length;v++)r.clockwiseSort(a[v]),f.push(l.create(i.extend({position:r.centre(a[v]),vertices:a[v]},u)));return e.flagCoincidentParts(f)}};h.exports=o},85791:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66280),l=t(22562),i={parseBody:function(s,r,o,a){a===void 0&&(a={});var u,f=o.vertices;if(f.length===1)a.vertices=f[0],u=l.create(a),e.flagCoincidentParts(u.parts);else{for(var v=[],c=0;c<f.length;c++){var g=l.create({vertices:f[c]});v.push(g)}e.flagCoincidentParts(v),a.parts=v,u=l.create(a)}return u.label=o.label,l.setPosition(u,{x:s,y:r}),u}};h.exports=i},98713:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(15647),l=t(83419),i=t(69351),s=t(48140),r=t(81388),o=t(1121),a=t(8214),u=t(46975),f=t(53614),v=t(26099),c=t(41598),g=new l({initialize:function(T,C,M){M===void 0&&(M={});var A={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=T,this.world=C,this.camera=null,this.pointer=null,this.active=!0,this.position=new v,this.body=null,this.part=null,this.constraint=s.create(u(M,A)),this.world.on(o.BEFORE_UPDATE,this.update,this),T.sys.input.on(a.POINTER_DOWN,this.onDown,this),T.sys.input.on(a.POINTER_UP,this.onUp,this)},onDown:function(p){this.pointer||(this.pointer=p,this.camera=p.camera)},onUp:function(p){p===this.pointer&&(this.pointer=null)},getBody:function(p){var T=this.position,C=this.constraint;this.camera.getWorldPoint(p.x,p.y,T);for(var M=i.allBodies(this.world.localWorld),A=0;A<M.length;A++){var R=M[A];if(!R.ignorePointer&&e.contains(R.bounds,T)&&r.canCollide(R.collisionFilter,C.collisionFilter)&&this.hitTestBody(R,T))return this.world.emit(o.DRAG_START,R,this.part,this),!0}return!1},hitTestBody:function(p,T){for(var C=this.constraint,M=p.parts.length,A=M>1?1:0,R=A;R<M;R++){var P=p.parts[R];if(c.contains(P.vertices,T))return C.pointA=T,C.pointB={x:T.x-p.position.x,y:T.y-p.position.y},C.bodyB=p,C.angleB=p.angle,f.set(p,!1),this.part=P,this.body=p,!0}return!1},update:function(){var p=this.pointer,T=this.body;if(!this.active||!p){T&&this.stopDrag();return}if(!p.isDown&&T){this.stopDrag();return}else if(p.isDown){if(!this.camera||!T&&!this.getBody(p))return;T=this.body;var C=this.position,M=this.constraint;this.camera.getWorldPoint(p.x,p.y,C),M.pointA.x=C.x,M.pointA.y=C.y,f.set(T,!1),this.world.emit(o.DRAG,T,this)}},stopDrag:function(){var p=this.body,T=this.constraint;T.bodyB=null,T.pointB=null,this.pointer=null,this.body=null,this.part=null,p&&this.world.emit(o.DRAG_END,p,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(o.BEFORE_UPDATE,this.update),this.scene.sys.input.off(a.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(a.POINTER_UP,this.onUp,this)}});h.exports=g},68243:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66280),l=t(22562),i=t(83419),s=t(53402),r=t(69351),o=t(48413),a=t(50792),u=t(1121),f=t(95540),v=t(35154),c=t(22562),g=t(35810),p=t(73834),T=t(4372),C=t(13037),M=t(31725),A=new i({Extends:a,initialize:function(P,L){a.call(this),this.scene=P,this.engine=o.create(L),this.localWorld=this.engine.world;var F=v(L,"gravity",null);F?this.setGravity(F.x,F.y,F.scale):F===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=v(L,"enabled",!0),this.getDelta=v(L,"getDelta",this.update60Hz);var w=f(L,"runner",{}),O=f(w,"fps",!1);O&&(w.delta=1e3/f(w,"fps",60)),this.runner=C.create(w),this.autoUpdate=v(L,"autoUpdate",!0);var B=v(L,"debug",!1);if(this.drawDebug=typeof B=="object"?!0:B,this.debugGraphic,this.debugConfig={showAxes:f(B,"showAxes",!1),showAngleIndicator:f(B,"showAngleIndicator",!1),angleColor:f(B,"angleColor",15208787),showBroadphase:f(B,"showBroadphase",!1),broadphaseColor:f(B,"broadphaseColor",16757760),showBounds:f(B,"showBounds",!1),boundsColor:f(B,"boundsColor",16777215),showVelocity:f(B,"showVelocity",!1),velocityColor:f(B,"velocityColor",44783),showCollisions:f(B,"showCollisions",!1),collisionColor:f(B,"collisionColor",16094476),showSeparations:f(B,"showSeparations",!1),separationColor:f(B,"separationColor",16753920),showBody:f(B,"showBody",!0),showStaticBody:f(B,"showStaticBody",!0),showInternalEdges:f(B,"showInternalEdges",!1),renderFill:f(B,"renderFill",!1),renderLine:f(B,"renderLine",!0),fillColor:f(B,"fillColor",1075465),fillOpacity:f(B,"fillOpacity",1),lineColor:f(B,"lineColor",2678297),lineOpacity:f(B,"lineOpacity",1),lineThickness:f(B,"lineThickness",1),staticFillColor:f(B,"staticFillColor",857979),staticLineColor:f(B,"staticLineColor",1255396),showSleeping:f(B,"showSleeping",!1),staticBodySleepOpacity:f(B,"staticBodySleepOpacity",.7),sleepFillColor:f(B,"sleepFillColor",4605510),sleepLineColor:f(B,"sleepLineColor",10066585),showSensors:f(B,"showSensors",!0),sensorFillColor:f(B,"sensorFillColor",857979),sensorLineColor:f(B,"sensorLineColor",1255396),showPositions:f(B,"showPositions",!0),positionSize:f(B,"positionSize",4),positionColor:f(B,"positionColor",14697178),showJoint:f(B,"showJoint",!0),jointColor:f(B,"jointColor",14737474),jointLineOpacity:f(B,"jointLineOpacity",1),jointLineThickness:f(B,"jointLineThickness",2),pinSize:f(B,"pinSize",4),pinColor:f(B,"pinColor",4382944),springColor:f(B,"springColor",14697184),anchorColor:f(B,"anchorColor",15724527),anchorSize:f(B,"anchorSize",4),showConvexHulls:f(B,"showConvexHulls",!1),hullColor:f(B,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),f(L,"setBounds",!1)){var I=L.setBounds;if(typeof I=="boolean")this.setBounds();else{var D=f(I,"x",0),N=f(I,"y",0),z=f(I,"width",P.sys.scale.width),V=f(I,"height",P.sys.scale.height),U=f(I,"thickness",64),G=f(I,"left",!0),b=f(I,"right",!0),Y=f(I,"top",!0),W=f(I,"bottom",!0);this.setBounds(D,N,z,V,U,G,b,Y,W)}}},setCompositeRenderStyle:function(R){var P=R.bodies,L=R.constraints,F=R.composites,w,O,B;for(w=0;w<P.length;w++)O=P[w],B=O.render,this.setBodyRenderStyle(O,B.lineColor,B.lineOpacity,B.lineThickness,B.fillColor,B.fillOpacity);for(w=0;w<L.length;w++)O=L[w],B=O.render,this.setConstraintRenderStyle(O,B.lineColor,B.lineOpacity,B.lineThickness,B.pinSize,B.anchorColor,B.anchorSize);for(w=0;w<F.length;w++)O=F[w],this.setCompositeRenderStyle(O);return this},setBodyRenderStyle:function(R,P,L,F,w,O){var B=R.render,I=this.debugConfig;return B?(P==null&&(P=R.isStatic?I.staticLineColor:I.lineColor),L==null&&(L=I.lineOpacity),F==null&&(F=I.lineThickness),w==null&&(w=R.isStatic?I.staticFillColor:I.fillColor),O==null&&(O=I.fillOpacity),P!==!1&&(B.lineColor=P),L!==!1&&(B.lineOpacity=L),F!==!1&&(B.lineThickness=F),w!==!1&&(B.fillColor=w),O!==!1&&(B.fillOpacity=O),this):this},setConstraintRenderStyle:function(R,P,L,F,w,O,B){var I=R.render,D=this.debugConfig;if(!I)return this;if(P==null){var N=I.type;N==="line"?P=D.jointColor:N==="pin"?P=D.pinColor:N==="spring"&&(P=D.springColor)}return L==null&&(L=D.jointLineOpacity),F==null&&(F=D.jointLineThickness),w==null&&(w=D.pinSize),O==null&&(O=D.anchorColor),B==null&&(B=D.anchorSize),P!==!1&&(I.lineColor=P),L!==!1&&(I.lineOpacity=L),F!==!1&&(I.lineThickness=F),w!==!1&&(I.pinSize=w),O!==!1&&(I.anchorColor=O),B!==!1&&(I.anchorSize=B),this},setEventsProxy:function(){var R=this,P=this.engine,L=this.localWorld;this.drawDebug&&(g.on(L,"compositeModified",function(F){R.setCompositeRenderStyle(F)}),g.on(L,"beforeAdd",function(F){for(var w=[].concat(F.object),O=0;O<w.length;O++){var B=w[O],I=B.render;B.type==="body"?R.setBodyRenderStyle(B,I.lineColor,I.lineOpacity,I.lineThickness,I.fillColor,I.fillOpacity):B.type==="composite"?R.setCompositeRenderStyle(B):B.type==="constraint"&&R.setConstraintRenderStyle(B,I.lineColor,I.lineOpacity,I.lineThickness,I.pinSize,I.anchorColor,I.anchorSize)}})),g.on(L,"beforeAdd",function(F){R.emit(u.BEFORE_ADD,F)}),g.on(L,"afterAdd",function(F){R.emit(u.AFTER_ADD,F)}),g.on(L,"beforeRemove",function(F){R.emit(u.BEFORE_REMOVE,F)}),g.on(L,"afterRemove",function(F){R.emit(u.AFTER_REMOVE,F)}),g.on(P,"beforeUpdate",function(F){R.emit(u.BEFORE_UPDATE,F)}),g.on(P,"afterUpdate",function(F){R.emit(u.AFTER_UPDATE,F)}),g.on(P,"collisionStart",function(F){var w=F.pairs,O,B;w.length>0&&w.map(function(I){O=I.bodyA,B=I.bodyB,O.gameObject&&O.gameObject.emit("collide",O,B,I),B.gameObject&&B.gameObject.emit("collide",B,O,I),g.trigger(O,"onCollide",{pair:I}),g.trigger(B,"onCollide",{pair:I}),O.onCollideCallback&&O.onCollideCallback(I),B.onCollideCallback&&B.onCollideCallback(I),O.onCollideWith[B.id]&&O.onCollideWith[B.id](B,I),B.onCollideWith[O.id]&&B.onCollideWith[O.id](O,I)}),R.emit(u.COLLISION_START,F,O,B)}),g.on(P,"collisionActive",function(F){var w=F.pairs,O,B;w.length>0&&w.map(function(I){O=I.bodyA,B=I.bodyB,O.gameObject&&O.gameObject.emit("collideActive",O,B,I),B.gameObject&&B.gameObject.emit("collideActive",B,O,I),g.trigger(O,"onCollideActive",{pair:I}),g.trigger(B,"onCollideActive",{pair:I}),O.onCollideActiveCallback&&O.onCollideActiveCallback(I),B.onCollideActiveCallback&&B.onCollideActiveCallback(I)}),R.emit(u.COLLISION_ACTIVE,F,O,B)}),g.on(P,"collisionEnd",function(F){var w=F.pairs,O,B;w.length>0&&w.map(function(I){O=I.bodyA,B=I.bodyB,O.gameObject&&O.gameObject.emit("collideEnd",O,B,I),B.gameObject&&B.gameObject.emit("collideEnd",B,O,I),g.trigger(O,"onCollideEnd",{pair:I}),g.trigger(B,"onCollideEnd",{pair:I}),O.onCollideEndCallback&&O.onCollideEndCallback(I),B.onCollideEndCallback&&B.onCollideEndCallback(I)}),R.emit(u.COLLISION_END,F,O,B)})},setBounds:function(R,P,L,F,w,O,B,I,D){return R===void 0&&(R=0),P===void 0&&(P=0),L===void 0&&(L=this.scene.sys.scale.width),F===void 0&&(F=this.scene.sys.scale.height),w===void 0&&(w=64),O===void 0&&(O=!0),B===void 0&&(B=!0),I===void 0&&(I=!0),D===void 0&&(D=!0),this.updateWall(O,"left",R-w,P-w,w,F+w*2),this.updateWall(B,"right",R+L,P-w,w,F+w*2),this.updateWall(I,"top",R,P-w,L,w),this.updateWall(D,"bottom",R,P+F,L,w),this},updateWall:function(R,P,L,F,w,O){var B=this.walls[P];R?(B&&T.remove(this.localWorld,B),L+=w/2,F+=O/2,this.walls[P]=this.create(L,F,w,O,{isStatic:!0,friction:0,frictionStatic:0})):(B&&T.remove(this.localWorld,B),this.walls[P]=null)},createDebugGraphic:function(){var R=this.scene.sys.add.graphics({x:0,y:0});return R.setDepth(Number.MAX_VALUE),this.debugGraphic=R,this.drawDebug=!0,R},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(R,P,L){return R===void 0&&(R=0),P===void 0&&(P=1),L===void 0&&(L=.001),this.localWorld.gravity.x=R,this.localWorld.gravity.y=P,this.localWorld.gravity.scale=L,this},create:function(R,P,L,F,w){var O=e.rectangle(R,P,L,F,w);return T.add(this.localWorld,O),O},add:function(R){return T.add(this.localWorld,R),this},remove:function(R,P){Array.isArray(R)||(R=[R]);for(var L=0;L<R.length;L++){var F=R[L],w=F.body?F.body:F;r.remove(this.localWorld,w,P)}return this},removeConstraint:function(R,P){return r.remove(this.localWorld,R,P),this},convertTilemapLayer:function(R,P){var L=R.layer,F=R.getTilesWithin(0,0,L.width,L.height,{isColliding:!0});return this.convertTiles(F,P),this},convertTiles:function(R,P){if(R.length===0)return this;for(var L=0;L<R.length;L++)new p(this,R[L],P);return this},nextGroup:function(R){return c.nextGroup(R)},nextCategory:function(){return c.nextCategory()},pause:function(){return this.enabled=!1,this.emit(u.PAUSE),this},resume:function(){return this.enabled=!0,this.runner.timeLastTick=s.now(),this.emit(u.RESUME),this},update:function(R){if(!(!this.enabled||!this.autoUpdate)){var P=this.engine,L=this.runner,F=s.now(),w=L.delta,O=0,B=R-L.timeLastTick;if((!B||!L.timeLastTick||B>Math.max(C._maxFrameDelta,L.maxFrameTime))&&(B=L.frameDelta||C._frameDeltaFallback),L.frameDeltaSmoothing){L.frameDeltaHistory.push(B),L.frameDeltaHistory=L.frameDeltaHistory.slice(-L.frameDeltaHistorySize);var I=L.frameDeltaHistory.slice(0).sort(),D=L.frameDeltaHistory.slice(I.length*C._smoothingLowerBound,I.length*C._smoothingUpperBound),N=C._mean(D);B=N||B}L.frameDeltaSnapping&&(B=1e3/Math.round(1e3/B)),L.frameDelta=B,L.timeLastTick=R,L.timeBuffer+=L.frameDelta,L.timeBuffer=s.clamp(L.timeBuffer,0,L.frameDelta+w*C._timeBufferMargin),L.lastUpdatesDeferred=0;for(var z=L.maxUpdates||Math.ceil(L.maxFrameTime/w),V=s.now();w>0&&L.timeBuffer>=w*C._timeBufferMargin;){o.update(P,w),L.timeBuffer-=w,O+=1;var U=s.now()-F,G=s.now()-V,b=U+C._elapsedNextEstimate*G/O;if(O>=z||b>L.maxFrameTime){L.lastUpdatesDeferred=Math.round(Math.max(0,L.timeBuffer/w-C._timeBufferMargin));break}}}},step:function(R){o.update(this.engine,R)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(R){var P=R.hasOwnProperty("body")?R.body:R;return r.get(this.localWorld,P.id,P.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 R=this.debugConfig,P=this.engine,L=this.debugGraphic,F=r.allBodies(this.localWorld);this.debugGraphic.clear(),R.showBroadphase&&P.broadphase.controller&&this.renderGrid(P.broadphase,L,R.broadphaseColor,.5),R.showBounds&&this.renderBodyBounds(F,L,R.boundsColor,.5),(R.showBody||R.showStaticBody)&&this.renderBodies(F),R.showJoint&&this.renderJoints(),(R.showAxes||R.showAngleIndicator)&&this.renderBodyAxes(F,L,R.showAxes,R.angleColor,.5),R.showVelocity&&this.renderBodyVelocity(F,L,R.velocityColor,1,2),R.showSeparations&&this.renderSeparations(P.pairs.list,L,R.separationColor),R.showCollisions&&this.renderCollisions(P.pairs.list,L,R.collisionColor)}},renderGrid:function(R,P,L,F){P.lineStyle(1,L,F);for(var w=s.keys(R.buckets),O=0;O<w.length;O++){var B=w[O];if(!(R.buckets[B].length<2)){var I=B.split(/C|R/);P.strokeRect(parseInt(I[1],10)*R.bucketWidth,parseInt(I[2],10)*R.bucketHeight,R.bucketWidth,R.bucketHeight)}}return this},renderSeparations:function(R,P,L){P.lineStyle(1,L,1);for(var F=0;F<R.length;F++){var w=R[F];if(w.isActive){var O=w.collision,B=O.bodyA,I=O.bodyB,D=B.position,N=I.position,z=O.penetration,V=!B.isStatic&&!I.isStatic?4:1;I.isStatic&&(V=0),P.lineBetween(N.x,N.y,N.x-z.x*V,N.y-z.y*V),V=!B.isStatic&&!I.isStatic?4:1,B.isStatic&&(V=0),P.lineBetween(D.x,D.y,D.x-z.x*V,D.y-z.y*V)}}return this},renderCollisions:function(R,P,L){P.lineStyle(1,L,.5),P.fillStyle(L,1);var F,w;for(F=0;F<R.length;F++)if(w=R[F],!!w.isActive)for(var O=0;O<w.contactCount;O++){var B=w.contacts[O],I=B.vertex;I&&P.fillRect(I.x-2,I.y-2,5,5)}for(F=0;F<R.length;F++)if(w=R[F],!!w.isActive){var D=w.collision,N=w.contacts;if(w.contactCount>0){var z=N[0].vertex.x,V=N[0].vertex.y;w.contactCount===2&&(z=(N[0].vertex.x+N[1].vertex.x)/2,V=(N[0].vertex.y+N[1].vertex.y)/2),D.bodyB===D.supports[0].body||D.bodyA.isStatic?P.lineBetween(z-D.normal.x*8,V-D.normal.y*8,z,V):P.lineBetween(z+D.normal.x*8,V+D.normal.y*8,z,V)}}return this},renderBodyBounds:function(R,P,L,F){P.lineStyle(1,L,F);for(var w=0;w<R.length;w++){var O=R[w];if(O.render.visible){var B=O.bounds;if(B)P.strokeRect(B.min.x,B.min.y,B.max.x-B.min.x,B.max.y-B.min.y);else for(var I=O.parts,D=I.length>1?1:0;D<I.length;D++){var N=I[D];P.strokeRect(N.bounds.min.x,N.bounds.min.y,N.bounds.max.x-N.bounds.min.x,N.bounds.max.y-N.bounds.min.y)}}}return this},renderBodyAxes:function(R,P,L,F,w){P.lineStyle(1,F,w);for(var O=0;O<R.length;O++){var B=R[O],I=B.parts;if(B.render.visible){var D,N,z;if(L)for(N=I.length>1?1:0;N<I.length;N++)for(D=I[N],z=0;z<D.axes.length;z++){var V=D.axes[z];P.lineBetween(D.position.x,D.position.y,D.position.x+V.x*20,D.position.y+V.y*20)}else for(N=I.length>1?1:0;N<I.length;N++)for(D=I[N],z=0;z<D.axes.length;z++)P.lineBetween(D.position.x,D.position.y,(D.vertices[0].x+D.vertices[D.vertices.length-1].x)/2,(D.vertices[0].y+D.vertices[D.vertices.length-1].y)/2)}}return this},renderBodyVelocity:function(R,P,L,F,w){P.lineStyle(w,L,F);for(var O=0;O<R.length;O++){var B=R[O];B.render.visible&&P.lineBetween(B.position.x,B.position.y,B.position.x+(B.position.x-B.positionPrev.x)*2,B.position.y+(B.position.y-B.positionPrev.y)*2)}return this},renderBodies:function(R){for(var P=this.debugGraphic,L=this.debugConfig,F=L.showBody,w=L.showStaticBody,O=L.showSleeping,B=L.showInternalEdges,I=L.showConvexHulls,D=L.renderFill,N=L.renderLine,z=L.staticBodySleepOpacity,V=L.sleepFillColor,U=L.sleepLineColor,G=L.hullColor,b=0;b<R.length;b++){var Y=R[b];if(Y.render.visible&&!(!w&&Y.isStatic||!F&&!Y.isStatic)){var W=Y.render.lineColor,H=Y.render.lineOpacity,X=Y.render.lineThickness,K=Y.render.fillColor,Z=Y.render.fillOpacity;O&&Y.isSleeping&&(Y.isStatic?(H*=z,Z*=z):(W=U,K=V)),D||(K=null),N||(W=null),this.renderBody(Y,P,B,W,H,X,K,Z);var Q=Y.parts.length;I&&Q>1&&this.renderConvexHull(Y,P,G,X)}}},renderBody:function(R,P,L,F,w,O,B,I){F===void 0&&(F=null),w===void 0&&(w=null),O===void 0&&(O=1),B===void 0&&(B=null),I===void 0&&(I=null);for(var D=this.debugConfig,N=D.sensorFillColor,z=D.sensorLineColor,V=R.parts,U=V.length,G=U>1?1:0;G<U;G++){var b=V[G],Y=b.render,W=Y.opacity;if(!(!Y.visible||W===0||b.isSensor&&!D.showSensors)){var H=b.circleRadius;if(P.beginPath(),b.isSensor?(B!==null&&P.fillStyle(N,I*W),F!==null&&P.lineStyle(O,z,w*W)):(B!==null&&P.fillStyle(B,I*W),F!==null&&P.lineStyle(O,F,w*W)),H)P.arc(b.position.x,b.position.y,H,0,2*Math.PI);else{var X=b.vertices,K=X.length;P.moveTo(X[0].x,X[0].y);for(var Z=1;Z<K;Z++){var Q=X[Z];if(!X[Z-1].isInternal||L?P.lineTo(Q.x,Q.y):P.moveTo(Q.x,Q.y),Z<K&&Q.isInternal&&!L){var j=(Z+1)%K;P.moveTo(X[j].x,X[j].y)}}P.closePath()}B!==null&&P.fillPath(),F!==null&&P.strokePath()}}if(D.showPositions&&!R.isStatic){var J=R.position.x,tt=R.position.y,k=Math.ceil(D.positionSize/2);P.fillStyle(D.positionColor,1),P.fillRect(J-k,tt-k,D.positionSize,D.positionSize)}return this},renderConvexHull:function(R,P,L,F){F===void 0&&(F=1);var w=R.parts,O=w.length;if(O>1){var B=R.vertices;P.lineStyle(F,L),P.beginPath(),P.moveTo(B[0].x,B[0].y);for(var I=1;I<B.length;I++)P.lineTo(B[I].x,B[I].y);P.lineTo(B[0].x,B[0].y),P.strokePath()}return this},renderJoints:function(){for(var R=this.debugGraphic,P=r.allConstraints(this.localWorld),L=0;L<P.length;L++){var F=P[L].render,w=F.lineColor,O=F.lineOpacity,B=F.lineThickness,I=F.pinSize,D=F.anchorColor,N=F.anchorSize;this.renderConstraint(P[L],R,w,O,B,I,D,N)}},renderConstraint:function(R,P,L,F,w,O,B,I){var D=R.render;if(!D.visible||!R.pointA||!R.pointB)return this;P.lineStyle(w,L,F);var N=R.bodyA,z=R.bodyB,V,U;if(N?V=M.add(N.position,R.pointA):V=R.pointA,D.type==="pin")P.strokeCircle(V.x,V.y,O);else{if(z?U=M.add(z.position,R.pointB):U=R.pointB,P.beginPath(),P.moveTo(V.x,V.y),D.type==="spring")for(var G=M.sub(U,V),b=M.perp(M.normalise(G)),Y=Math.ceil(s.clamp(R.length/5,12,20)),W,H=1;H<Y;H+=1)W=H%2===0?1:-1,P.lineTo(V.x+G.x*(H/Y)+b.x*W*4,V.y+G.y*(H/Y)+b.y*W*4);P.lineTo(U.x,U.y)}return P.strokePath(),D.anchors&&I>0&&(P.fillStyle(B),P.fillCircle(V.x,V.y,I),P.fillCircle(U.x,U.y,I)),this},resetCollisionIDs:function(){return l._nextCollidingGroupId=1,l._nextNonCollidingGroupId=-1,l._nextCategory=1,this},shutdown:function(){g.off(this.engine),this.removeAllListeners(),T.clear(this.localWorld,!1),o.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});h.exports=A},70410:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setBounce:function(t){return this.body.restitution=t,this}};h.exports=d},66968:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(!Array.isArray(t))e=t;else for(var l=0;l<t.length;l++)e|=t[l];return this.body.collisionFilter.mask=e,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,e){Array.isArray(t)||(t=[t]);for(var l=0;l<t.length;l++){var i=t[l].hasOwnProperty("body")?t[l].body:t[l];this.body.setOnCollideWith(i,e)}return this}};h.exports=d},51607:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(22562),l={applyForce:function(i){return this._tempVec2.set(this.body.position.x,this.body.position.y),e.applyForce(this.body,this._tempVec2,i),this},applyForceFrom:function(i,s){return e.applyForce(this.body,i,s),this},thrust:function(i){var s=this.body.angle;return this._tempVec2.set(i*Math.cos(s),i*Math.sin(s)),e.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(i){var s=this.body.angle-Math.PI/2;return this._tempVec2.set(i*Math.cos(s),i*Math.sin(s)),e.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(i){var s=this.body.angle+Math.PI/2;return this._tempVec2.set(i*Math.cos(s),i*Math.sin(s)),e.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(i){var s=this.body.angle-Math.PI;return this._tempVec2.set(i*Math.cos(s),i*Math.sin(s)),e.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};h.exports=l},5436:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setFriction:function(t,e,l){return this.body.friction=t,e!==void 0&&(this.body.frictionAir=e),l!==void 0&&(this.body.frictionStatic=l),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};h.exports=d},39858:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};h.exports=d},37302:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(22562),l=t(26099),i={setMass:function(s){return e.setMass(this.body,s),this},setDensity:function(s){return e.setDensity(this.body,s),this},centerOfMass:{get:function(){return new l(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};h.exports=i},39132:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};h.exports=d},57772:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(66280),l=t(22562),i=t(43855),s=t(95540),r=t(19496),o=t(85791),a=t(41598),u={setRectangle:function(f,v,c){return this.setBody({type:"rectangle",width:f,height:v},c)},setCircle:function(f,v){return this.setBody({type:"circle",radius:f},v)},setPolygon:function(f,v,c){return this.setBody({type:"polygon",sides:v,radius:f},c)},setTrapezoid:function(f,v,c,g){return this.setBody({type:"trapezoid",width:f,height:v,slope:c},g)},setExistingBody:function(f,v){v===void 0&&(v=!0),this.body&&this.world.remove(this.body,!0),this.body=f;for(var c=0;c<f.parts.length;c++)f.parts[c].gameObject=this;var g=this;if(f.destroy=function(){g.world.remove(g.body,!0),g.body.gameObject=null},v&&(this.world.has(f)&&this.world.remove(f,!0),this.world.add(f)),this._originComponent){var p=f.render.sprite.xOffset,T=f.render.sprite.yOffset,C=f.centerOfMass.x,M=f.centerOfMass.y;if(i(C,.5)&&i(M,.5))this.setOrigin(p+.5,T+.5);else{var A=f.centerOffset.x,R=f.centerOffset.y;this.setOrigin(p+A/this.displayWidth,T+R/this.displayHeight)}}return this},setBody:function(f,v){if(!f)return this;var c;typeof f=="string"&&(f={type:f});var g=s(f,"type","rectangle"),p=s(f,"x",this._tempVec2.x),T=s(f,"y",this._tempVec2.y),C=s(f,"width",this.width),M=s(f,"height",this.height);switch(g){case"rectangle":c=e.rectangle(p,T,C,M,v);break;case"circle":var A=s(f,"radius",Math.max(C,M)/2),R=s(f,"maxSides",25);c=e.circle(p,T,A,v,R);break;case"trapezoid":var P=s(f,"slope",.5);c=e.trapezoid(p,T,C,M,P,v);break;case"polygon":var L=s(f,"sides",5),F=s(f,"radius",Math.max(C,M)/2);c=e.polygon(p,T,L,F,v);break;case"fromVertices":case"fromVerts":var w=s(f,"verts",null);if(w)if(typeof w=="string"&&(w=a.fromPath(w)),this.body&&!this.body.hasOwnProperty("temp"))l.setVertices(this.body,w),c=this.body;else{var O=s(f,"flagInternal",!1),B=s(f,"removeCollinear",.01),I=s(f,"minimumArea",10);c=e.fromVertices(p,T,w,v,O,B,I)}break;case"fromPhysicsEditor":c=r.parseBody(p,T,f,v);break;case"fromPhysicsTracer":c=o.parseBody(p,T,f,v);break}return c&&this.setExistingBody(c,f.addToWorld),this}};h.exports=u},38083:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(1121),l=t(53614),i=t(35810),s={setToSleep:function(){return l.set(this.body,!0),this},setAwake:function(){return l.set(this.body,!1),this},setSleepThreshold:function(r){return r===void 0&&(r=60),this.body.sleepThreshold=r,this},setSleepEvents:function(r,o){return this.setSleepStartEvent(r),this.setSleepEndEvent(o),this},setSleepStartEvent:function(r){if(r){var o=this.world;i.on(this.body,"sleepStart",function(a){o.emit(e.SLEEP_START,a,this)})}else i.off(this.body,"sleepStart");return this},setSleepEndEvent:function(r){if(r){var o=this.world;i.on(this.body,"sleepEnd",function(a){o.emit(e.SLEEP_END,a,this)})}else i.off(this.body,"sleepEnd");return this}};h.exports=s},90556:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(22562),l={setStatic:function(i){return e.setStatic(this.body,i),this},isStatic:function(){return this.body.isStatic}};h.exports=l},85436:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(22562),l=t(36383),i=t(86554),s=t(30954),r=4,o={x:{get:function(){return this.body.position.x},set:function(a){this._tempVec2.set(a,this.y),e.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(a){this._tempVec2.set(this.x,a),e.setPosition(this.body,this._tempVec2)}},scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(a){this.setScale(a,a)}},scaleX:{get:function(){return this._scaleX},set:function(a){var u=1/this._scaleX,f=1/this._scaleY;this._scaleX=a,this._scaleX===0?this.renderFlags&=~r:this.renderFlags|=r,e.scale(this.body,u,f),e.scale(this.body,a,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(a){var u=1/this._scaleX,f=1/this._scaleY;this._scaleY=a,this._scaleY===0?this.renderFlags&=~r:this.renderFlags|=r,e.scale(this.body,u,f),e.scale(this.body,this._scaleX,a)}},angle:{get:function(){return s(this.body.angle*l.RAD_TO_DEG)},set:function(a){this.rotation=s(a)*l.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(a){this._rotation=i(a),e.setAngle(this.body,this._rotation)}},setPosition:function(a,u){return a===void 0&&(a=0),u===void 0&&(u=a),this._tempVec2.set(a,u),e.setPosition(this.body,this._tempVec2),this},setRotation:function(a){return a===void 0&&(a=0),this._rotation=i(a),e.setAngle(this.body,a),this},setFixedRotation:function(){return e.setInertia(this.body,1/0),this},setAngle:function(a){return a===void 0&&(a=0),this.angle=a,e.setAngle(this.body,this.rotation),this},setScale:function(a,u,f){a===void 0&&(a=1),u===void 0&&(u=a);var v=1/this._scaleX,c=1/this._scaleY;return this._scaleX=a,this._scaleY=u,e.scale(this.body,v,c,f),e.scale(this.body,a,u,f),this}};h.exports=o},42081:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(22562),l={setVelocityX:function(i){return this._tempVec2.set(i,this.body.velocity.y),e.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(i){return this._tempVec2.set(this.body.velocity.x,i),e.setVelocity(this.body,this._tempVec2),this},setVelocity:function(i,s){return this._tempVec2.set(i,s),e.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return e.getVelocity(this.body)},setAngularVelocity:function(i){return e.setAngularVelocity(this.body,i),this},getAngularVelocity:function(){return e.getAngularVelocity(this.body)},setAngularSpeed:function(i){return e.setAngularSpeed(this.body,i),this},getAngularSpeed:function(){return e.getAngularSpeed(this.body)}};h.exports=l},9503:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="afteradd"},1213:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="afterremove"},25968:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="afterupdate"},67205:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="beforeadd"},39438:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="beforeremove"},44823:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="beforeupdate"},92593:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="collisionactive"},60128:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="collisionend"},76861:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="collisionstart"},92362:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragend"},76408:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="drag"},93971:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="dragstart"},5656:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pause"},47861:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resume"},79099:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="sleepend"},35906:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="sleepstart"},1121:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={BodyBounds:t(68174),Components:t(9503),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:(h,d,t)=>{var e={};h.exports=e;var l=t(41598),i=t(31725),s=t(53614),r=t(53402),o=t(15647),a=t(66615);(function(){e._timeCorrection=!0,e._inertiaScale=4,e._nextCollidingGroupId=1,e._nextNonCollidingGroupId=-1,e._nextCategory=1,e._baseDelta=16.666666666666668,e.create=function(f){var v={id:r.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:f.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:{}};!f.hasOwnProperty("position")&&f.hasOwnProperty("vertices")?f.position=l.centre(f.vertices):f.hasOwnProperty("vertices")||(v.vertices=l.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var c=r.extend(v,f);return u(c,f),c.setOnCollideWith=function(g,p){return p?this.onCollideWith[g.id]=p:delete this.onCollideWith[g.id],this},c},e.nextGroup=function(f){return f?e._nextNonCollidingGroupId--:e._nextCollidingGroupId++},e.nextCategory=function(){return e._nextCategory=e._nextCategory<<1,e._nextCategory};var u=function(f,v){if(v=v||{},e.set(f,{bounds:f.bounds||o.create(f.vertices),positionPrev:f.positionPrev||i.clone(f.position),anglePrev:f.anglePrev||f.angle,vertices:f.vertices,parts:f.parts||[f],isStatic:f.isStatic,isSleeping:f.isSleeping,parent:f.parent||f}),l.rotate(f.vertices,f.angle,f.position),a.rotate(f.axes,f.angle),o.update(f.bounds,f.vertices,f.velocity),e.set(f,{axes:v.axes||f.axes,area:v.area||f.area,mass:v.mass||f.mass,inertia:v.inertia||f.inertia}),f.parts.length===1){var c=f.bounds,g=f.centerOfMass,p=f.centerOffset,T=c.max.x-c.min.x,C=c.max.y-c.min.y;g.x=-(c.min.x-f.position.x)/T,g.y=-(c.min.y-f.position.y)/C,p.x=T*g.x,p.y=C*g.y}};e.set=function(f,v,c){var g;typeof v=="string"&&(g=v,v={},v[g]=c);for(g in v)if(Object.prototype.hasOwnProperty.call(v,g))switch(c=v[g],g){case"isStatic":e.setStatic(f,c);break;case"isSleeping":s.set(f,c);break;case"mass":e.setMass(f,c);break;case"density":e.setDensity(f,c);break;case"inertia":e.setInertia(f,c);break;case"vertices":e.setVertices(f,c);break;case"position":e.setPosition(f,c);break;case"angle":e.setAngle(f,c);break;case"velocity":e.setVelocity(f,c);break;case"angularVelocity":e.setAngularVelocity(f,c);break;case"speed":e.setSpeed(f,c);break;case"angularSpeed":e.setAngularSpeed(f,c);break;case"parts":e.setParts(f,c);break;case"centre":e.setCentre(f,c);break;default:f[g]=c}},e.setStatic=function(f,v){for(var c=0;c<f.parts.length;c++){var g=f.parts[c];v?(g.isStatic||(g._original={restitution:g.restitution,friction:g.friction,mass:g.mass,inertia:g.inertia,density:g.density,inverseMass:g.inverseMass,inverseInertia:g.inverseInertia}),g.restitution=0,g.friction=1,g.mass=g.inertia=g.density=1/0,g.inverseMass=g.inverseInertia=0,g.positionPrev.x=g.position.x,g.positionPrev.y=g.position.y,g.anglePrev=g.angle,g.angularVelocity=0,g.speed=0,g.angularSpeed=0,g.motion=0):g._original&&(g.restitution=g._original.restitution,g.friction=g._original.friction,g.mass=g._original.mass,g.inertia=g._original.inertia,g.density=g._original.density,g.inverseMass=g._original.inverseMass,g.inverseInertia=g._original.inverseInertia,g._original=null),g.isStatic=v}},e.setMass=function(f,v){var c=f.inertia/(f.mass/6);f.inertia=c*(v/6),f.inverseInertia=1/f.inertia,f.mass=v,f.inverseMass=1/f.mass,f.density=f.mass/f.area},e.setDensity=function(f,v){e.setMass(f,v*f.area),f.density=v},e.setInertia=function(f,v){f.inertia=v,f.inverseInertia=1/f.inertia},e.setVertices=function(f,v){v[0].body===f?f.vertices=v:f.vertices=l.create(v,f),f.axes=a.fromVertices(f.vertices),f.area=l.area(f.vertices),e.setMass(f,f.density*f.area);var c=l.centre(f.vertices);l.translate(f.vertices,c,-1),e.setInertia(f,e._inertiaScale*l.inertia(f.vertices,f.mass)),l.translate(f.vertices,f.position),o.update(f.bounds,f.vertices,f.velocity)},e.setParts=function(f,v,c){var g;for(v=v.slice(0),f.parts.length=0,f.parts.push(f),f.parent=f,g=0;g<v.length;g++){var p=v[g];p!==f&&(p.parent=f,f.parts.push(p))}if(f.parts.length!==1){if(c=typeof c<"u"?c:!0,c){var T=[];for(g=0;g<v.length;g++)T=T.concat(v[g].vertices);l.clockwiseSort(T);var C=l.hull(T),M=l.centre(C);e.setVertices(f,C),l.translate(f.vertices,M)}var A=e._totalProperties(f),R=A.centre.x,P=A.centre.y,L=f.bounds,F=f.centerOfMass,w=f.centerOffset;o.update(L,f.vertices,f.velocity),F.x=-(L.min.x-R)/(L.max.x-L.min.x),F.y=-(L.min.y-P)/(L.max.y-L.min.y),w.x=R,w.y=P,f.area=A.area,f.parent=f,f.position.x=R,f.position.y=P,f.positionPrev.x=R,f.positionPrev.y=P,e.setMass(f,A.mass),e.setInertia(f,A.inertia),e.setPosition(f,A.centre)}},e.setCentre=function(f,v,c){c?(f.positionPrev.x+=v.x,f.positionPrev.y+=v.y,f.position.x+=v.x,f.position.y+=v.y):(f.positionPrev.x=v.x-(f.position.x-f.positionPrev.x),f.positionPrev.y=v.y-(f.position.y-f.positionPrev.y),f.position.x=v.x,f.position.y=v.y)},e.setPosition=function(f,v,c){var g=i.sub(v,f.position);c?(f.positionPrev.x=f.position.x,f.positionPrev.y=f.position.y,f.velocity.x=g.x,f.velocity.y=g.y,f.speed=i.magnitude(g)):(f.positionPrev.x+=g.x,f.positionPrev.y+=g.y);for(var p=0;p<f.parts.length;p++){var T=f.parts[p];T.position.x+=g.x,T.position.y+=g.y,l.translate(T.vertices,g),o.update(T.bounds,T.vertices,f.velocity)}},e.setAngle=function(f,v,c){var g=v-f.angle;c?(f.anglePrev=f.angle,f.angularVelocity=g,f.angularSpeed=Math.abs(g)):f.anglePrev+=g;for(var p=0;p<f.parts.length;p++){var T=f.parts[p];T.angle+=g,l.rotate(T.vertices,g,f.position),a.rotate(T.axes,g),o.update(T.bounds,T.vertices,f.velocity),p>0&&i.rotateAbout(T.position,g,f.position,T.position)}},e.setVelocity=function(f,v){var c=f.deltaTime/e._baseDelta;f.positionPrev.x=f.position.x-v.x*c,f.positionPrev.y=f.position.y-v.y*c,f.velocity.x=(f.position.x-f.positionPrev.x)/c,f.velocity.y=(f.position.y-f.positionPrev.y)/c,f.speed=i.magnitude(f.velocity)},e.getVelocity=function(f){var v=e._baseDelta/f.deltaTime;return{x:(f.position.x-f.positionPrev.x)*v,y:(f.position.y-f.positionPrev.y)*v}},e.getSpeed=function(f){return i.magnitude(e.getVelocity(f))},e.setSpeed=function(f,v){e.setVelocity(f,i.mult(i.normalise(e.getVelocity(f)),v))},e.setAngularVelocity=function(f,v){var c=f.deltaTime/e._baseDelta;f.anglePrev=f.angle-v*c,f.angularVelocity=(f.angle-f.anglePrev)/c,f.angularSpeed=Math.abs(f.angularVelocity)},e.getAngularVelocity=function(f){return(f.angle-f.anglePrev)*e._baseDelta/f.deltaTime},e.getAngularSpeed=function(f){return Math.abs(e.getAngularVelocity(f))},e.setAngularSpeed=function(f,v){e.setAngularVelocity(f,r.sign(e.getAngularVelocity(f))*v)},e.translate=function(f,v,c){e.setPosition(f,i.add(f.position,v),c)},e.rotate=function(f,v,c,g){if(!c)e.setAngle(f,f.angle+v,g);else{var p=Math.cos(v),T=Math.sin(v),C=f.position.x-c.x,M=f.position.y-c.y;e.setPosition(f,{x:c.x+(C*p-M*T),y:c.y+(C*T+M*p)},g),e.setAngle(f,f.angle+v,g)}},e.scale=function(f,v,c,g){var p=0,T=0;g=g||f.position;for(var C=f.inertia===1/0,M=0;M<f.parts.length;M++){var A=f.parts[M];A.scale.x=v,A.scale.y=c,l.scale(A.vertices,v,c,g),A.axes=a.fromVertices(A.vertices),A.area=l.area(A.vertices),e.setMass(A,f.density*A.area),l.translate(A.vertices,{x:-A.position.x,y:-A.position.y}),e.setInertia(A,e._inertiaScale*l.inertia(A.vertices,A.mass)),l.translate(A.vertices,{x:A.position.x,y:A.position.y}),M>0&&(p+=A.area,T+=A.inertia),A.position.x=g.x+(A.position.x-g.x)*v,A.position.y=g.y+(A.position.y-g.y)*c,o.update(A.bounds,A.vertices,f.velocity)}f.parts.length>1&&(f.area=p,f.isStatic||(e.setMass(f,f.density*p),e.setInertia(f,T))),f.circleRadius&&(v===c?f.circleRadius*=v:f.circleRadius=null),C&&e.setInertia(f,1/0)},e.update=function(f,v){v=(typeof v<"u"?v:16.666666666666668)*f.timeScale;var c=v*v,g=e._timeCorrection?v/(f.deltaTime||v):1,p=1-f.frictionAir*(v/r._baseDelta),T=(f.position.x-f.positionPrev.x)*g,C=(f.position.y-f.positionPrev.y)*g;f.velocity.x=T*p+f.force.x/f.mass*c,f.velocity.y=C*p+f.force.y/f.mass*c,f.positionPrev.x=f.position.x,f.positionPrev.y=f.position.y,f.position.x+=f.velocity.x,f.position.y+=f.velocity.y,f.deltaTime=v,f.angularVelocity=(f.angle-f.anglePrev)*p*g+f.torque/f.inertia*c,f.anglePrev=f.angle,f.angle+=f.angularVelocity,f.speed=i.magnitude(f.velocity),f.angularSpeed=Math.abs(f.angularVelocity);for(var M=0;M<f.parts.length;M++){var A=f.parts[M];l.translate(A.vertices,f.velocity),M>0&&(A.position.x+=f.velocity.x,A.position.y+=f.velocity.y),f.angularVelocity!==0&&(l.rotate(A.vertices,f.angularVelocity,f.position),a.rotate(A.axes,f.angularVelocity),M>0&&i.rotateAbout(A.position,f.angularVelocity,f.position,A.position)),o.update(A.bounds,A.vertices,f.velocity)}},e.updateVelocities=function(f){var v=e._baseDelta/f.deltaTime,c=f.velocity;c.x=(f.position.x-f.positionPrev.x)*v,c.y=(f.position.y-f.positionPrev.y)*v,f.speed=Math.sqrt(c.x*c.x+c.y*c.y),f.angularVelocity=(f.angle-f.anglePrev)*v,f.angularSpeed=Math.abs(f.angularVelocity)},e.applyForce=function(f,v,c){var g={x:v.x-f.position.x,y:v.y-f.position.y};f.force.x+=c.x,f.force.y+=c.y,f.torque+=g.x*c.y-g.y*c.x},e._totalProperties=function(f){for(var v={mass:0,area:0,inertia:0,centre:{x:0,y:0}},c=f.parts.length===1?0:1;c<f.parts.length;c++){var g=f.parts[c],p=g.mass!==1/0?g.mass:1;v.mass+=p,v.area+=g.area,v.inertia+=g.inertia,v.centre=i.add(v.centre,i.mult(g.position,p))}return v.centre=i.div(v.centre,v.mass),v},e.wrap=function(f,v){var c=o.wrap(f.bounds,v);return c&&e.translate(f,c),c}})()},69351:(h,d,t)=>{var e={};h.exports=e;var l=t(35810),i=t(53402),s=t(15647),r=t(22562);(function(){e.create=function(o){return i.extend({id:i.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},o)},e.setModified=function(o,a,u,f){if(l.trigger(o,"compositeModified",o),o.isModified=a,a&&o.cache&&(o.cache.allBodies=null,o.cache.allConstraints=null,o.cache.allComposites=null),u&&o.parent&&e.setModified(o.parent,a,u,f),f)for(var v=0;v<o.composites.length;v++){var c=o.composites[v];e.setModified(c,a,u,f)}},e.add=function(o,a){var u=[].concat(a);l.trigger(o,"beforeAdd",{object:a});for(var f=0;f<u.length;f++){var v=u[f];switch(v.type){case"body":if(v.parent!==v){i.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}e.addBody(o,v);break;case"constraint":e.addConstraint(o,v);break;case"composite":e.addComposite(o,v);break;case"mouseConstraint":e.addConstraint(o,v.constraint);break}}return l.trigger(o,"afterAdd",{object:a}),o},e.remove=function(o,a,u){var f=[].concat(a);l.trigger(o,"beforeRemove",{object:a});for(var v=0;v<f.length;v++){var c=f[v];switch(c.type){case"body":e.removeBody(o,c,u);break;case"constraint":e.removeConstraint(o,c,u);break;case"composite":e.removeComposite(o,c,u);break;case"mouseConstraint":e.removeConstraint(o,c.constraint);break}}return l.trigger(o,"afterRemove",{object:a}),o},e.addComposite=function(o,a){return o.composites.push(a),a.parent=o,e.setModified(o,!0,!0,!1),o},e.removeComposite=function(o,a,u){var f=i.indexOf(o.composites,a);if(f!==-1){var v=e.allBodies(a);e.removeCompositeAt(o,f);for(var c=0;c<v.length;c++)v[c].sleepCounter=0}if(u)for(var c=0;c<o.composites.length;c++)e.removeComposite(o.composites[c],a,!0);return o},e.removeCompositeAt=function(o,a){return o.composites.splice(a,1),e.setModified(o,!0,!0,!1),o},e.addBody=function(o,a){return o.bodies.push(a),e.setModified(o,!0,!0,!1),o},e.removeBody=function(o,a,u){var f=i.indexOf(o.bodies,a);if(f!==-1&&(e.removeBodyAt(o,f),a.sleepCounter=0),u)for(var v=0;v<o.composites.length;v++)e.removeBody(o.composites[v],a,!0);return o},e.removeBodyAt=function(o,a){return o.bodies.splice(a,1),e.setModified(o,!0,!0,!1),o},e.addConstraint=function(o,a){return o.constraints.push(a),e.setModified(o,!0,!0,!1),o},e.removeConstraint=function(o,a,u){var f=i.indexOf(o.constraints,a);if(f!==-1&&e.removeConstraintAt(o,f),u)for(var v=0;v<o.composites.length;v++)e.removeConstraint(o.composites[v],a,!0);return o},e.removeConstraintAt=function(o,a){return o.constraints.splice(a,1),e.setModified(o,!0,!0,!1),o},e.clear=function(o,a,u){if(u)for(var f=0;f<o.composites.length;f++)e.clear(o.composites[f],a,!0);return a?o.bodies=o.bodies.filter(function(v){return v.isStatic}):o.bodies.length=0,o.constraints.length=0,o.composites.length=0,e.setModified(o,!0,!0,!1),o},e.allBodies=function(o){if(o.cache&&o.cache.allBodies)return o.cache.allBodies;for(var a=[].concat(o.bodies),u=0;u<o.composites.length;u++)a=a.concat(e.allBodies(o.composites[u]));return o.cache&&(o.cache.allBodies=a),a},e.allConstraints=function(o){if(o.cache&&o.cache.allConstraints)return o.cache.allConstraints;for(var a=[].concat(o.constraints),u=0;u<o.composites.length;u++)a=a.concat(e.allConstraints(o.composites[u]));return o.cache&&(o.cache.allConstraints=a),a},e.allComposites=function(o){if(o.cache&&o.cache.allComposites)return o.cache.allComposites;for(var a=[].concat(o.composites),u=0;u<o.composites.length;u++)a=a.concat(e.allComposites(o.composites[u]));return o.cache&&(o.cache.allComposites=a),a},e.get=function(o,a,u){var f,v;switch(u){case"body":f=e.allBodies(o);break;case"constraint":f=e.allConstraints(o);break;case"composite":f=e.allComposites(o).concat(o);break}return f?(v=f.filter(function(c){return c.id.toString()===a.toString()}),v.length===0?null:v[0]):null},e.move=function(o,a,u){return e.remove(o,a),e.add(u,a),o},e.rebase=function(o){for(var a=e.allBodies(o).concat(e.allConstraints(o)).concat(e.allComposites(o)),u=0;u<a.length;u++)a[u].id=i.nextId();return o},e.translate=function(o,a,u){for(var f=u?e.allBodies(o):o.bodies,v=0;v<f.length;v++)r.translate(f[v],a);return o},e.rotate=function(o,a,u,f){for(var v=Math.cos(a),c=Math.sin(a),g=f?e.allBodies(o):o.bodies,p=0;p<g.length;p++){var T=g[p],C=T.position.x-u.x,M=T.position.y-u.y;r.setPosition(T,{x:u.x+(C*v-M*c),y:u.y+(C*c+M*v)}),r.rotate(T,a)}return o},e.scale=function(o,a,u,f,v){for(var c=v?e.allBodies(o):o.bodies,g=0;g<c.length;g++){var p=c[g],T=p.position.x-f.x,C=p.position.y-f.y;r.setPosition(p,{x:f.x+T*a,y:f.y+C*u}),r.scale(p,a,u)}return o},e.bounds=function(o){for(var a=e.allBodies(o),u=[],f=0;f<a.length;f+=1){var v=a[f];u.push(v.bounds.min,v.bounds.max)}return s.create(u)},e.wrap=function(o,a){var u=s.wrap(e.bounds(o),a);return u&&e.translate(o,u),u}})()},4372:(h,d,t)=>{var e={};h.exports=e;var l=t(69351);(function(){e.create=l.create,e.add=l.add,e.remove=l.remove,e.clear=l.clear,e.addComposite=l.addComposite,e.addBody=l.addBody,e.addConstraint=l.addConstraint})()},52284:(h,d,t)=>{var e={};h.exports=e;var l=t(41598),i=t(4506);(function(){var s=[],r={overlap:0,axis:null},o={overlap:0,axis:null};e.create=function(a,u){return{pair:null,collided:!1,bodyA:a,bodyB:u,parentA:a.parent,parentB:u.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},e.collides=function(a,u,f){if(e._overlapAxes(r,a.vertices,u.vertices,a.axes),r.overlap<=0||(e._overlapAxes(o,u.vertices,a.vertices,u.axes),o.overlap<=0))return null;var v=f&&f.table[i.id(a,u)],c;v?c=v.collision:(c=e.create(a,u),c.collided=!0,c.bodyA=a.id<u.id?a:u,c.bodyB=a.id<u.id?u:a,c.parentA=c.bodyA.parent,c.parentB=c.bodyB.parent),a=c.bodyA,u=c.bodyB;var g;r.overlap<o.overlap?g=r:g=o;var p=c.normal,T=c.tangent,C=c.penetration,M=c.supports,A=g.overlap,R=g.axis,P=R.x,L=R.y,F=u.position.x-a.position.x,w=u.position.y-a.position.y;P*F+L*w>=0&&(P=-P,L=-L),p.x=P,p.y=L,T.x=-L,T.y=P,C.x=P*A,C.y=L*A,c.depth=A;var O=e._findSupports(a,u,p,1),B=0;if(l.contains(a.vertices,O[0])&&(M[B++]=O[0]),l.contains(a.vertices,O[1])&&(M[B++]=O[1]),B<2){var I=e._findSupports(u,a,p,-1);l.contains(u.vertices,I[0])&&(M[B++]=I[0]),B<2&&l.contains(u.vertices,I[1])&&(M[B++]=I[1])}return B===0&&(M[B++]=O[0]),c.supportCount=B,c},e._overlapAxes=function(a,u,f,v){var c=u.length,g=f.length,p=u[0].x,T=u[0].y,C=f[0].x,M=f[0].y,A=v.length,R=Number.MAX_VALUE,P=0,L,F,w,O,B,I;for(B=0;B<A;B++){var D=v[B],N=D.x,z=D.y,V=p*N+T*z,U=C*N+M*z,G=V,b=U;for(I=1;I<c;I+=1)O=u[I].x*N+u[I].y*z,O>G?G=O:O<V&&(V=O);for(I=1;I<g;I+=1)O=f[I].x*N+f[I].y*z,O>b?b=O:O<U&&(U=O);if(F=G-U,w=b-V,L=F<w?F:w,L<R&&(R=L,P=B,L<=0))break}a.axis=v[P],a.overlap=R},e._findSupports=function(a,u,f,v){var c=u.vertices,g=c.length,p=a.position.x,T=a.position.y,C=f.x*v,M=f.y*v,A=c[0],R=A,P=C*(p-R.x)+M*(T-R.y),L,F,w;for(w=1;w<g;w+=1)R=c[w],F=C*(p-R.x)+M*(T-R.y),F<P&&(P=F,A=R);return L=c[(g+A.index-1)%g],P=C*(p-L.x)+M*(T-L.y),R=c[(A.index+1)%g],C*(p-R.x)+M*(T-R.y)<P?(s[0]=A,s[1]=R,s):(s[0]=A,s[1]=L,s)}})()},43424:h=>{var d={};h.exports=d,function(){d.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(h,d,t)=>{var e={};h.exports=e;var l=t(53402),i=t(52284);(function(){e.create=function(s){var r={bodies:[],collisions:[],pairs:null};return l.extend(r,s)},e.setBodies=function(s,r){s.bodies=r.slice(0)},e.clear=function(s){s.bodies=[],s.collisions=[]},e.collisions=function(s){var r=s.pairs,o=s.bodies,a=o.length,u=e.canCollide,f=i.collides,v=s.collisions,c=0,g,p;for(o.sort(e._compareBoundsX),g=0;g<a;g++){var T=o[g],C=T.bounds,M=T.bounds.max.x,A=T.bounds.max.y,R=T.bounds.min.y,P=T.isStatic||T.isSleeping,L=T.parts.length,F=L===1;for(p=g+1;p<a;p++){var w=o[p],O=w.bounds;if(O.min.x>M)break;if(!(A<O.min.y||R>O.max.y)&&!(P&&(w.isStatic||w.isSleeping))&&u(T.collisionFilter,w.collisionFilter)){var B=w.parts.length;if(F&&B===1){var I=f(T,w,r);I&&(v[c++]=I)}else for(var D=L>1?1:0,N=B>1?1:0,z=D;z<L;z++)for(var V=T.parts[z],C=V.bounds,U=N;U<B;U++){var G=w.parts[U],O=G.bounds;if(!(C.min.x>O.max.x||C.max.x<O.min.x||C.max.y<O.min.y||C.min.y>O.max.y)){var I=f(V,G,r);I&&(v[c++]=I)}}}}}return v.length!==c&&(v.length=c),v},e.canCollide=function(s,r){return s.group===r.group&&s.group!==0?s.group>0:(s.mask&r.category)!==0&&(r.mask&s.category)!==0},e._compareBoundsX=function(s,r){return s.bounds.min.x-r.bounds.min.x}})()},4506:(h,d,t)=>{var e={};h.exports=e;var l=t(43424);(function(){e.create=function(i,s){var r=i.bodyA,o=i.bodyB,a={id:e.id(r,o),bodyA:r,bodyB:o,collision:i,contacts:[l.create(),l.create()],contactCount:0,separation:0,isActive:!0,isSensor:r.isSensor||o.isSensor,timeCreated:s,timeUpdated:s,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return e.update(a,i,s),a},e.update=function(i,s,r){var o=s.supports,a=s.supportCount,u=i.contacts,f=s.parentA,v=s.parentB;i.isActive=!0,i.timeUpdated=r,i.collision=s,i.separation=s.depth,i.inverseMass=f.inverseMass+v.inverseMass,i.friction=f.friction<v.friction?f.friction:v.friction,i.frictionStatic=f.frictionStatic>v.frictionStatic?f.frictionStatic:v.frictionStatic,i.restitution=f.restitution>v.restitution?f.restitution:v.restitution,i.slop=f.slop>v.slop?f.slop:v.slop,i.contactCount=a,s.pair=i;var c=o[0],g=u[0],p=o[1],T=u[1];(T.vertex===c||g.vertex===p)&&(u[1]=g,u[0]=g=T,T=u[1]),g.vertex=c,T.vertex=p},e.setActive=function(i,s,r){s?(i.isActive=!0,i.timeUpdated=r):(i.isActive=!1,i.contactCount=0)},e.id=function(i,s){return i.id<s.id?i.id.toString(36)+":"+s.id.toString(36):s.id.toString(36)+":"+i.id.toString(36)}})()},99561:(h,d,t)=>{var e={};h.exports=e;var l=t(4506),i=t(53402);(function(){e.create=function(s){return i.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},s)},e.update=function(s,r,o){var a=l.update,u=l.create,f=l.setActive,v=s.table,c=s.list,g=c.length,p=g,T=s.collisionStart,C=s.collisionEnd,M=s.collisionActive,A=r.length,R=0,P=0,L=0,F,w,O;for(O=0;O<A;O++)F=r[O],w=F.pair,w?(w.isActive&&(M[L++]=w),a(w,F,o)):(w=u(F,o),v[w.id]=w,T[R++]=w,c[p++]=w);for(p=0,g=c.length,O=0;O<g;O++)w=c[O],w.timeUpdated>=o?c[p++]=w:(f(w,!1,o),w.collision.bodyA.sleepCounter>0&&w.collision.bodyB.sleepCounter>0?c[p++]=w:(C[P++]=w,delete v[w.id]));c.length!==p&&(c.length=p),T.length!==R&&(T.length=R),C.length!==P&&(C.length=P),M.length!==L&&(M.length=L)},e.clear=function(s){return s.table={},s.list.length=0,s.collisionStart.length=0,s.collisionActive.length=0,s.collisionEnd.length=0,s}})()},73296:(h,d,t)=>{var e={};h.exports=e;var l=t(31725),i=t(52284),s=t(15647),r=t(66280),o=t(41598);(function(){e.collides=function(a,u){for(var f=[],v=u.length,c=a.bounds,g=i.collides,p=s.overlaps,T=0;T<v;T++){var C=u[T],M=C.parts.length,A=M===1?0:1;if(a!==C&&p(C.bounds,c))for(var R=A;R<M;R++){var P=C.parts[R];if(p(P.bounds,c)){var L=g(P,a);if(L){f.push(L);break}}}}return f},e.ray=function(a,u,f,v){v=v||1e-100;for(var c=l.angle(u,f),g=l.magnitude(l.sub(u,f)),p=(f.x+u.x)*.5,T=(f.y+u.y)*.5,C=r.rectangle(p,T,g,v,{angle:c}),M=e.collides(C,a),A=0;A<M.length;A+=1){var R=M[A];R.body=R.bodyB=R.bodyA}return M},e.region=function(a,u,f){for(var v=[],c=0;c<a.length;c++){var g=a[c],p=s.overlaps(g.bounds,u);(p&&!f||!p&&f)&&v.push(g)}return v},e.point=function(a,u){for(var f=[],v=0;v<a.length;v++){var c=a[v];if(s.contains(c.bounds,u))for(var g=c.parts.length===1?0:1;g<c.parts.length;g++){var p=c.parts[g];if(s.contains(p.bounds,u)&&o.contains(p.vertices,u)){f.push(c);break}}}return f}})()},66272:(h,d,t)=>{var e={};h.exports=e;var l=t(41598),i=t(53402),s=t(15647);(function(){e._restingThresh=2,e._restingThreshTangent=Math.sqrt(6),e._positionDampen=.9,e._positionWarming=.8,e._frictionNormalMultiplier=5,e._frictionMaxStatic=Number.MAX_VALUE,e.preSolvePosition=function(r){var o,a,u,f=r.length;for(o=0;o<f;o++)a=r[o],a.isActive&&(u=a.contactCount,a.collision.parentA.totalContacts+=u,a.collision.parentB.totalContacts+=u)},e.solvePosition=function(r,o,a){var u,f,v,c,g,p,T,C,M=e._positionDampen*(a||1),A=i.clamp(o/i._baseDelta,0,1),R=r.length;for(u=0;u<R;u++)f=r[u],!(!f.isActive||f.isSensor)&&(v=f.collision,c=v.parentA,g=v.parentB,p=v.normal,f.separation=v.depth+p.x*(g.positionImpulse.x-c.positionImpulse.x)+p.y*(g.positionImpulse.y-c.positionImpulse.y));for(u=0;u<R;u++)f=r[u],!(!f.isActive||f.isSensor)&&(v=f.collision,c=v.parentA,g=v.parentB,p=v.normal,C=f.separation-f.slop*A,(c.isStatic||g.isStatic)&&(C*=2),c.isStatic||c.isSleeping||(T=M/c.totalContacts,c.positionImpulse.x+=p.x*C*T,c.positionImpulse.y+=p.y*C*T),g.isStatic||g.isSleeping||(T=M/g.totalContacts,g.positionImpulse.x-=p.x*C*T,g.positionImpulse.y-=p.y*C*T))},e.postSolvePosition=function(r){for(var o=e._positionWarming,a=r.length,u=l.translate,f=s.update,v=0;v<a;v++){var c=r[v],g=c.positionImpulse,p=g.x,T=g.y,C=c.velocity;if(c.totalContacts=0,p!==0||T!==0){for(var M=0;M<c.parts.length;M++){var A=c.parts[M];u(A.vertices,g),f(A.bounds,A.vertices,C),A.position.x+=p,A.position.y+=T}c.positionPrev.x+=p,c.positionPrev.y+=T,p*C.x+T*C.y<0?(g.x=0,g.y=0):(g.x*=o,g.y*=o)}}},e.preSolveVelocity=function(r){var o=r.length,a,u;for(a=0;a<o;a++){var f=r[a];if(!(!f.isActive||f.isSensor)){var v=f.contacts,c=f.contactCount,g=f.collision,p=g.parentA,T=g.parentB,C=g.normal,M=g.tangent;for(u=0;u<c;u++){var A=v[u],R=A.vertex,P=A.normalImpulse,L=A.tangentImpulse;if(P!==0||L!==0){var F=C.x*P+M.x*L,w=C.y*P+M.y*L;p.isStatic||p.isSleeping||(p.positionPrev.x+=F*p.inverseMass,p.positionPrev.y+=w*p.inverseMass,p.anglePrev+=p.inverseInertia*((R.x-p.position.x)*w-(R.y-p.position.y)*F)),T.isStatic||T.isSleeping||(T.positionPrev.x-=F*T.inverseMass,T.positionPrev.y-=w*T.inverseMass,T.anglePrev-=T.inverseInertia*((R.x-T.position.x)*w-(R.y-T.position.y)*F))}}}}},e.solveVelocity=function(r,o){var a=o/i._baseDelta,u=a*a,f=u*a,v=-e._restingThresh*a,c=e._restingThreshTangent,g=e._frictionNormalMultiplier*a,p=e._frictionMaxStatic,T=r.length,C,M,A,R;for(A=0;A<T;A++){var P=r[A];if(!(!P.isActive||P.isSensor)){var L=P.collision,F=L.parentA,w=L.parentB,O=L.normal.x,B=L.normal.y,I=L.tangent.x,D=L.tangent.y,N=P.inverseMass,z=P.friction*P.frictionStatic*g,V=P.contacts,U=P.contactCount,G=1/U,b=F.position.x-F.positionPrev.x,Y=F.position.y-F.positionPrev.y,W=F.angle-F.anglePrev,H=w.position.x-w.positionPrev.x,X=w.position.y-w.positionPrev.y,K=w.angle-w.anglePrev;for(R=0;R<U;R++){var Z=V[R],Q=Z.vertex,j=Q.x-F.position.x,J=Q.y-F.position.y,tt=Q.x-w.position.x,k=Q.y-w.position.y,q=b-J*W,_=Y+j*W,rt=H-k*K,at=X+tt*K,ht=q-rt,ot=_-at,nt=O*ht+B*ot,it=I*ht+D*ot,lt=P.separation+nt,dt=Math.min(lt,1);dt=lt<0?0:dt;var ct=dt*z;it<-ct||it>ct?(M=it>0?it:-it,C=P.friction*(it>0?1:-1)*f,C<-M?C=-M:C>M&&(C=M)):(C=it,M=p);var Bt=j*B-J*O,Lt=tt*B-k*O,zt=G/(N+F.inverseInertia*Bt*Bt+w.inverseInertia*Lt*Lt),Kt=(1+P.restitution)*nt*zt;if(C*=zt,nt<v)Z.normalImpulse=0;else{var fe=Z.normalImpulse;Z.normalImpulse+=Kt,Z.normalImpulse>0&&(Z.normalImpulse=0),Kt=Z.normalImpulse-fe}if(it<-c||it>c)Z.tangentImpulse=0;else{var pe=Z.tangentImpulse;Z.tangentImpulse+=C,Z.tangentImpulse<-M&&(Z.tangentImpulse=-M),Z.tangentImpulse>M&&(Z.tangentImpulse=M),C=Z.tangentImpulse-pe}var le=O*Kt+I*C,de=B*Kt+D*C;F.isStatic||F.isSleeping||(F.positionPrev.x+=le*F.inverseMass,F.positionPrev.y+=de*F.inverseMass,F.anglePrev+=(j*de-J*le)*F.inverseInertia),w.isStatic||w.isSleeping||(w.positionPrev.x-=le*w.inverseMass,w.positionPrev.y-=de*w.inverseMass,w.anglePrev-=(tt*de-k*le)*w.inverseInertia)}}}}})()},48140:(h,d,t)=>{var e={};h.exports=e;var l=t(41598),i=t(31725),s=t(53614),r=t(15647),o=t(66615),a=t(53402);(function(){e._warming=.4,e._torqueDampen=1,e._minLength=1e-6,e.create=function(u){var f=u;f.bodyA&&!f.pointA&&(f.pointA={x:0,y:0}),f.bodyB&&!f.pointB&&(f.pointB={x:0,y:0});var v=f.bodyA?i.add(f.bodyA.position,f.pointA):f.pointA,c=f.bodyB?i.add(f.bodyB.position,f.pointB):f.pointB,g=i.magnitude(i.sub(v,c));f.length=typeof f.length<"u"?f.length:g,f.id=f.id||a.nextId(),f.label=f.label||"Constraint",f.type="constraint",f.stiffness=f.stiffness||(f.length>0?1:.7),f.damping=f.damping||0,f.angularStiffness=f.angularStiffness||0,f.angleA=f.bodyA?f.bodyA.angle:f.angleA,f.angleB=f.bodyB?f.bodyB.angle:f.angleB,f.plugin={};var p={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return f.length===0&&f.stiffness>.1?(p.type="pin",p.anchors=!1):f.stiffness<.9&&(p.type="spring"),f.render=a.extend(p,f.render),f},e.preSolveAll=function(u){for(var f=0;f<u.length;f+=1){var v=u[f],c=v.constraintImpulse;v.isStatic||c.x===0&&c.y===0&&c.angle===0||(v.position.x+=c.x,v.position.y+=c.y,v.angle+=c.angle)}},e.solveAll=function(u,f){for(var v=a.clamp(f/a._baseDelta,0,1),c=0;c<u.length;c+=1){var g=u[c],p=!g.bodyA||g.bodyA&&g.bodyA.isStatic,T=!g.bodyB||g.bodyB&&g.bodyB.isStatic;(p||T)&&e.solve(u[c],v)}for(c=0;c<u.length;c+=1)g=u[c],p=!g.bodyA||g.bodyA&&g.bodyA.isStatic,T=!g.bodyB||g.bodyB&&g.bodyB.isStatic,!p&&!T&&e.solve(u[c],v)},e.solve=function(u,f){var v=u.bodyA,c=u.bodyB,g=u.pointA,p=u.pointB;if(!(!v&&!c)){v&&!v.isStatic&&(i.rotate(g,v.angle-u.angleA,g),u.angleA=v.angle),c&&!c.isStatic&&(i.rotate(p,c.angle-u.angleB,p),u.angleB=c.angle);var T=g,C=p;if(v&&(T=i.add(v.position,g)),c&&(C=i.add(c.position,p)),!(!T||!C)){var M=i.sub(T,C),A=i.magnitude(M);A<e._minLength&&(A=e._minLength);var R=(A-u.length)/A,P=u.stiffness>=1||u.length===0,L=P?u.stiffness*f:u.stiffness*f*f,F=u.damping*f,w=i.mult(M,R*L),O=(v?v.inverseMass:0)+(c?c.inverseMass:0),B=(v?v.inverseInertia:0)+(c?c.inverseInertia:0),I=O+B,D,N,z,V,U;if(F>0){var G=i.create();z=i.div(M,A),U=i.sub(c&&i.sub(c.position,c.positionPrev)||G,v&&i.sub(v.position,v.positionPrev)||G),V=i.dot(z,U)}v&&!v.isStatic&&(N=v.inverseMass/O,v.constraintImpulse.x-=w.x*N,v.constraintImpulse.y-=w.y*N,v.position.x-=w.x*N,v.position.y-=w.y*N,F>0&&(v.positionPrev.x-=F*z.x*V*N,v.positionPrev.y-=F*z.y*V*N),D=i.cross(g,w)/I*e._torqueDampen*v.inverseInertia*(1-u.angularStiffness),v.constraintImpulse.angle-=D,v.angle-=D),c&&!c.isStatic&&(N=c.inverseMass/O,c.constraintImpulse.x+=w.x*N,c.constraintImpulse.y+=w.y*N,c.position.x+=w.x*N,c.position.y+=w.y*N,F>0&&(c.positionPrev.x+=F*z.x*V*N,c.positionPrev.y+=F*z.y*V*N),D=i.cross(p,w)/I*e._torqueDampen*c.inverseInertia*(1-u.angularStiffness),c.constraintImpulse.angle+=D,c.angle+=D)}}},e.postSolveAll=function(u){for(var f=0;f<u.length;f++){var v=u[f],c=v.constraintImpulse;if(!(v.isStatic||c.x===0&&c.y===0&&c.angle===0)){s.set(v,!1);for(var g=0;g<v.parts.length;g++){var p=v.parts[g];l.translate(p.vertices,c),g>0&&(p.position.x+=c.x,p.position.y+=c.y),c.angle!==0&&(l.rotate(p.vertices,c.angle,v.position),o.rotate(p.axes,c.angle),g>0&&i.rotateAbout(p.position,c.angle,v.position,p.position)),r.update(p.bounds,p.vertices,v.velocity)}c.angle*=e._warming,c.x*=e._warming,c.y*=e._warming}}},e.pointAWorld=function(u){return{x:(u.bodyA?u.bodyA.position.x:0)+(u.pointA?u.pointA.x:0),y:(u.bodyA?u.bodyA.position.y:0)+(u.pointA?u.pointA.y:0)}},e.pointBWorld=function(u){return{x:(u.bodyB?u.bodyB.position.x:0)+(u.pointB?u.pointB.x:0),y:(u.bodyB?u.bodyB.position.y:0)+(u.pointB?u.pointB.y:0)}},e.currentLength=function(u){var f=(u.bodyA?u.bodyA.position.x:0)+(u.pointA?u.pointA.x:0),v=(u.bodyA?u.bodyA.position.y:0)+(u.pointA?u.pointA.y:0),c=(u.bodyB?u.bodyB.position.x:0)+(u.pointB?u.pointB.x:0),g=(u.bodyB?u.bodyB.position.y:0)+(u.pointB?u.pointB.y:0),p=f-c,T=v-g;return Math.sqrt(p*p+T*T)}})()},53402:(h,d,t)=>{var e={};h.exports=e,function(){e._baseDelta=16.666666666666668,e._nextId=0,e._seed=0,e._nowStartTime=+new Date,e._warnedOnce={},e._decomp=null,e.extend=function(i,s){var r,o;typeof s=="boolean"?(r=2,o=s):(r=1,o=!0);for(var a=r;a<arguments.length;a++){var u=arguments[a];if(u)for(var f in u)o&&u[f]&&u[f].constructor===Object&&(!i[f]||i[f].constructor===Object)?(i[f]=i[f]||{},e.extend(i[f],o,u[f])):i[f]=u[f]}return i},e.clone=function(i,s){return e.extend({},s,i)},e.keys=function(i){if(Object.keys)return Object.keys(i);var s=[];for(var r in i)s.push(r);return s},e.values=function(i){var s=[];if(Object.keys){for(var r=Object.keys(i),o=0;o<r.length;o++)s.push(i[r[o]]);return s}for(var a in i)s.push(i[a]);return s},e.get=function(i,s,r,o){s=s.split(".").slice(r,o);for(var a=0;a<s.length;a+=1)i=i[s[a]];return i},e.set=function(i,s,r,o,a){var u=s.split(".").slice(o,a);return e.get(i,s,0,-1)[u[u.length-1]]=r,r},e.shuffle=function(i){for(var s=i.length-1;s>0;s--){var r=Math.floor(e.random()*(s+1)),o=i[s];i[s]=i[r],i[r]=o}return i},e.choose=function(i){return i[Math.floor(e.random()*i.length)]},e.isElement=function(i){return typeof HTMLElement<"u"?i instanceof HTMLElement:!!(i&&i.nodeType&&i.nodeName)},e.isArray=function(i){return Object.prototype.toString.call(i)==="[object Array]"},e.isFunction=function(i){return typeof i=="function"},e.isPlainObject=function(i){return typeof i=="object"&&i.constructor===Object},e.isString=function(i){return toString.call(i)==="[object String]"},e.clamp=function(i,s,r){return i<s?s:i>r?r:i},e.sign=function(i){return i<0?-1:1},e.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-e._nowStartTime},e.random=function(i,s){return i=typeof i<"u"?i:0,s=typeof s<"u"?s:1,i+l()*(s-i)};var l=function(){return e._seed=(e._seed*9301+49297)%233280,e._seed/233280};e.colorToNumber=function(i){return i=i.replace("#",""),i.length==3&&(i=i.charAt(0)+i.charAt(0)+i.charAt(1)+i.charAt(1)+i.charAt(2)+i.charAt(2)),parseInt(i,16)},e.logLevel=1,e.log=function(){console&&e.logLevel>0&&e.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},e.info=function(){console&&e.logLevel>0&&e.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},e.warn=function(){console&&e.logLevel>0&&e.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},e.warnOnce=function(){var i=Array.prototype.slice.call(arguments).join(" ");e._warnedOnce[i]||(e.warn(i),e._warnedOnce[i]=!0)},e.deprecated=function(i,s,r){i[s]=e.chain(function(){e.warnOnce("🔅 deprecated 🔅",r)},i[s])},e.nextId=function(){return e._nextId++},e.indexOf=function(i,s){if(i.indexOf)return i.indexOf(s);for(var r=0;r<i.length;r++)if(i[r]===s)return r;return-1},e.map=function(i,s){if(i.map)return i.map(s);for(var r=[],o=0;o<i.length;o+=1)r.push(s(i[o]));return r},e.topologicalSort=function(i){var s=[],r=[],o=[];for(var a in i)!r[a]&&!o[a]&&e._topologicalSort(a,r,o,i,s);return s},e._topologicalSort=function(i,s,r,o,a){var u=o[i]||[];r[i]=!0;for(var f=0;f<u.length;f+=1){var v=u[f];r[v]||s[v]||e._topologicalSort(v,s,r,o,a)}r[i]=!1,s[i]=!0,a.push(i)},e.chain=function(){for(var i=[],s=0;s<arguments.length;s+=1){var r=arguments[s];r._chained?i.push.apply(i,r._chained):i.push(r)}var o=function(){for(var a,u=new Array(arguments.length),f=0,v=arguments.length;f<v;f++)u[f]=arguments[f];for(f=0;f<i.length;f+=1){var c=i[f].apply(a,u);typeof c<"u"&&(a=c)}return a};return o._chained=i,o},e.chainPathBefore=function(i,s,r){return e.set(i,s,e.chain(r,e.get(i,s)))},e.chainPathAfter=function(i,s,r){return e.set(i,s,e.chain(e.get(i,s),r))},e.setDecomp=function(i){e._decomp=i},e.getDecomp=function(){var i=e._decomp;try{!i&&typeof window<"u"&&(i=window.decomp),!i&&typeof t.g<"u"&&(i=t.g.decomp)}catch{i=null}return i}}()},48413:(h,d,t)=>{var e={};h.exports=e;var l=t(53614),i=t(66272),s=t(81388),r=t(99561),o=t(35810),a=t(69351),u=t(48140),f=t(53402),v=t(22562);(function(){e._deltaMax=16.666666666666668,e.create=function(c){c=c||{};var g={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}},p=f.extend(g,c);return p.world=c.world||a.create({label:"World"}),p.pairs=c.pairs||r.create(),p.detector=c.detector||s.create(),p.detector.pairs=p.pairs,p.grid={buckets:[]},p.world.gravity=p.gravity,p.broadphase=p.grid,p.metrics={},p},e.update=function(c,g){var p=f.now(),T=c.world,C=c.detector,M=c.pairs,A=c.timing,R=A.timestamp,P;g>e._deltaMax&&f.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",e._deltaMax.toFixed(3),"ms."),g=typeof g<"u"?g:f._baseDelta,g*=A.timeScale,A.timestamp+=g,A.lastDelta=g;var L={timestamp:A.timestamp,delta:g};o.trigger(c,"beforeUpdate",L);var F=a.allBodies(T),w=a.allConstraints(T),O=a.allComposites(T);for(T.isModified&&(s.setBodies(C,F),a.setModified(T,!1,!1,!0)),c.enableSleeping&&l.update(F,g),e._bodiesApplyGravity(F,c.gravity),e.wrap(F,O),e.attractors(F),g>0&&e._bodiesUpdate(F,g),o.trigger(c,"beforeSolve",L),u.preSolveAll(F),P=0;P<c.constraintIterations;P++)u.solveAll(w,g);u.postSolveAll(F);var B=s.collisions(C);r.update(M,B,R),c.enableSleeping&&l.afterCollisions(M.list),M.collisionStart.length>0&&o.trigger(c,"collisionStart",{pairs:M.collisionStart,timestamp:A.timestamp,delta:g});var I=f.clamp(20/c.positionIterations,0,1);for(i.preSolvePosition(M.list),P=0;P<c.positionIterations;P++)i.solvePosition(M.list,g,I);for(i.postSolvePosition(F),u.preSolveAll(F),P=0;P<c.constraintIterations;P++)u.solveAll(w,g);for(u.postSolveAll(F),i.preSolveVelocity(M.list),P=0;P<c.velocityIterations;P++)i.solveVelocity(M.list,g);return e._bodiesUpdateVelocities(F),M.collisionActive.length>0&&o.trigger(c,"collisionActive",{pairs:M.collisionActive,timestamp:A.timestamp,delta:g}),M.collisionEnd.length>0&&o.trigger(c,"collisionEnd",{pairs:M.collisionEnd,timestamp:A.timestamp,delta:g}),e._bodiesClearForces(F),o.trigger(c,"afterUpdate",L),c.timing.lastElapsed=f.now()-p,c},e.merge=function(c,g){if(f.extend(c,g),g.world){c.world=g.world,e.clear(c);for(var p=a.allBodies(c.world),T=0;T<p.length;T++){var C=p[T];l.set(C,!1),C.id=f.nextId()}}},e.clear=function(c){r.clear(c.pairs),s.clear(c.detector)},e._bodiesClearForces=function(c){for(var g=c.length,p=0;p<g;p++){var T=c[p];T.force.x=0,T.force.y=0,T.torque=0}},e._bodiesApplyGravity=function(c,g){var p=typeof g.scale<"u"?g.scale:.001,T=c.length;if(!(g.x===0&&g.y===0||p===0))for(var C=0;C<T;C++){var M=c[C];M.ignoreGravity||M.isStatic||M.isSleeping||(M.force.y+=M.mass*g.y*p,M.force.x+=M.mass*g.x*p)}},e._bodiesUpdate=function(c,g){for(var p=c.length,T=0;T<p;T++){var C=c[T];C.isStatic||C.isSleeping||v.update(C,g)}},e._bodiesUpdateVelocities=function(c){for(var g=c.length,p=0;p<g;p++)v.updateVelocities(c[p])},e.wrap=function(c,g){for(var p=0;p<c.length;p+=1){var T=c[p];T.wrapBounds!==null&&v.wrap(T,T.wrapBounds)}for(p=0;p<g.length;p+=1){var C=g[p];C.wrapBounds!==null&&a.wrap(C,C.wrapBounds)}},e.attractors=function(c){for(var g=0;g<c.length;g++){var p=c[g],T=p.attractors;if(T&&T.length>0)for(var C=0;C<c.length;C++){var M=c[C];if(g!==C)for(var A=0;A<T.length;A++){var R=T[A],P=R;f.isFunction(R)&&(P=R(p,M)),P&&v.applyForce(M,M.position,P)}}}}})()},35810:(h,d,t)=>{var e={};h.exports=e;var l=t(53402);(function(){e.on=function(i,s,r){for(var o=s.split(" "),a,u=0;u<o.length;u++)a=o[u],i.events=i.events||{},i.events[a]=i.events[a]||[],i.events[a].push(r);return r},e.off=function(i,s,r){if(!s){i.events={};return}typeof s=="function"&&(r=s,s=l.keys(i.events).join(" "));for(var o=s.split(" "),a=0;a<o.length;a++){var u=i.events[o[a]],f=[];if(r&&u)for(var v=0;v<u.length;v++)u[v]!==r&&f.push(u[v]);i.events[o[a]]=f}},e.trigger=function(i,s,r){var o,a,u,f,v=i.events;if(v&&l.keys(v).length>0){r||(r={}),o=s.split(" ");for(var c=0;c<o.length;c++)if(a=o[c],u=v[a],u){f=l.clone(r,!1),f.name=a,f.source=i;for(var g=0;g<u.length;g++)u[g].apply(i,[f])}}}})()},6790:(h,d,t)=>{var e={};h.exports=e;var l=t(73832),i=t(53402);(function(){e.name="matter-js",e.version="0.20.0",e.uses=[],e.used=[],e.use=function(){l.use(e,Array.prototype.slice.call(arguments))},e.before=function(s,r){return s=s.replace(/^Matter./,""),i.chainPathBefore(e,s,r)},e.after=function(s,r){return s=s.replace(/^Matter./,""),i.chainPathAfter(e,s,r)}})()},73832:(h,d,t)=>{var e={};h.exports=e;var l=t(53402);(function(){e._registry={},e.register=function(i){if(e.isPlugin(i)||l.warn("Plugin.register:",e.toString(i),"does not implement all required fields."),i.name in e._registry){var s=e._registry[i.name],r=e.versionParse(i.version).number,o=e.versionParse(s.version).number;r>o?(l.warn("Plugin.register:",e.toString(s),"was upgraded to",e.toString(i)),e._registry[i.name]=i):r<o?l.warn("Plugin.register:",e.toString(s),"can not be downgraded to",e.toString(i)):i!==s&&l.warn("Plugin.register:",e.toString(i),"is already registered to different plugin object")}else e._registry[i.name]=i;return i},e.resolve=function(i){return e._registry[e.dependencyParse(i).name]},e.toString=function(i){return typeof i=="string"?i:(i.name||"anonymous")+"@"+(i.version||i.range||"0.0.0")},e.isPlugin=function(i){return i&&i.name&&i.version&&i.install},e.isUsed=function(i,s){return i.used.indexOf(s)>-1},e.isFor=function(i,s){var r=i.for&&e.dependencyParse(i.for);return!i.for||s.name===r.name&&e.versionSatisfies(s.version,r.range)},e.use=function(i,s){if(i.uses=(i.uses||[]).concat(s||[]),i.uses.length===0){l.warn("Plugin.use:",e.toString(i),"does not specify any dependencies to install.");return}for(var r=e.dependencies(i),o=l.topologicalSort(r),a=[],u=0;u<o.length;u+=1)if(o[u]!==i.name){var f=e.resolve(o[u]);if(!f){a.push("❌ "+o[u]);continue}e.isUsed(i,f.name)||(e.isFor(f,i)||(l.warn("Plugin.use:",e.toString(f),"is for",f.for,"but installed on",e.toString(i)+"."),f._warned=!0),f.install?f.install(i):(l.warn("Plugin.use:",e.toString(f),"does not specify an install function."),f._warned=!0),f._warned?(a.push("🔶 "+e.toString(f)),delete f._warned):a.push("✅ "+e.toString(f)),i.used.push(f.name))}a.length>0&&!f.silent&&l.info(a.join(" "))},e.dependencies=function(i,s){var r=e.dependencyParse(i),o=r.name;if(s=s||{},!(o in s)){i=e.resolve(i)||i,s[o]=l.map(i.uses||[],function(u){e.isPlugin(u)&&e.register(u);var f=e.dependencyParse(u),v=e.resolve(u);return v&&!e.versionSatisfies(v.version,f.range)?(l.warn("Plugin.dependencies:",e.toString(v),"does not satisfy",e.toString(f),"used by",e.toString(r)+"."),v._warned=!0,i._warned=!0):v||(l.warn("Plugin.dependencies:",e.toString(u),"used by",e.toString(r),"could not be resolved."),i._warned=!0),f.name});for(var a=0;a<s[o].length;a+=1)e.dependencies(s[o][a],s);return s}},e.dependencyParse=function(i){if(l.isString(i)){var s=/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/;return s.test(i)||l.warn("Plugin.dependencyParse:",i,"is not a valid dependency string."),{name:i.split("@")[0],range:i.split("@")[1]||"*"}}return{name:i.name,range:i.range||i.version}},e.versionParse=function(i){var s=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;s.test(i)||l.warn("Plugin.versionParse:",i,"is not a valid version or range.");var r=s.exec(i),o=Number(r[4]),a=Number(r[5]),u=Number(r[6]);return{isRange:!!(r[1]||r[2]),version:r[3],range:i,operator:r[1]||r[2]||"",major:o,minor:a,patch:u,parts:[o,a,u],prerelease:r[7],number:o*1e8+a*1e4+u}},e.versionSatisfies=function(i,s){s=s||"*";var r=e.versionParse(s),o=e.versionParse(i);if(r.isRange){if(r.operator==="*"||i==="*")return!0;if(r.operator===">")return o.number>r.number;if(r.operator===">=")return o.number>=r.number;if(r.operator==="~")return o.major===r.major&&o.minor===r.minor&&o.patch>=r.patch;if(r.operator==="^")return r.major>0?o.major===r.major&&o.number>=r.number:r.minor>0?o.minor===r.minor&&o.patch>=r.patch:o.patch===r.patch}return i===s||i==="*"}})()},13037:(h,d,t)=>{var e={};h.exports=e;var l=t(35810),i=t(48413),s=t(53402);(function(){e._maxFrameDelta=66.66666666666667,e._frameDeltaFallback=16.666666666666668,e._timeBufferMargin=1.5,e._elapsedNextEstimate=1,e._smoothingLowerBound=.1,e._smoothingUpperBound=.9,e.create=function(o){var a={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},u=s.extend(a,o);return u.fps=0,u},e.run=function(o,a){return o.timeBuffer=e._frameDeltaFallback,function u(f){o.frameRequestId=e._onNextFrame(o,u),f&&o.enabled&&e.tick(o,a,f)}(),o},e.tick=function(o,a,u){var f=s.now(),v=o.delta,c=0,g=u-o.timeLastTick;if((!g||!o.timeLastTick||g>Math.max(e._maxFrameDelta,o.maxFrameTime))&&(g=o.frameDelta||e._frameDeltaFallback),o.frameDeltaSmoothing){o.frameDeltaHistory.push(g),o.frameDeltaHistory=o.frameDeltaHistory.slice(-o.frameDeltaHistorySize);var p=o.frameDeltaHistory.slice(0).sort(),T=o.frameDeltaHistory.slice(p.length*e._smoothingLowerBound,p.length*e._smoothingUpperBound),C=r(T);g=C||g}o.frameDeltaSnapping&&(g=1e3/Math.round(1e3/g)),o.frameDelta=g,o.timeLastTick=u,o.timeBuffer+=o.frameDelta,o.timeBuffer=s.clamp(o.timeBuffer,0,o.frameDelta+v*e._timeBufferMargin),o.lastUpdatesDeferred=0;var M=o.maxUpdates||Math.ceil(o.maxFrameTime/v),A={timestamp:a.timing.timestamp};l.trigger(o,"beforeTick",A),l.trigger(o,"tick",A);for(var R=s.now();v>0&&o.timeBuffer>=v*e._timeBufferMargin;){l.trigger(o,"beforeUpdate",A),i.update(a,v),l.trigger(o,"afterUpdate",A),o.timeBuffer-=v,c+=1;var P=s.now()-f,L=s.now()-R,F=P+e._elapsedNextEstimate*L/c;if(c>=M||F>o.maxFrameTime){o.lastUpdatesDeferred=Math.round(Math.max(0,o.timeBuffer/v-e._timeBufferMargin));break}}a.timing.lastUpdatesPerFrame=c,l.trigger(o,"afterTick",A),o.frameDeltaHistory.length>=100&&(o.lastUpdatesDeferred&&Math.round(o.frameDelta/v)>M?s.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):o.lastUpdatesDeferred&&s.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof o.isFixed<"u"&&s.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(o.deltaMin||o.deltaMax)&&s.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),o.fps!==0&&s.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},e.stop=function(o){e._cancelNextFrame(o)},e._onNextFrame=function(o,a){if(typeof window<"u"&&window.requestAnimationFrame)o.frameRequestId=window.requestAnimationFrame(a);else throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return o.frameRequestId},e._cancelNextFrame=function(o){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(o.frameRequestId);else throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var r=function(o){for(var a=0,u=o.length,f=0;f<u;f+=1)a+=o[f];return a/u||0};e._mean=r})()},53614:(h,d,t)=>{var e={};h.exports=e;var l=t(22562),i=t(35810),s=t(53402);(function(){e._motionWakeThreshold=.18,e._motionSleepThreshold=.08,e._minBias=.9,e.update=function(r,o){for(var a=o/s._baseDelta,u=e._motionSleepThreshold,f=0;f<r.length;f++){var v=r[f],c=l.getSpeed(v),g=l.getAngularSpeed(v),p=c*c+g*g;if(v.force.x!==0||v.force.y!==0){e.set(v,!1);continue}var T=Math.min(v.motion,p),C=Math.max(v.motion,p);v.motion=e._minBias*T+(1-e._minBias)*C,v.sleepThreshold>0&&v.motion<u?(v.sleepCounter+=1,v.sleepCounter>=v.sleepThreshold/a&&e.set(v,!0)):v.sleepCounter>0&&(v.sleepCounter-=1)}},e.afterCollisions=function(r){for(var o=e._motionSleepThreshold,a=0;a<r.length;a++){var u=r[a];if(u.isActive){var f=u.collision,v=f.bodyA.parent,c=f.bodyB.parent;if(!(v.isSleeping&&c.isSleeping||v.isStatic||c.isStatic)&&(v.isSleeping||c.isSleeping)){var g=v.isSleeping&&!v.isStatic?v:c,p=g===v?c:v;!g.isStatic&&p.motion>o&&e.set(g,!1)}}}},e.set=function(r,o){var a=r.isSleeping;o?(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,a||i.trigger(r,"sleepStart")):(r.isSleeping=!1,r.sleepCounter=0,a&&i.trigger(r,"sleepEnd"))}})()},66280:(h,d,t)=>{var e={};h.exports=e;var l=t(41598),i=t(53402),s=t(22562),r=t(15647),o=t(31725);(function(){e.rectangle=function(a,u,f,v,c){c=c||{};var g={label:"Rectangle Body",position:{x:a,y:u},vertices:l.fromPath("L 0 0 L "+f+" 0 L "+f+" "+v+" L 0 "+v)};if(c.chamfer){var p=c.chamfer;g.vertices=l.chamfer(g.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete c.chamfer}return s.create(i.extend({},g,c))},e.trapezoid=function(a,u,f,v,c,g){g=g||{},c>=1&&i.warn("Bodies.trapezoid: slope parameter must be < 1."),c*=.5;var p=(1-c*2)*f,T=f*c,C=T+p,M=C+T,A;c<.5?A="L 0 0 L "+T+" "+-v+" L "+C+" "+-v+" L "+M+" 0":A="L 0 0 L "+C+" "+-v+" L "+M+" 0";var R={label:"Trapezoid Body",position:{x:a,y:u},vertices:l.fromPath(A)};if(g.chamfer){var P=g.chamfer;R.vertices=l.chamfer(R.vertices,P.radius,P.quality,P.qualityMin,P.qualityMax),delete g.chamfer}return s.create(i.extend({},R,g))},e.circle=function(a,u,f,v,c){v=v||{};var g={label:"Circle Body",circleRadius:f};c=c||25;var p=Math.ceil(Math.max(10,Math.min(c,f)));return p%2===1&&(p+=1),e.polygon(a,u,p,f,i.extend({},g,v))},e.polygon=function(a,u,f,v,c){if(c=c||{},f<3)return e.circle(a,u,v,c);for(var g=2*Math.PI/f,p="",T=g*.5,C=0;C<f;C+=1){var M=T+C*g,A=Math.cos(M)*v,R=Math.sin(M)*v;p+="L "+A.toFixed(3)+" "+R.toFixed(3)+" "}var P={label:"Polygon Body",position:{x:a,y:u},vertices:l.fromPath(p)};if(c.chamfer){var L=c.chamfer;P.vertices=l.chamfer(P.vertices,L.radius,L.quality,L.qualityMin,L.qualityMax),delete c.chamfer}return s.create(i.extend({},P,c))},e.fromVertices=function(a,u,f,v,c,g,p,T){var C=i.getDecomp(),M,A,R,P,L,F,w,O,B,I,D;for(M=!!(C&&C.quickDecomp),v=v||{},R=[],c=typeof c<"u"?c:!1,g=typeof g<"u"?g:.01,p=typeof p<"u"?p:10,T=typeof T<"u"?T:.01,i.isArray(f[0])||(f=[f]),I=0;I<f.length;I+=1)if(F=f[I],P=l.isConvex(F),L=!P,L&&!M&&i.warnOnce("Bodies.fromVertices: Install the 'poly-decomp' library and use Common.setDecomp or provide 'decomp' as a global to decompose concave vertices."),P||!M)P?F=l.clockwiseSort(F):F=l.hull(F),R.push({position:{x:a,y:u},vertices:F});else{var N=F.map(function(Z){return[Z.x,Z.y]});C.makeCCW(N),g!==!1&&C.removeCollinearPoints(N,g),T!==!1&&C.removeDuplicatePoints&&C.removeDuplicatePoints(N,T);var z=C.quickDecomp(N);for(w=0;w<z.length;w++){var V=z[w],U=V.map(function(Z){return{x:Z[0],y:Z[1]}});p>0&&l.area(U)<p||R.push({position:l.centre(U),vertices:U})}}for(w=0;w<R.length;w++)R[w]=s.create(i.extend(R[w],v));if(c){var G=5;for(w=0;w<R.length;w++){var b=R[w];for(O=w+1;O<R.length;O++){var Y=R[O];if(r.overlaps(b.bounds,Y.bounds)){var W=b.vertices,H=Y.vertices;for(B=0;B<b.vertices.length;B++)for(D=0;D<Y.vertices.length;D++){var X=o.magnitudeSquared(o.sub(W[(B+1)%W.length],H[D])),K=o.magnitudeSquared(o.sub(W[B],H[(D+1)%H.length]));X<G&&K<G&&(W[B].isInternal=!0,H[D].isInternal=!0)}}}}}return R.length>1?(A=s.create(i.extend({parts:R.slice(0)},v)),s.setPosition(A,{x:a,y:u}),A):R[0]},e.flagCoincidentParts=function(a,u){u===void 0&&(u=5);for(var f=0;f<a.length;f++)for(var v=a[f],c=f+1;c<a.length;c++){var g=a[c];if(r.overlaps(v.bounds,g.bounds))for(var p=v.vertices,T=g.vertices,C=0;C<v.vertices.length;C++)for(var M=0;M<g.vertices.length;M++){var A=o.magnitudeSquared(o.sub(p[(C+1)%p.length],T[M])),R=o.magnitudeSquared(o.sub(p[C],T[(M+1)%T.length]));A<u&&R<u&&(p[C].isInternal=!0,T[M].isInternal=!0)}}return a}})()},74116:(h,d,t)=>{var e={};h.exports=e;var l=t(69351),i=t(48140),s=t(53402),r=t(22562),o=t(66280);(function(){e.stack=function(a,u,f,v,c,g,p){for(var T=l.create({label:"Stack"}),C=a,M=u,A,R=0,P=0;P<v;P++){for(var L=0,F=0;F<f;F++){var w=p(C,M,F,P,A,R);if(w){var O=w.bounds.max.y-w.bounds.min.y,B=w.bounds.max.x-w.bounds.min.x;O>L&&(L=O),r.translate(w,{x:B*.5,y:O*.5}),C=w.bounds.max.x+c,l.addBody(T,w),A=w,R+=1}else C+=c}M+=L+g,C=a}return T},e.chain=function(a,u,f,v,c,g){for(var p=a.bodies,T=1;T<p.length;T++){var C=p[T-1],M=p[T],A=C.bounds.max.y-C.bounds.min.y,R=C.bounds.max.x-C.bounds.min.x,P=M.bounds.max.y-M.bounds.min.y,L=M.bounds.max.x-M.bounds.min.x,F={bodyA:C,pointA:{x:R*u,y:A*f},bodyB:M,pointB:{x:L*v,y:P*c}},w=s.extend(F,g);l.addConstraint(a,i.create(w))}return a.label+=" Chain",a},e.mesh=function(a,u,f,v,c){var g=a.bodies,p,T,C,M,A;for(p=0;p<f;p++){for(T=1;T<u;T++)C=g[T-1+p*u],M=g[T+p*u],l.addConstraint(a,i.create(s.extend({bodyA:C,bodyB:M},c)));if(p>0)for(T=0;T<u;T++)C=g[T+(p-1)*u],M=g[T+p*u],l.addConstraint(a,i.create(s.extend({bodyA:C,bodyB:M},c))),v&&T>0&&(A=g[T-1+(p-1)*u],l.addConstraint(a,i.create(s.extend({bodyA:A,bodyB:M},c)))),v&&T<u-1&&(A=g[T+1+(p-1)*u],l.addConstraint(a,i.create(s.extend({bodyA:A,bodyB:M},c))))}return a.label+=" Mesh",a},e.pyramid=function(a,u,f,v,c,g,p){return e.stack(a,u,f,v,c,g,function(T,C,M,A,R,P){var L=Math.min(v,Math.ceil(f/2)),F=R?R.bounds.max.x-R.bounds.min.x:0;if(!(A>L)){A=L-A;var w=A,O=f-1-A;if(!(M<w||M>O)){P===1&&r.translate(R,{x:(M+(f%2===1?1:-1))*F,y:0});var B=R?M*F:0;return p(a+B+M*c,C,M,A,R,P)}}})},e.newtonsCradle=function(a,u,f,v,c){for(var g=l.create({label:"Newtons Cradle"}),p=0;p<f;p++){var T=1.9,C=o.circle(a+p*(v*T),u+c,v,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),M=i.create({pointA:{x:a+p*(v*T),y:u},bodyB:C});l.addBody(g,C),l.addConstraint(g,M)}return g},e.car=function(a,u,f,v,c){var g=r.nextGroup(!0),p=20,T=-f*.5+p,C=f*.5-p,M=0,A=l.create({label:"Car"}),R=o.rectangle(a,u,f,v,{collisionFilter:{group:g},chamfer:{radius:v*.5},density:2e-4}),P=o.circle(a+T,u+M,c,{collisionFilter:{group:g},friction:.8}),L=o.circle(a+C,u+M,c,{collisionFilter:{group:g},friction:.8}),F=i.create({bodyB:R,pointB:{x:T,y:M},bodyA:P,stiffness:1,length:0}),w=i.create({bodyB:R,pointB:{x:C,y:M},bodyA:L,stiffness:1,length:0});return l.addBody(A,R),l.addBody(A,P),l.addBody(A,L),l.addConstraint(A,F),l.addConstraint(A,w),A},e.softBody=function(a,u,f,v,c,g,p,T,C,M){C=s.extend({inertia:1/0},C),M=s.extend({stiffness:.2,render:{type:"line",anchors:!1}},M);var A=e.stack(a,u,f,v,c,g,function(R,P){return o.circle(R,P,T,C)});return e.mesh(A,f,v,p,M),A.label="Soft Body",A}})()},66615:(h,d,t)=>{var e={};h.exports=e;var l=t(31725),i=t(53402);(function(){e.fromVertices=function(s){for(var r={},o=0;o<s.length;o++){var a=(o+1)%s.length,u=l.normalise({x:s[a].y-s[o].y,y:s[o].x-s[a].x}),f=u.y===0?1/0:u.x/u.y;f=f.toFixed(3).toString(),r[f]=u}return i.values(r)},e.rotate=function(s,r){if(r!==0)for(var o=Math.cos(r),a=Math.sin(r),u=0;u<s.length;u++){var f=s[u],v;v=f.x*o-f.y*a,f.y=f.x*a+f.y*o,f.x=v}}})()},15647:h=>{var d={};h.exports=d,function(){d.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&d.update(e,t),e},d.update=function(t,e,l){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var i=0;i<e.length;i++){var s=e[i];s.x>t.max.x&&(t.max.x=s.x),s.x<t.min.x&&(t.min.x=s.x),s.y>t.max.y&&(t.max.y=s.y),s.y<t.min.y&&(t.min.y=s.y)}l&&(l.x>0?t.max.x+=l.x:t.min.x+=l.x,l.y>0?t.max.y+=l.y:t.min.y+=l.y)},d.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},d.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},d.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},d.shift=function(t,e){var l=t.max.x-t.min.x,i=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+l,t.min.y=e.y,t.max.y=e.y+i},d.wrap=function(t,e,l){var i=null,s=null;if(typeof e.min.x<"u"&&typeof e.max.x<"u"&&(t.min.x>e.max.x?i=e.min.x-t.max.x:t.max.x<e.min.x&&(i=e.max.x-t.min.x)),typeof e.min.y<"u"&&typeof e.max.y<"u"&&(t.min.y>e.max.y?s=e.min.y-t.max.y:t.max.y<e.min.y&&(s=e.max.y-t.min.y)),i!==null||s!==null)return{x:i||0,y:s||0}}}()},74058:(h,d,t)=>{var e={};h.exports=e,t(15647);var l=t(53402);(function(){e.pathToVertices=function(i,s){typeof window<"u"&&!("SVGPathSeg"in window)&&l.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var r,o,a,u,f,v,c,g,p,T,C=[],M,A,R=0,P=0,L=0;s=s||15;var F=function(O,B,I){var D=I%2===1&&I>1;if(!p||O!=p.x||B!=p.y){p&&D?(M=p.x,A=p.y):(M=0,A=0);var N={x:M+O,y:A+B};(D||!p)&&(p=N),C.push(N),P=M+O,L=A+B}},w=function(O){var B=O.pathSegTypeAsLetter.toUpperCase();if(B!=="Z"){switch(B){case"M":case"L":case"T":case"C":case"S":case"Q":P=O.x,L=O.y;break;case"H":P=O.x;break;case"V":L=O.y;break}F(P,L,O.pathSegType)}};for(e._svgPathToAbsolute(i),a=i.getTotalLength(),v=[],r=0;r<i.pathSegList.numberOfItems;r+=1)v.push(i.pathSegList.getItem(r));for(c=v.concat();R<a;){if(T=i.getPathSegAtLength(R),f=v[T],f!=g){for(;c.length&&c[0]!=f;)w(c.shift());g=f}switch(f.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":u=i.getPointAtLength(R),F(u.x,u.y,0);break}R+=s}for(r=0,o=c.length;r<o;++r)w(c[r]);return C},e._svgPathToAbsolute=function(i){for(var s,r,o,a,u,f,v=i.pathSegList,c=0,g=0,p=v.numberOfItems,T=0;T<p;++T){var C=v.getItem(T),M=C.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(M))"x"in C&&(c=C.x),"y"in C&&(g=C.y);else switch("x1"in C&&(o=c+C.x1),"x2"in C&&(u=c+C.x2),"y1"in C&&(a=g+C.y1),"y2"in C&&(f=g+C.y2),"x"in C&&(c+=C.x),"y"in C&&(g+=C.y),M){case"m":v.replaceItem(i.createSVGPathSegMovetoAbs(c,g),T);break;case"l":v.replaceItem(i.createSVGPathSegLinetoAbs(c,g),T);break;case"h":v.replaceItem(i.createSVGPathSegLinetoHorizontalAbs(c),T);break;case"v":v.replaceItem(i.createSVGPathSegLinetoVerticalAbs(g),T);break;case"c":v.replaceItem(i.createSVGPathSegCurvetoCubicAbs(c,g,o,a,u,f),T);break;case"s":v.replaceItem(i.createSVGPathSegCurvetoCubicSmoothAbs(c,g,u,f),T);break;case"q":v.replaceItem(i.createSVGPathSegCurvetoQuadraticAbs(c,g,o,a),T);break;case"t":v.replaceItem(i.createSVGPathSegCurvetoQuadraticSmoothAbs(c,g),T);break;case"a":v.replaceItem(i.createSVGPathSegArcAbs(c,g,C.r1,C.r2,C.angle,C.largeArcFlag,C.sweepFlag),T);break;case"z":case"Z":c=s,g=r;break}(M=="M"||M=="m")&&(s=c,r=g)}}})()},31725:h=>{var d={};h.exports=d,function(){d.create=function(t,e){return{x:t||0,y:e||0}},d.clone=function(t){return{x:t.x,y:t.y}},d.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},d.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},d.rotate=function(t,e,l){var i=Math.cos(e),s=Math.sin(e);l||(l={});var r=t.x*i-t.y*s;return l.y=t.x*s+t.y*i,l.x=r,l},d.rotateAbout=function(t,e,l,i){var s=Math.cos(e),r=Math.sin(e);i||(i={});var o=l.x+((t.x-l.x)*s-(t.y-l.y)*r);return i.y=l.y+((t.x-l.x)*r+(t.y-l.y)*s),i.x=o,i},d.normalise=function(t){var e=d.magnitude(t);return e===0?{x:0,y:0}:{x:t.x/e,y:t.y/e}},d.dot=function(t,e){return t.x*e.x+t.y*e.y},d.cross=function(t,e){return t.x*e.y-t.y*e.x},d.cross3=function(t,e,l){return(e.x-t.x)*(l.y-t.y)-(e.y-t.y)*(l.x-t.x)},d.add=function(t,e,l){return l||(l={}),l.x=t.x+e.x,l.y=t.y+e.y,l},d.sub=function(t,e,l){return l||(l={}),l.x=t.x-e.x,l.y=t.y-e.y,l},d.mult=function(t,e){return{x:t.x*e,y:t.y*e}},d.div=function(t,e){return{x:t.x/e,y:t.y/e}},d.perp=function(t,e){return e=e===!0?-1:1,{x:e*-t.y,y:e*t.x}},d.neg=function(t){return{x:-t.x,y:-t.y}},d.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},d._temp=[d.create(),d.create(),d.create(),d.create(),d.create(),d.create()]}()},41598:(h,d,t)=>{var e={};h.exports=e;var l=t(31725),i=t(53402);(function(){e.create=function(s,r){for(var o=[],a=0;a<s.length;a++){var u=s[a],f={x:u.x,y:u.y,index:a,body:r,isInternal:!1};o.push(f)}return o},e.fromPath=function(s,r){var o=/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig,a=[];return s.replace(o,function(u,f,v){a.push({x:parseFloat(f),y:parseFloat(v)})}),e.create(a,r)},e.centre=function(s){for(var r=e.area(s,!0),o={x:0,y:0},a,u,f,v=0;v<s.length;v++)f=(v+1)%s.length,a=l.cross(s[v],s[f]),u=l.mult(l.add(s[v],s[f]),a),o=l.add(o,u);return l.div(o,6*r)},e.mean=function(s){for(var r={x:0,y:0},o=0;o<s.length;o++)r.x+=s[o].x,r.y+=s[o].y;return l.div(r,s.length)},e.area=function(s,r){for(var o=0,a=s.length-1,u=0;u<s.length;u++)o+=(s[a].x-s[u].x)*(s[a].y+s[u].y),a=u;return r?o/2:Math.abs(o)/2},e.inertia=function(s,r){for(var o=0,a=0,u=s,f,v,c=0;c<u.length;c++)v=(c+1)%u.length,f=Math.abs(l.cross(u[v],u[c])),o+=f*(l.dot(u[v],u[v])+l.dot(u[v],u[c])+l.dot(u[c],u[c])),a+=f;return r/6*(o/a)},e.translate=function(s,r,o){o=typeof o<"u"?o:1;var a=s.length,u=r.x*o,f=r.y*o,v;for(v=0;v<a;v++)s[v].x+=u,s[v].y+=f;return s},e.rotate=function(s,r,o){if(r!==0){var a=Math.cos(r),u=Math.sin(r),f=o.x,v=o.y,c=s.length,g,p,T,C;for(C=0;C<c;C++)g=s[C],p=g.x-f,T=g.y-v,g.x=f+(p*a-T*u),g.y=v+(p*u+T*a);return s}},e.contains=function(s,r){for(var o=r.x,a=r.y,u=s.length,f=s[u-1],v,c=0;c<u;c++){if(v=s[c],(o-f.x)*(v.y-f.y)+(a-f.y)*(f.x-v.x)>0)return!1;f=v}return!0},e.scale=function(s,r,o,a){if(r===1&&o===1)return s;a=a||e.centre(s);for(var u,f,v=0;v<s.length;v++)u=s[v],f=l.sub(u,a),s[v].x=a.x+f.x*r,s[v].y=a.y+f.y*o;return s},e.chamfer=function(s,r,o,a,u){typeof r=="number"?r=[r]:r=r||[8],o=typeof o<"u"?o:-1,a=a||2,u=u||14;for(var f=[],v=0;v<s.length;v++){var c=s[v-1>=0?v-1:s.length-1],g=s[v],p=s[(v+1)%s.length],T=r[v<r.length?v:r.length-1];if(T===0){f.push(g);continue}var C=l.normalise({x:g.y-c.y,y:c.x-g.x}),M=l.normalise({x:p.y-g.y,y:g.x-p.x}),A=Math.sqrt(2*Math.pow(T,2)),R=l.mult(i.clone(C),T),P=l.normalise(l.mult(l.add(C,M),.5)),L=l.sub(g,l.mult(P,A)),F=o;o===-1&&(F=Math.pow(T,.32)*1.75),F=i.clamp(F,a,u),F%2===1&&(F+=1);for(var w=Math.acos(l.dot(C,M)),O=w/F,B=0;B<F;B++)f.push(l.add(l.rotate(R,O*B),L))}return f},e.clockwiseSort=function(s){var r=e.mean(s);return s.sort(function(o,a){return l.angle(r,o)-l.angle(r,a)}),s},e.isConvex=function(s){var r=0,o=s.length,a,u,f,v;if(o<3)return null;for(a=0;a<o;a++)if(u=(a+1)%o,f=(a+2)%o,v=(s[u].x-s[a].x)*(s[f].y-s[u].y),v-=(s[u].y-s[a].y)*(s[f].x-s[u].x),v<0?r|=1:v>0&&(r|=2),r===3)return!1;return r!==0?!0:null},e.hull=function(s){var r=[],o=[],a,u;for(s=s.slice(0),s.sort(function(f,v){var c=f.x-v.x;return c!==0?c:f.y-v.y}),u=0;u<s.length;u+=1){for(a=s[u];o.length>=2&&l.cross3(o[o.length-2],o[o.length-1],a)<=0;)o.pop();o.push(a)}for(u=s.length-1;u>=0;u-=1){for(a=s[u];r.length>=2&&l.cross3(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a)}return r.pop(),o.pop(),r.concat(o)}})()},55973:h=>{/**
|
||
* @author Stefan Hedman <schteppe@gmail.com> (http://steffe.se)
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={decomp:w,quickDecomp:D,isSimple:B,removeCollinearPoints:N,removeDuplicatePoints:z,makeCCW:p};function d(G,b,Y){Y=Y||0;var W=[0,0],H,X,K,Z,Q,j,J;return H=G[1][1]-G[0][1],X=G[0][0]-G[1][0],K=H*G[0][0]+X*G[0][1],Z=b[1][1]-b[0][1],Q=b[0][0]-b[1][0],j=Z*b[0][0]+Q*b[0][1],J=H*Q-Z*X,V(J,0,Y)||(W[0]=(Q*K-X*j)/J,W[1]=(H*j-Z*K)/J),W}function t(G,b,Y,W){var H=b[0]-G[0],X=b[1]-G[1],K=W[0]-Y[0],Z=W[1]-Y[1];if(K*X-Z*H===0)return!1;var Q=(H*(Y[1]-G[1])+X*(G[0]-Y[0]))/(K*X-Z*H),j=(K*(G[1]-Y[1])+Z*(Y[0]-G[0]))/(Z*H-K*X);return Q>=0&&Q<=1&&j>=0&&j<=1}function e(G,b,Y){return(b[0]-G[0])*(Y[1]-G[1])-(Y[0]-G[0])*(b[1]-G[1])}function l(G,b,Y){return e(G,b,Y)>0}function i(G,b,Y){return e(G,b,Y)>=0}function s(G,b,Y){return e(G,b,Y)<0}function r(G,b,Y){return e(G,b,Y)<=0}var o=[],a=[];function u(G,b,Y,W){if(W){var H=o,X=a;H[0]=b[0]-G[0],H[1]=b[1]-G[1],X[0]=Y[0]-b[0],X[1]=Y[1]-b[1];var K=H[0]*X[0]+H[1]*X[1],Z=Math.sqrt(H[0]*H[0]+H[1]*H[1]),Q=Math.sqrt(X[0]*X[0]+X[1]*X[1]),j=Math.acos(K/(Z*Q));return j<W}else return e(G,b,Y)===0}function f(G,b){var Y=b[0]-G[0],W=b[1]-G[1];return Y*Y+W*W}function v(G,b){var Y=G.length;return G[b<0?b%Y+Y:b%Y]}function c(G){G.length=0}function g(G,b,Y,W){for(var H=Y;H<W;H++)G.push(b[H])}function p(G){for(var b=0,Y=G,W=1;W<G.length;++W)(Y[W][1]<Y[b][1]||Y[W][1]===Y[b][1]&&Y[W][0]>Y[b][0])&&(b=W);return l(v(G,b-1),v(G,b),v(G,b+1))?!1:(T(G),!0)}function T(G){for(var b=[],Y=G.length,W=0;W!==Y;W++)b.push(G.pop());for(var W=0;W!==Y;W++)G[W]=b[W]}function C(G,b){return s(v(G,b-1),v(G,b),v(G,b+1))}var M=[],A=[];function R(G,b,Y){var W,H,X=M,K=A;if(i(v(G,b+1),v(G,b),v(G,Y))&&r(v(G,b-1),v(G,b),v(G,Y)))return!1;H=f(v(G,b),v(G,Y));for(var Z=0;Z!==G.length;++Z)if(!((Z+1)%G.length===b||Z===b)&&i(v(G,b),v(G,Y),v(G,Z+1))&&r(v(G,b),v(G,Y),v(G,Z))&&(X[0]=v(G,b),X[1]=v(G,Y),K[0]=v(G,Z),K[1]=v(G,Z+1),W=d(X,K),f(v(G,b),W)<H))return!1;return!0}function P(G,b,Y){for(var W=0;W!==G.length;++W)if(!(W===b||W===Y||(W+1)%G.length===b||(W+1)%G.length===Y)&&t(v(G,b),v(G,Y),v(G,W),v(G,W+1)))return!1;return!0}function L(G,b,Y,W){var H=W||[];if(c(H),b<Y)for(var X=b;X<=Y;X++)H.push(G[X]);else{for(var X=0;X<=Y;X++)H.push(G[X]);for(var X=b;X<G.length;X++)H.push(G[X])}return H}function F(G){for(var b=[],Y=[],W=[],H=[],X=Number.MAX_VALUE,K=0;K<G.length;++K)if(C(G,K)){for(var Z=0;Z<G.length;++Z)if(R(G,K,Z)){Y=F(L(G,K,Z,H)),W=F(L(G,Z,K,H));for(var Q=0;Q<W.length;Q++)Y.push(W[Q]);Y.length<X&&(b=Y,X=Y.length,b.push([v(G,K),v(G,Z)]))}}return b}function w(G){var b=F(G);return b.length>0?O(G,b):[G]}function O(G,b){if(b.length===0)return[G];if(b instanceof Array&&b.length&&b[0]instanceof Array&&b[0].length===2&&b[0][0]instanceof Array){for(var Y=[G],W=0;W<b.length;W++)for(var H=b[W],X=0;X<Y.length;X++){var K=Y[X],Z=O(K,H);if(Z){Y.splice(X,1),Y.push(Z[0],Z[1]);break}}return Y}else{var H=b,W=G.indexOf(H[0]),X=G.indexOf(H[1]);return W!==-1&&X!==-1?[L(G,W,X),L(G,X,W)]:!1}}function B(G){var b=G,Y;for(Y=0;Y<b.length-1;Y++)for(var W=0;W<Y-1;W++)if(t(b[Y],b[Y+1],b[W],b[W+1]))return!1;for(Y=1;Y<b.length-2;Y++)if(t(b[0],b[b.length-1],b[Y],b[Y+1]))return!1;return!0}function I(G,b,Y,W,H){H=H||0;var X=b[1]-G[1],K=G[0]-b[0],Z=X*G[0]+K*G[1],Q=W[1]-Y[1],j=Y[0]-W[0],J=Q*Y[0]+j*Y[1],tt=X*j-Q*K;return V(tt,0,H)?[0,0]:[(j*Z-K*J)/tt,(X*J-Q*Z)/tt]}function D(G,b,Y,W,H,X,K){X=X||100,K=K||0,H=H||25,b=typeof b<"u"?b:[],Y=Y||[],W=W||[];var Z=[0,0],Q=[0,0],j=[0,0],J=0,tt=0,k=0,q=0,_=0,rt=0,at=0,ht=[],ot=[],nt=G,it=G;if(it.length<3)return b;if(K++,K>X)return console.warn("quickDecomp: max level ("+X+") reached."),b;for(var lt=0;lt<G.length;++lt)if(C(nt,lt)){Y.push(nt[lt]),J=tt=Number.MAX_VALUE;for(var dt=0;dt<G.length;++dt)l(v(nt,lt-1),v(nt,lt),v(nt,dt))&&r(v(nt,lt-1),v(nt,lt),v(nt,dt-1))&&(j=I(v(nt,lt-1),v(nt,lt),v(nt,dt),v(nt,dt-1)),s(v(nt,lt+1),v(nt,lt),j)&&(k=f(nt[lt],j),k<tt&&(tt=k,Q=j,rt=dt))),l(v(nt,lt+1),v(nt,lt),v(nt,dt+1))&&r(v(nt,lt+1),v(nt,lt),v(nt,dt))&&(j=I(v(nt,lt+1),v(nt,lt),v(nt,dt),v(nt,dt+1)),l(v(nt,lt-1),v(nt,lt),j)&&(k=f(nt[lt],j),k<J&&(J=k,Z=j,_=dt)));if(rt===(_+1)%G.length)j[0]=(Q[0]+Z[0])/2,j[1]=(Q[1]+Z[1])/2,W.push(j),lt<_?(g(ht,nt,lt,_+1),ht.push(j),ot.push(j),rt!==0&&g(ot,nt,rt,nt.length),g(ot,nt,0,lt+1)):(lt!==0&&g(ht,nt,lt,nt.length),g(ht,nt,0,_+1),ht.push(j),ot.push(j),g(ot,nt,rt,lt+1));else{if(rt>_&&(_+=G.length),q=Number.MAX_VALUE,_<rt)return b;for(var dt=rt;dt<=_;++dt)i(v(nt,lt-1),v(nt,lt),v(nt,dt))&&r(v(nt,lt+1),v(nt,lt),v(nt,dt))&&(k=f(v(nt,lt),v(nt,dt)),k<q&&P(nt,lt,dt)&&(q=k,at=dt%G.length));lt<at?(g(ht,nt,lt,at+1),at!==0&&g(ot,nt,at,it.length),g(ot,nt,0,lt+1)):(lt!==0&&g(ht,nt,lt,it.length),g(ht,nt,0,at+1),g(ot,nt,at,lt+1))}return ht.length<ot.length?(D(ht,b,Y,W,H,X,K),D(ot,b,Y,W,H,X,K)):(D(ot,b,Y,W,H,X,K),D(ht,b,Y,W,H,X,K)),b}return b.push(G),b}function N(G,b){for(var Y=0,W=G.length-1;G.length>3&&W>=0;--W)u(v(G,W-1),v(G,W),v(G,W+1),b)&&(G.splice(W%G.length,1),Y++);return Y}function z(G,b){for(var Y=G.length-1;Y>=1;--Y)for(var W=G[Y],H=Y-1;H>=0;--H)if(U(W,G[H],b)){G.splice(Y,1);continue}}function V(G,b,Y){return Y=Y||0,Math.abs(G-b)<=Y}function U(G,b,Y){return V(G[0],b[0],Y)&&V(G[1],b[1],Y)}},52018:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s){this.pluginManager=s,this.game=s.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});h.exports=l},42363:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};d.DefaultScene.push("CameraManager3D"),d.Global.push("facebook"),h.exports=d},37277:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={},t={},e={};e.register=function(l,i,s,r){r===void 0&&(r=!1),d[l]={plugin:i,mapping:s,custom:r}},e.registerCustom=function(l,i,s,r){t[l]={plugin:i,mapping:s,data:r}},e.hasCore=function(l){return d.hasOwnProperty(l)},e.hasCustom=function(l){return t.hasOwnProperty(l)},e.getCore=function(l){return d[l]},e.getCustom=function(l){return t[l]},e.getCustomClass=function(l){return t.hasOwnProperty(l)?t[l].plugin:null},e.remove=function(l){d.hasOwnProperty(l)&&delete d[l]},e.removeCustom=function(l){t.hasOwnProperty(l)&&delete t[l]},e.destroyCorePlugins=function(){for(var l in d)d.hasOwnProperty(l)&&delete d[l]},e.destroyCustomPlugins=function(){for(var l in t)t.hasOwnProperty(l)&&delete t[l]},h.exports=e},77332:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(8443),i=t(50792),s=t(74099),r=t(44603),o=t(39429),a=t(95540),u=t(37277),f=t(72905),v=t(8054),c=new e({Extends:i,initialize:function(p){i.call(this),this.game=p,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],p.isBooted||p.config.renderType===v.HEADLESS?this.boot():p.events.once(l.BOOT,this.boot,this)},boot:function(){var g,p,T,C,M,A,R,P=this.game.config,L=P.installGlobalPlugins;for(L=L.concat(this._pendingGlobal),g=0;g<L.length;g++)p=L[g],T=a(p,"key",null),C=a(p,"plugin",null),M=a(p,"start",!1),A=a(p,"mapping",null),R=a(p,"data",null),T&&(C?this.install(T,C,M,A,R):console.warn("Missing `plugin` for key: "+T));for(L=P.installScenePlugins,L=L.concat(this._pendingScene),g=0;g<L.length;g++)p=L[g],T=a(p,"key",null),C=a(p,"plugin",null),A=a(p,"mapping",null),T&&(C?this.installScenePlugin(T,C,A):console.warn("Missing `plugin` for key: "+T));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(l.DESTROY,this.destroy,this)},addToScene:function(g,p,T){var C,M,A,R=this.game,P=g.scene,L=g.settings.map,F=g.settings.isBooted;for(C=0;C<p.length;C++)M=p[C],R[M]?(g[M]=R[M],L.hasOwnProperty(M)&&(P[L[M]]=g[M])):M==="game"&&L.hasOwnProperty(M)&&(P[L[M]]=R);for(var w=0;w<T.length;w++)for(A=T[w],C=0;C<A.length;C++)if(M=A[C],!!u.hasCore(M)){var O=u.getCore(M),B=O.mapping,I=new O.plugin(P,this,B);g[B]=I,O.custom?P[B]=I:L.hasOwnProperty(B)&&(P[L[B]]=I),F&&I.boot()}for(A=this.plugins,C=0;C<A.length;C++){var D=A[C];D.mapping&&(P[D.mapping]=D.plugin)}},getDefaultScenePlugins:function(){var g=this.game.config.defaultPlugins;return g=g.concat(this.scenePlugins),g},installScenePlugin:function(g,p,T,C,M){if(M===void 0&&(M=!1),typeof p!="function"){console.warn("Invalid Scene Plugin: "+g);return}if(u.hasCore(g)||u.register(g,p,T,!0),this.scenePlugins.indexOf(g)===-1)this.scenePlugins.push(g);else if(!M&&u.hasCore(g)){console.warn("Scene Plugin key in use: "+g);return}if(C){var A=new p(C,this,g);C.sys[g]=A,T&&T!==""&&(C[T]=A),A.boot()}},install:function(g,p,T,C,M){if(T===void 0&&(T=!1),C===void 0&&(C=null),M===void 0&&(M=null),typeof p!="function")return console.warn("Invalid Plugin: "+g),null;if(u.hasCustom(g))return console.warn("Plugin key in use: "+g),null;if(C!==null&&(T=!0),!this.game.isBooted)this._pendingGlobal.push({key:g,plugin:p,start:T,mapping:C,data:M});else if(u.registerCustom(g,p,C,M),T)return this.start(g);return null},getIndex:function(g){for(var p=this.plugins,T=0;T<p.length;T++){var C=p[T];if(C.key===g)return T}return-1},getEntry:function(g){var p=this.getIndex(g);if(p!==-1)return this.plugins[p]},isActive:function(g){var p=this.getEntry(g);return p&&p.active},start:function(g,p){p===void 0&&(p=g);var T=this.getEntry(p);return T&&!T.active?(T.active=!0,T.plugin.start()):T||(T=this.createEntry(g,p)),T?T.plugin:null},createEntry:function(g,p){var T=u.getCustom(g);if(T){var C=new T.plugin(this);T={key:p,plugin:C,active:!0,mapping:T.mapping,data:T.data},this.plugins.push(T),C.init(T.data),C.start()}return T},stop:function(g){var p=this.getEntry(g);return p&&p.active&&(p.active=!1,p.plugin.stop()),this},get:function(g,p){p===void 0&&(p=!0);var T=this.getEntry(g);if(T)return T.plugin;var C=this.getClass(g);return C&&p?(T=this.createEntry(g,g),T?T.plugin:null):C||null},getClass:function(g){return u.getCustomClass(g)},removeGlobalPlugin:function(g){var p=this.getEntry(g);p&&f(this.plugins,p),u.removeCustom(g)},removeScenePlugin:function(g){f(this.scenePlugins,g),u.remove(g)},registerGameObject:function(g,p,T){return p&&o.register(g,p),T&&r.register(g,T),this},removeGameObject:function(g,p,T){return p===void 0&&(p=!0),T===void 0&&(T=!0),p&&o.remove(g),T&&r.remove(g),this},registerFileType:function(g,p,T){s.register(g,p),T&&T.sys.load&&(T.sys.load[g]=p)},destroy:function(){for(var g=0;g<this.plugins.length;g++)this.plugins[g].plugin.destroy();u.destroyCustomPlugins(),this.game.noReturn&&u.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});h.exports=c},45145:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}
|
||
*/var e=t(52018),l=t(83419),i=t(44594),s=new l({Extends:e,initialize:function(o,a,u){e.call(this,a),this.scene=o,this.systems=o.sys,this.pluginKey=u,o.sys.events.once(i.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});h.exports=s},18922:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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(h){const d=performance.now(),t=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,l=(i,s)=>{const r=this.getVideoPlaybackQuality(),o=this.mozPresentedFrames||this.mozPaintedFrames||r.totalVideoFrames-r.droppedVideoFrames;if(o>e){const a=this.mozFrameDelay||r.totalFrameDelay-t.totalFrameDelay||0,u=s-i;h(s,{presentationTime:s+a*1e3,expectedDisplayTime:s+u,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+u/1e3,presentedFrames:o,processingDuration:a}),delete this._rvfcpolyfillmap[d]}else this._rvfcpolyfillmap[d]=requestAnimationFrame(a=>l(s,a))};return this._rvfcpolyfillmap[d]=requestAnimationFrame(i=>l(d,i)),d},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(h){cancelAnimationFrame(this._rvfcpolyfillmap[h]),delete this._rvfcpolyfillmap[h]})},10312:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={DEFAULT:0,LINEAR:0,NEAREST:1};h.exports=d},68627:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19715),l=t(32880),i=t(83419),s=t(8054),r=t(50792),o=t(92503),a=t(56373),u=t(97480),f=t(69442),v=t(8443),c=t(61340),g=new i({Extends:r,initialize:function(T){r.call(this);var C=T.config;this.config={clearBeforeRender:C.clearBeforeRender,backgroundColor:C.backgroundColor,antialias:C.antialias,roundPixels:C.roundPixels,transparent:C.transparent},this.game=T,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=T.canvas;var M={alpha:C.transparent,desynchronized:C.desynchronized,willReadFrequently:!1};this.gameContext=C.context?C.context:this.gameCanvas.getContext("2d",M),this.currentContext=this.gameContext,this.antialias=C.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this.isBooted=!1,this.init()},init:function(){var p=this.game;p.events.once(v.BOOT,function(){var T=this.config;if(!T.transparent){var C=this.gameContext,M=this.gameCanvas;C.fillStyle=T.backgroundColor.rgba,C.fillRect(0,0,M.width,M.height)}},this),p.textures.once(f.READY,this.boot,this)},boot:function(){var p=this.game,T=p.scale.baseSize;this.width=T.width,this.height=T.height,this.isBooted=!0,p.scale.on(u.RESIZE,this.onResize,this),this.resize(T.width,T.height)},onResize:function(p,T){(T.width!==this.width||T.height!==this.height)&&this.resize(T.width,T.height)},resize:function(p,T){this.width=p,this.height=T,this.emit(o.RESIZE,p,T)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(p){return this.currentContext.globalCompositeOperation=p,this},setContext:function(p){return this.currentContext=p||this.gameContext,this},setAlpha:function(p){return this.currentContext.globalAlpha=p,this},preRender:function(){var p=this.gameContext,T=this.config,C=this.width,M=this.height;p.globalAlpha=1,p.globalCompositeOperation="source-over",p.setTransform(1,0,0,1,0,0),this.emit(o.PRE_RENDER_CLEAR),T.clearBeforeRender&&(p.clearRect(0,0,C,M),T.transparent||(p.fillStyle=T.backgroundColor.rgba,p.fillRect(0,0,C,M))),p.save(),this.drawCount=0,this.emit(o.PRE_RENDER)},render:function(p,T,C){var M=T.length;this.emit(o.RENDER,p,C);var A=C.x,R=C.y,P=C.width,L=C.height,F=C.renderToTexture?C.context:p.sys.context;F.save(),this.game.scene.customViewports&&(F.beginPath(),F.rect(A,R,P,L),F.clip()),C.emit(e.PRE_RENDER,C),this.currentContext=F;var w=C.mask;w&&w.preRenderCanvas(this,null,C._maskCamera),C.transparent||(F.fillStyle=C.backgroundColor.rgba,F.fillRect(A,R,P,L)),F.globalAlpha=C.alpha,F.globalCompositeOperation="source-over",this.drawCount+=M,C.renderToTexture&&C.emit(e.PRE_RENDER,C),C.matrix.copyToContext(F);for(var O=0;O<M;O++){var B=T[O];B.mask&&B.mask.preRenderCanvas(this,B,C),B.renderCanvas(this,B,C),B.mask&&B.mask.postRenderCanvas(this,B,C)}F.setTransform(1,0,0,1,0,0),F.globalCompositeOperation="source-over",F.globalAlpha=1,C.flashEffect.postRenderCanvas(F),C.fadeEffect.postRenderCanvas(F),C.dirty=!1,w&&w.postRenderCanvas(this),F.restore(),C.renderToTexture&&(C.emit(e.POST_RENDER,C),C.renderToGame&&p.sys.context.drawImage(C.canvas,A,R)),C.emit(e.POST_RENDER,C)},postRender:function(){var p=this.gameContext;p.restore(),this.emit(o.POST_RENDER);var T=this.snapshotState;T.callback&&(l(this.gameCanvas,T),T.callback=null)},snapshotCanvas:function(p,T,C,M,A,R,P,L,F){C===void 0&&(C=!1),this.snapshotArea(M,A,R,P,T,L,F);var w=this.snapshotState;return w.getPixel=C,l(p,w),w.callback=null,this},snapshot:function(p,T,C){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,p,T,C)},snapshotArea:function(p,T,C,M,A,R,P){var L=this.snapshotState;return L.callback=A,L.type=R,L.encoder=P,L.getPixel=!1,L.x=p,L.y=T,L.width=Math.min(C,this.gameCanvas.width),L.height=Math.min(M,this.gameCanvas.height),this},snapshotPixel:function(p,T,C){return this.snapshotArea(p,T,1,1,C),this.snapshotState.getPixel=!0,this},batchSprite:function(p,T,C,M){var A=C.alpha*p.alpha;if(A!==0){var R=this.currentContext,P=this._tempMatrix1,L=this._tempMatrix2,F=T.canvasData,w=F.x,O=F.y,B=T.cutWidth,I=T.cutHeight,D=T.customPivot,N=T.source.resolution,z=p.displayOriginX,V=p.displayOriginY,U=-z+T.x,G=-V+T.y;if(p.isCropped){var b=p._crop;(b.flipX!==p.flipX||b.flipY!==p.flipY)&&T.updateCropUVs(b,p.flipX,p.flipY),B=b.cw,I=b.ch,w=b.cx,O=b.cy,U=-z+b.x,G=-V+b.y,p.flipX&&(U>=0?U=-(U+B):U<0&&(U=Math.abs(U)-B)),p.flipY&&(G>=0?G=-(G+I):G<0&&(G=Math.abs(G)-I))}var Y=1,W=1;p.flipX&&(D||(U+=-T.realWidth+z*2),Y=-1),p.flipY&&(D||(G+=-T.realHeight+V*2),W=-1);var H=p.x,X=p.y;if(C.roundPixels&&(H=Math.floor(H),X=Math.floor(X)),L.applyITRS(H,X,p.rotation,p.scaleX*Y,p.scaleY*W),P.copyWithScrollFactorFrom(C.matrixCombined,C.scrollX,C.scrollY,p.scrollFactorX,p.scrollFactorY),M&&P.multiply(M),P.multiply(L),C.renderRoundPixels&&(P.e=Math.floor(P.e+.5),P.f=Math.floor(P.f+.5)),R.save(),P.setToContext(R),R.globalCompositeOperation=this.blendModes[p.blendMode],R.globalAlpha=A,R.imageSmoothingEnabled=!T.source.scaleMode,p.mask&&p.mask.preRenderCanvas(this,p,C),B>0&&I>0){var K=B/N,Z=I/N;C.roundPixels&&(U=Math.floor(U+.5),G=Math.floor(G+.5),K+=.5,Z+=.5),R.drawImage(T.source.image,w,O,B,I,U,G,K,Z)}p.mask&&p.mask.postRenderCanvas(this,p,C),R.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});h.exports=g},55830:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}},56373:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10312),l=t(89289),i=function(){var s=[],r=l.supportNewBlendModes,o="source-over";return s[e.NORMAL]=o,s[e.ADD]="lighter",s[e.MULTIPLY]=r?"multiply":o,s[e.SCREEN]=r?"screen":o,s[e.OVERLAY]=r?"overlay":o,s[e.DARKEN]=r?"darken":o,s[e.LIGHTEN]=r?"lighten":o,s[e.COLOR_DODGE]=r?"color-dodge":o,s[e.COLOR_BURN]=r?"color-burn":o,s[e.HARD_LIGHT]=r?"hard-light":o,s[e.SOFT_LIGHT]=r?"soft-light":o,s[e.DIFFERENCE]=r?"difference":o,s[e.EXCLUSION]=r?"exclusion":o,s[e.HUE]=r?"hue":o,s[e.SATURATION]=r?"saturation":o,s[e.COLOR]=r?"color":o,s[e.LUMINOSITY]=r?"luminosity":o,s[e.ERASE]="destination-out",s[e.SOURCE_IN]="source-in",s[e.SOURCE_OUT]="source-out",s[e.SOURCE_ATOP]="source-atop",s[e.DESTINATION_OVER]="destination-over",s[e.DESTINATION_IN]="destination-in",s[e.DESTINATION_OUT]="destination-out",s[e.DESTINATION_ATOP]="destination-atop",s[e.LIGHTER]="lighter",s[e.COPY]="copy",s[e.XOR]="xor",s};h.exports=i},20926:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91296),l=function(i,s,r,o,a){var u=o.alpha*r.alpha;if(u<=0)return!1;var f=e(r,o,a).calc;return s.globalCompositeOperation=i.blendModes[r.blendMode],s.globalAlpha=u,s.save(),f.setToContext(s),s.imageSmoothingEnabled=r.frame?!r.frame.source.scaleMode:i.antialias,!0};h.exports=l},63899:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="losewebgl"},6119:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="postrender"},31124:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="prerenderclear"},48070:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="prerender"},15640:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="render"},8912:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resize"},87124:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="restorewebgl"},53998:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="setparalleltextureunits"},92503:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),PRE_RENDER_CLEAR:t(31124),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124),SET_PARALLEL_TEXTURE_UNITS:t(53998)}},36909:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Events:t(92503),Snapshot:t(89966)},h.exports.Canvas=t(55830),h.exports.WebGL=t(4159)},32880:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(27919),l=t(40987),i=t(95540),s=function(r,o){var a=i(o,"callback"),u=i(o,"type","image/png"),f=i(o,"encoder",.92),v=Math.abs(Math.round(i(o,"x",0))),c=Math.abs(Math.round(i(o,"y",0))),g=Math.floor(i(o,"width",r.width)),p=Math.floor(i(o,"height",r.height)),T=i(o,"getPixel",!1);if(T){var C=r.getContext("2d",{willReadFrequently:!1}),M=C.getImageData(v,c,1,1),A=M.data;a.call(null,new l(A[0],A[1],A[2],A[3]))}else if(v!==0||c!==0||g!==r.width||p!==r.height){var R=e.createWebGL(this,g,p),P=R.getContext("2d",{willReadFrequently:!0});g>0&&p>0&&P.drawImage(r,v,c,g,p,0,0,g,p);var L=new Image;L.onerror=function(){a.call(null),e.remove(R)},L.onload=function(){a.call(null,L),e.remove(R)},L.src=R.toDataURL(u,f)}else{var F=new Image;F.onerror=function(){a.call(null)},F.onload=function(){a.call(null,F)},F.src=r.toDataURL(u,f)}};h.exports=s},88815:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(27919),l=t(40987),i=t(95540),s=function(r,o){var a=r,u=i(o,"callback"),f=i(o,"type","image/png"),v=i(o,"encoder",.92),c=Math.abs(Math.round(i(o,"x",0))),g=Math.abs(Math.round(i(o,"y",0))),p=i(o,"getPixel",!1),T=i(o,"isFramebuffer",!1),C=T?i(o,"bufferWidth",1):a.drawingBufferWidth,M=T?i(o,"bufferHeight",1):a.drawingBufferHeight;if(p){var A=new Uint8Array(4),R=M-g-1;a.readPixels(c,R,1,1,a.RGBA,a.UNSIGNED_BYTE,A),u.call(null,new l(A[0],A[1],A[2],A[3]))}else{var P=Math.floor(i(o,"width",C)),L=Math.floor(i(o,"height",M)),F=P*L*4,w=new Uint8Array(F);a.readPixels(c,M-g-L,P,L,a.RGBA,a.UNSIGNED_BYTE,w);for(var O=e.createWebGL(this,P,L),B=O.getContext("2d",{willReadFrequently:!0}),I=B.getImageData(0,0,P,L),D=I.data,N=0;N<L;N++)for(var z=0;z<P;z++){var V=((L-N-1)*P+z)*4,U=(N*P+z)*4,G=w[V+0],b=w[V+1],Y=w[V+2],W=w[V+3];if(o.unpremultiplyAlpha&&W!==0){var H=255/W;G=Math.floor(G*H),b=Math.floor(b*H),Y=Math.floor(Y*H)}D[U+0]=G,D[U+1]=b,D[U+2]=Y,D[U+3]=W}B.putImageData(I,0,0);var X=new Image;X.onerror=function(){u.call(null),e.remove(O)},X.onload=function(){u.call(null,X),e.remove(O)},X.src=O.toDataURL(f,v)}};h.exports=s},89966:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Canvas:t(32880),WebGL:t(88815)}},87774:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r){r===void 0&&(r={}),this.renderer=s,this.camera=null,this.setCamera(r.camera||null),this.state={bindings:{framebuffer:null},blend:{},colorClearValue:r.clearColor||[0,0,0,0],scissor:{box:[0,0,0,0],enable:!0},viewport:[0,0,0,0]},this.blendMode=-1,this.setBlendMode(r.blendMode||0),this.autoClear=0,r.autoClear===void 0||r.autoClear===!0?this.setAutoClear(!0,!0,!0):Array.isArray(r.autoClear)&&this.setAutoClear.apply(this,r.autoClear),this.useCanvas=!!r.useCanvas,this.framebuffer=null,this.texture=null,this.pool=r.pool||null,this.lastUsed=0,this.width=0,this.height=0,this._locks=[],r.copyFrom?this.copy(r.copyFrom):this.resize(r.width||s.width,r.height||s.height)},resize:function(i,s){if(i=Math.round(i),s=Math.round(s),i<=0&&(i=1),s<=0&&(s=1),this.useCanvas)this.framebuffer||(this.framebuffer=this.renderer.createFramebuffer(null));else if(this.framebuffer)this.framebuffer.resize(i,s);else{var r=this.renderer;this.texture=r.createTextureFromSource(null,i,s,0),this.framebuffer=r.createFramebuffer(this.texture,!0,!1)}this.state.bindings.framebuffer=this.framebuffer,this.width=i,this.height=s,this.state.scissor.box=[0,0,i,s],this.state.viewport=[0,0,i,s]},copy:function(i){var s=i.state,r=s.blend,o=s.scissor;this.autoClear=i.autoClear,this.useCanvas=i.useCanvas,this.framebuffer=i.framebuffer,this.texture=i.texture,this.camera=i.camera,this.blendMode=i.blendMode,this.width=i.width,this.height=i.height,this.state={bindings:{framebuffer:s.bindings.framebuffer},blend:{color:r.color&&r.color.slice(),enable:r.enable,equation:r.equation,func:r.func},colorClearValue:s.colorClearValue.slice(),scissor:{box:o.box.slice(),enable:o.enable},viewport:s.viewport.slice()}},getClone:function(i){var s=new l(this.renderer,{copyFrom:this});return i||s.setAutoClear(!1,!1,!1),s},setAutoClear:function(i,s,r){var o=0,a=this.renderer.gl;i&&(o|=a.COLOR_BUFFER_BIT),s&&(o|=a.DEPTH_BUFFER_BIT),r&&(o|=a.STENCIL_BUFFER_BIT),this.autoClear=o},setBlendMode:function(i,s){if(i!==this.blendMode){var r=this.state.blend,o=this.renderer.blendModes[i];r.enable=o.enable,r.equation=o.equation,r.func=o.func,s?r.color=s:r.color=void 0,this.blendMode=i}},setCamera:function(i){this.camera=i},setClearColor:function(i,s,r,o){var a=this.state.colorClearValue;i===a[0]&&s===a[1]&&r===a[2]&&o===a[3]||(this.state.colorClearValue=[i,s,r,o])},setScissorBox:function(i,s,r,o){s=this.height-s-o,this.state.scissor.box=[i,s,r,o]},setScissorEnable:function(i){this.state.scissor.enable=i},use:function(){this.renderer.renderNodes.finishBatch(),this.autoClear&&this.clear()},release:function(){this.pool&&this._locks.length===0&&(this.lastUsed=Date.now(),this.pool.add(this)),this.renderer.renderNodes.finishBatch()},lock:function(i){this._locks.indexOf(i)===-1&&this._locks.push(i)},unlock:function(i,s){var r=this._locks.indexOf(i);r!==-1&&this._locks.splice(r,1),s&&this.release()},isLocked:function(){return this._locks.length>0},beginDraw:function(){this.framebuffer&&this.renderer.glTextureUnits.unbindTexture(this.texture),this.renderer.glWrapper.update(this.state)},clear:function(i){this.beginDraw(),i===void 0&&(i=this.autoClear),this.renderer.renderNodes.finishBatch(),this.renderer.gl.clear(i)},destroy:function(){this.renderer.deleteTexture(this.texture),this.renderer.deleteFramebuffer(this.state.bindings.framebuffer),this.renderer=null,this.camera=null,this.state=null,this.framebuffer=null,this.texture=null}});h.exports=l},65656:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(87774),i=new e({initialize:function(r,o,a){this.renderer=r,this.maxAge=o,this.maxPoolSize=a,this.agePool=[],this.sizePool={}},add:function(s){if(this.agePool.indexOf(s)===-1){var r=s.width+"x"+s.height;this.sizePool[r]?this.sizePool[r].push(s):this.sizePool[r]=[s],this.agePool.push(s)}},get:function(s,r){var o,a,u=this.renderer;s===void 0&&(s=u.width),r===void 0&&(r=u.height);var f=u.getMaxTextureSize();s>f&&(s=f),r>f&&(r=f);var v=s+"x"+r,c=this.sizePool[v];if(c&&c.length>0)return o=c.pop(),a=this.agePool.indexOf(o),this.agePool.splice(a,1),o;if(this.agePool.length>0){var g=Date.now(),p=this.maxAge;if(o=this.agePool[0],g-o.lastUsed>p){this.agePool.shift();var T=o.width+"x"+o.height;return c=this.sizePool[T],a=c.indexOf(o),c.splice(a,1),o.resize(s,r),o}}return this.agePool.length<this.maxPoolSize?(o=new l(u,{autoClear:!0,pool:this,width:s,height:r}),o):(o=this.agePool.shift(),o?(c=this.sizePool[v],a=c.indexOf(o),c.splice(a,1),o.resize(s,r),o):(o=new l(u,{autoClear:!0,pool:this,width:s,height:r}),o))},setMaxAge:function(s){this.maxAge=s},setMaxPoolSize:function(s){this.maxPoolSize=s},clear:function(){for(var s=0;s<this.agePool.length;s++)this.agePool[s].destroy();this.sizePool={},this.agePool.length=0},prune:function(){var s=this.sizePool,r=this.agePool,o=r.length-this.maxPoolSize;if(o>0)for(var a=r.splice(0,o),u=0;u<o;u++){var f=a[u],v=f.width+"x"+f.height,c=s[v],g=c.indexOf(f);c.splice(g,1),f.destroy()}}});h.exports=i},56436:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(62644),i=new e({initialize:function(r,o,a){this.renderer=r,this.indexBuffer=a,this.attributeBufferLayouts=o,this.currentProgramKey=null,this.currentConfig={base:{vertexShader:"",fragmentShader:""},additions:[],features:[]},this.programs={},this.uniforms={}},getCurrentProgramSuite:function(){var s=this.currentConfig,r=this.renderer,o=r.shaderProgramFactory,a=o.getKey(s.base,s.additions,s.features);if(!this.programs[a]){var u=o.getShaderProgram(s.base,s.additions,s.features);u.compiling&&u.checkParallelCompile(),u.compiling||(this.programs[a]={program:u,vao:r.createVAO(u,this.indexBuffer,this.attributeBufferLayouts),config:l(s)})}return this.programs[a]||null},resetCurrentConfig:function(){this.currentConfig.base.vertexShader="",this.currentConfig.base.fragmentShader="",this.currentConfig.additions.length=0,this.currentConfig.features.length=0},setUniform:function(s,r){this.uniforms[s]=r},removeUniform:function(s){delete this.uniforms[s]},clearUniforms:function(){this.uniforms.length=0},applyUniforms:function(s){var r=this.uniforms;for(var o in r)s.setUniform(o,r[o])},setBaseShader:function(s,r,o){var a=this.currentConfig.base;a.name=s,a.vertexShader=r,a.fragmentShader=o},addAddition:function(s,r){r===void 0?this.currentConfig.additions.push(s):this.currentConfig.additions.splice(r,0,s)},getAddition:function(s){for(var r=this.currentConfig.additions,o=0;o<r.length;o++){var a=r[o];if(a.name===s)return a}return null},getAdditionsByTag:function(s){return this.currentConfig.additions.filter(function(r){return r.tags?r.tags.includes(s):!1})},getAdditionIndex:function(s){return this.currentConfig.additions.findIndex(function(r){return r.name===s})},removeAddition:function(s){this.currentConfig.additions=this.currentConfig.additions.filter(function(r){return r.name!==s})},replaceAddition:function(s,r){var o=this.currentConfig.additions.findIndex(function(a){return a.name===s});o!==-1&&(this.currentConfig.additions[o]=r)},addFeature:function(s){this.currentConfig.features.indexOf(s)===-1&&this.currentConfig.features.push(s)},removeFeature:function(s){this.currentConfig.features=this.currentConfig.features.filter(function(r){return r!==s})},clearFeatures:function(){this.currentConfig.features.length=0}});h.exports=i},18804:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s){this.renderer=s,this.programs={}},has:function(i){return this.programs[i]!==void 0},getShaderProgram:function(i,s,r){var o=this.getKey(i,s,r),a=this.programs[o];return a||(a=this.createShaderProgram(o,i,s,r)),a},getKey:function(i,s,r){var o=i.name;if(s&&s.length>0){o+="_";for(var a=0;a<s.length;a++){var u=s[a];u.disable||(o+="_"+u.name)}}return r&&r.length>0&&(o+="__",o+=r.sort().join("_")),o},createShaderProgram:function(i,s,r,o){var a=s.vertexShader,u=s.fragmentShader;if(a=a.replace(/\r/g,""),u=u.replace(/\r/g,""),r){for(var f,v,c={},g=0;g<r.length;g++){var p=r[g];if(!p.disable)for(f in p.additions)v=p.additions[f],v=v.replace(/\r/g,""),c[f]||(c[f]=""),c[f]+=v+`
|
||
`}for(f in c){var T="#pragma phaserTemplate("+f+`)
|
||
`;v=c[f],a=a.replace(T,v),u=u.replace(T,v)}}if(o){var C="",M=/[^a-zA-Z0-9]/g;for(g=0;g<o.length;g++){var A=o[g].toUpperCase().replace(M,"_");C+="#define FEATURE_"+A+`
|
||
`}a=a.replace("#pragma phaserTemplate(features)",C),u=u.replace("#pragma phaserTemplate(features)",C)}a=a.replace("#pragma phaserTemplate(shaderName)","#define SHADER_NAME "+i+"__VERTEX"),u=u.replace("#pragma phaserTemplate(shaderName)","#define SHADER_NAME "+i+"__FRAGMENT");var R=/\s*#pragma phaserTemplate\(.*/g;a=a.replace(R,""),u=u.replace(R,"");var P=this.renderer.createProgram(a,u);return this.programs[i]=P,P}});h.exports=l},70554:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @author Matthew Groves <@doormat>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340);h.exports={getTintFromFloats:function(l,i,s,r){var o=(l*255|0)&255,a=(i*255|0)&255,u=(s*255|0)&255,f=(r*255|0)&255;return(f<<24|o<<16|a<<8|u)>>>0},getTintAppendFloatAlpha:function(l,i){var s=(i*255|0)&255;return(s<<24|l)>>>0},getTintAppendFloatAlphaAndSwap:function(l,i){var s=(l>>16|0)&255,r=(l>>8|0)&255,o=(l|0)&255,a=(i*255|0)&255;return(a<<24|o<<16|r<<8|s)>>>0},getFloatsFromUintRGB:function(l){var i=(l>>16|0)&255,s=(l>>8|0)&255,r=(l|0)&255;return[i/255,s/255,r/255]},checkShaderMax:function(l,i){var s=Math.min(16,l.getParameter(l.MAX_TEXTURE_IMAGE_UNITS));return!i||i===-1?s:Math.min(s,i)},updateLightingUniforms:function(l,i,s,r,o,a,u,f){var v=i.camera,c=v.scene,g=c.sys.lights;if(!(!g||!g.active)){var p=g.getLights(v),T=p.length,C=g.ambientColor,M=i.height;if(l){s.setUniform("uNormSampler",r),s.setUniform("uCamera",[v.x,v.y,v.rotation,v.zoom]),s.setUniform("uAmbientLightColor",[C.r,C.g,C.b]),s.setUniform("uLightCount",T);for(var A=new e,R=0;R<T;R++){var P=p[R].light,L=P.color,F="uLights["+R+"].";A.copyWithScrollFactorFrom(v.matrixCombined,v.scrollX,v.scrollY,P.scrollFactorX,P.scrollFactorY),A.transformPoint(P.x,P.y,o),s.setUniform(F+"position",[o.x,M-o.y,P.z*v.zoom]),s.setUniform(F+"color",[L.r,L.g,L.b]),s.setUniform(F+"intensity",P.intensity),s.setUniform(F+"radius",P.radius)}a&&(s.setUniform("uDiffuseFlatThreshold",f*3),s.setUniform("uPenumbra",u))}else for(s.removeUniform("uNormSampler"),s.removeUniform("uCamera"),s.removeUniform("uAmbientLightColor"),s.removeUniform("uLightCount"),s.removeUniform("uPenumbra"),s.removeUniform("uDiffuseFlatThreshold"),R=0;R<T;R++)F="uLights["+R+"].",s.removeUniform(F+"position"),s.removeUniform(F+"color"),s.removeUniform(F+"intensity"),s.removeUniform(F+"radius")}}}},74797:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Felipe Alfonso <@bitnenfer>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95428),l=t(72905),i=t(83419),s=t(8054),r=t(50792),o=t(92503),a=t(50030),u=t(37867),f=t(29747),v=t(87774),c=t(97480),g=t(69442),p=t(70554),T=t(88815),C=t(26128),M=t(37959),A=t(1482),R=t(86272),P=t(82751),L=t(13760),F=t(84387),w=t(85788),O=t(47774),B=t(53314),I=t(30130),D=t(65656),N=t(18804),z=new i({Extends:r,initialize:function(U){r.call(this);var G=U.config,b={alpha:G.transparent,desynchronized:G.desynchronized,depth:!0,antialias:G.antialiasGL,premultipliedAlpha:G.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:G.failIfMajorPerformanceCaveat,powerPreference:G.powerPreference,preserveDrawingBuffer:G.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:G.clearBeforeRender,antialias:G.antialias,backgroundColor:G.backgroundColor,contextCreation:b,roundPixels:G.roundPixels,pathDetailThreshold:G.pathDetailThreshold,maxTextures:G.maxTextures,maxTextureSize:G.maxTextureSize,batchSize:G.batchSize,maxLights:G.maxLights,mipmapFilter:G.mipmapFilter},this.game=U,this.type=s.WEBGL,this.renderNodes=null,this.cameraRenderNode=null,this.shaderProgramFactory=new N(this),this.width=0,this.height=0,this.canvas=U.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,unpremultiplyAlpha:!0},this.maxTextures=0,this.textureUnitIndices=[],this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glVAOWrappers=[],this.genericQuadIndexBuffer=null,this.baseDrawingContext=null,this.currentViewCamera=null,this.drawingContextPool=new D(this,1e3,1024),this.contextLostHandler=f,this.contextRestoredHandler=f,this.previousContextLostHandler=f,this.previousContextRestoredHandler=f,this.gl=null,this.glWrapper=null,this.glTextureUnits=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.parallelShaderCompileExtension=null,this.standardDerivativesExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.shaderSetters=null,this.mipmapFilter=null,this.isBooted=!1,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.projectionFlipY=!1,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(V){var U,G=this.game,b=this.canvas,Y=V.backgroundColor;if(G.config.context?U=G.config.context:U=b.getContext("webgl",V.contextCreation)||b.getContext("experimental-webgl",V.contextCreation),!U||U.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=U,this.setExtensions(),this.setContextHandlers(),G.context=U;for(var W=0;W<=27;W++)this.blendModes.push(O.createCombined(this));this.blendModes[1].func=[U.ONE,U.DST_ALPHA,U.ONE,U.DST_ALPHA],this.blendModes[2].func=[U.DST_COLOR,U.ONE_MINUS_SRC_ALPHA,U.DST_COLOR,U.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[U.ONE,U.ONE_MINUS_SRC_COLOR,U.ONE,U.ONE_MINUS_SRC_COLOR],this.blendModes[17].equation=[U.FUNC_REVERSE_SUBTRACT,U.FUNC_REVERSE_SUBTRACT],this.blendModes[17].func=[U.ZERO,U.ONE_MINUS_SRC_ALPHA,U.ZERO,U.ONE_MINUS_SRC_ALPHA],this.glFormats=[U.BYTE,U.SHORT,U.UNSIGNED_BYTE,U.UNSIGNED_SHORT,U.FLOAT],this.shaderSetters=new R(this),(!V.maxTextures||V.maxTextures===-1)&&(V.maxTextures=U.getParameter(U.MAX_TEXTURE_IMAGE_UNITS)),V.maxTextureSize||(V.maxTextureSize=U.getParameter(U.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.glWrapper=new M(this),this.glWrapper.update(void 0,!0),U.clearColor(Y.redGL,Y.greenGL,Y.blueGL,Y.alphaGL);var H=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];for(H.indexOf(V.mipmapFilter)!==-1&&(this.mipmapFilter=U[V.mipmapFilter]),this.maxTextures=p.checkShaderMax(U,V.maxTextures),W=0;W<this.maxTextures;W++)this.textureUnitIndices.push(W);return this.glTextureUnits=new L(this),this.projectionMatrix=new u().identity(),G.textures.once(g.READY,this.boot,this),this},boot:function(){var V=this.game,U=this.gl,G=V.scale.baseSize,b=G.width,Y=G.height;this.width=b,this.height=Y,this.isBooted=!0,this.glWrapper.updateVAO({vao:null}),this.genericQuadIndexBuffer=this.createIndexBuffer(new Uint16Array([0,1,2,3]),U.STATIC_DRAW),this.renderNodes=new I(this),this.cameraRenderNode=this.renderNodes.getNode("Camera"),this.blankTexture=V.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=V.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=V.textures.getFrame("__WHITE").glTexture,this.baseDrawingContext=new v(this,{autoClear:!0,useCanvas:!0,clearColor:[this.config.backgroundColor.redGL,this.config.backgroundColor.greenGL,this.config.backgroundColor.blueGL,this.config.backgroundColor.alphaGL]}),this.on(o.RESIZE,this.baseDrawingContext.resize,this.baseDrawingContext),V.scale.on(c.RESIZE,this.onResize,this),this.resize(b,Y)},setExtensions:function(){var V=this.gl,U=this.game,G=V.getSupportedExtensions();this.supportedExtensions=G;var b="ANGLE_instanced_arrays";if(this.instancedArraysExtension=G.indexOf(b)>-1?V.getExtension(b):null,U.config.skipUnreadyShaders){var Y="KHR_parallel_shader_compile";this.parallelShaderCompileExtension=G.indexOf(Y)>-1?V.getExtension(Y):null,this.parallelShaderCompileExtension||(U.config.skipUnreadyShaders=!1)}var W="OES_vertex_array_object";if(this.vaoExtension=G.indexOf(W)>-1?V.getExtension(W):null,U.config.smoothPixelArt){var H="OES_standard_derivatives";this.standardDerivativesExtension=G.indexOf(H)>-1?V.getExtension(H):null}if(V instanceof WebGLRenderingContext){if(this.instancedArraysExtension)V.vertexAttribDivisor=this.instancedArraysExtension.vertexAttribDivisorANGLE.bind(this.instancedArraysExtension),V.drawArraysInstanced=this.instancedArraysExtension.drawArraysInstancedANGLE.bind(this.instancedArraysExtension),V.drawElementsInstanced=this.instancedArraysExtension.drawElementsInstancedANGLE.bind(this.instancedArraysExtension);else throw new Error("ANGLE_instanced_arrays extension not supported. Required for rendering.");if(this.vaoExtension)V.createVertexArray=this.vaoExtension.createVertexArrayOES.bind(this.vaoExtension),V.bindVertexArray=this.vaoExtension.bindVertexArrayOES.bind(this.vaoExtension),V.deleteVertexArray=this.vaoExtension.deleteVertexArrayOES.bind(this.vaoExtension),V.isVertexArray=this.vaoExtension.isVertexArrayOES.bind(this.vaoExtension);else throw new Error("OES_vertex_array_object extension not supported. Required for rendering.");if(this.standardDerivativesExtension)V.FRAGMENT_SHADER_DERIVATIVE_HINT=this.standardDerivativesExtension.FRAGMENT_SHADER_DERIVATIVE_HINT_OES;else if(U.config.smoothPixelArt)throw new Error("OES_standard_derivatives extension not supported. Cannot use smoothPixelArt.")}},setContextHandlers:function(V,U){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),typeof V=="function"?this.contextLostHandler=V.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),typeof U=="function"?this.contextRestoredHandler=U.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(V){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(o.LOSE_WEBGL,this),V.preventDefault()},dispatchContextRestored:function(V){var U=this.gl;if(U.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.setExtensions(),this.glWrapper.update(B.getDefault(this),!0),this.glTextureUnits.init(),this.compression=this.getCompressedTextures();var G=function(b){b.createResource()};e(this.glTextureWrappers,G),e(this.glBufferWrappers,G),e(this.glFramebufferWrappers,G),e(this.glProgramWrappers,G),e(this.glVAOWrappers,G),this.glTextureUnits.bindUnits(this.glTextureUnits.units,!0),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(o.RESTORE_WEBGL,this),V.preventDefault()},captureFrame:function(V,U){},captureNextFrame:function(){},getFps:function(){},log:function(){},startCapture:function(V,U,G){},stopCapture:function(){},onCapture:function(V){},onResize:function(V,U){(U.width!==this.width||U.height!==this.height)&&this.resize(U.width,U.height)},resize:function(V,U){var G=this.gl;return this.width=V,this.height=U,this.setProjectionMatrix(V,U),this.drawingBufferHeight=G.drawingBufferHeight,this.glWrapper.update({scissor:{box:[0,G.drawingBufferHeight-U,V,U]},viewport:[0,0,V,U]}),this.emit(o.RESIZE,V,U),this},getCompressedTextures:function(){var V="WEBGL_compressed_texture_",U="WEBKIT_"+V,G="EXT_texture_compression_",b=function(W,H){var X=W.getExtension(V+H)||W.getExtension(U+H)||W.getExtension(G+H);if(X){var K={};for(var Z in X)K[X[Z]]=Z;return K}},Y=this.gl;return{ETC:b(Y,"etc"),ETC1:b(Y,"etc1"),ATC:b(Y,"atc"),ASTC:b(Y,"astc"),BPTC:b(Y,"bptc"),RGTC:b(Y,"rgtc"),PVRTC:b(Y,"pvrtc"),S3TC:b(Y,"s3tc"),S3TCSRGB:b(Y,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(V,U){var G=this.compression[V.toUpperCase()];if(U in G)return G[U]},supportsCompressedTexture:function(V,U){var G=this.compression[V.toUpperCase()];return G?U?U in G:!0:!1},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(V,U,G){return(V!==this.projectionWidth||U!==this.projectionHeight||G!==this.projectionFlipY)&&(this.projectionWidth=V,this.projectionHeight=U,this.projectionFlipY=!!G,G?this.projectionMatrix.ortho(0,V,0,U,-1e3,1e3):this.projectionMatrix.ortho(0,V,U,0,-1e3,1e3)),this},setProjectionMatrixFromDrawingContext:function(V){return this.setProjectionMatrix(V.width,V.height,!1)},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(V){return this.supportedExtensions?this.supportedExtensions.indexOf(V):!1},getExtension:function(V){return this.hasExtension(V)?(V in this.extensions||(this.extensions[V]=this.gl.getExtension(V)),this.extensions[V]):null},addBlendMode:function(V,U){var G=this.blendModes.push(O.createCombined(this,!0,void 0,U,V[0],V[1]))-1;return G-1},updateBlendMode:function(V,U,G){if(V>17&&this.blendModes[V]){var b=this.blendModes[V];U.length===2?b.func=[U[0],U[1],U[0],U[1]]:b.func=[U[0],U[1],U[2],U[3]],typeof G=="number"?b.equation=[G,G]:b.equation=[G[0],G[1]]}return this},removeBlendMode:function(V){return V>17&&this.blendModes[V]&&this.blendModes.splice(V,1),this},clearFramebuffer:function(V,U,G){var b=this.gl,Y=0;V&&(this.glWrapper.updateColorClearValue({colorClearValue:V}),Y=Y|b.COLOR_BUFFER_BIT),U!==void 0&&(this.glWrapper.updateStencilClear({stencil:{clear:U}}),Y=Y|b.STENCIL_BUFFER_BIT),G!==void 0&&(Y=Y|b.DEPTH_BUFFER_BIT),b.clear(Y)},createTextureFromSource:function(V,U,G,b,Y,W){Y===void 0&&(Y=!1);var H=this.gl,X=H.NEAREST,K=H.NEAREST,Z=H.CLAMP_TO_EDGE,Q=null;U=V?V.width:U,G=V?V.height:G;var j=a(U,G);if(j&&!Y&&(Z=H.REPEAT),b===s.ScaleModes.LINEAR&&this.config.antialias){var J=V&&V.compressed,tt=!J&&j||J&&V.mipmaps.length>1;X=this.mipmapFilter&&tt?this.mipmapFilter:H.LINEAR,K=H.LINEAR}return!V&&typeof U=="number"&&typeof G=="number"?Q=this.createTexture2D(0,X,K,Z,Z,H.RGBA,null,U,G,void 0,void 0,W):Q=this.createTexture2D(0,X,K,Z,Z,H.RGBA,V,void 0,void 0,void 0,void 0,W),Q},createTexture2D:function(V,U,G,b,Y,W,H,X,K,Z,Q,j){typeof X!="number"&&(X=H?H.width:1),typeof K!="number"&&(K=H?H.height:1);var J=new P(this,V,U,G,b,Y,W,H,X,K,Z,Q,j);return this.glTextureWrappers.push(J),J},createFramebuffer:function(V,U,G){!Array.isArray(V)&&V!==null&&(V=[V]);var b=new F(this,V,U,G);return this.glFramebufferWrappers.push(b),b},createProgram:function(V,U){var G=new A(this,V,U);return this.glProgramWrappers.push(G),G},createVertexBuffer:function(V,U){var G=this.gl,b=new C(this,V,G.ARRAY_BUFFER,U);return this.glBufferWrappers.push(b),b},createIndexBuffer:function(V,U){var G=this.gl,b=new C(this,V,G.ELEMENT_ARRAY_BUFFER,U);return this.glBufferWrappers.push(b),b},createVAO:function(V,U,G){var b=new w(this,V,U,G);return this.glVAOWrappers.push(b),b},deleteTexture:function(V){if(V)return l(this.glTextureWrappers,V),V.destroy(),this},deleteFramebuffer:function(V){return V?(l(this.glFramebufferWrappers,V),V.destroy(),this):this},deleteProgram:function(V){return V&&(l(this.glProgramWrappers,V),V.destroy()),this},deleteBuffer:function(V){return V?(l(this.glBufferWrappers,V),V.destroy(),this):this},preRender:function(){if(!this.contextLost){this.emit(o.PRE_RENDER_CLEAR);var V=this.baseDrawingContext;if(this.config.clearBeforeRender){var U=this.config.backgroundColor;V.setClearColor(U.redGL,U.greenGL,U.blueGL,U.alphaGL),V.setAutoClear(!0,!0,!0)}else V.setAutoClear(!1,!1,!1);V.use(),this.emit(o.PRE_RENDER)}},render:function(V,U,G){this.contextLost||(this.emit(o.RENDER,V,G),this.currentViewCamera=G,this.cameraRenderNode.run(this.baseDrawingContext,U,G),this.currentViewCamera=null)},postRender:function(){if(this.baseDrawingContext.release(),!this.contextLost){this.emit(o.POST_RENDER);var V=this.snapshotState;V.callback&&(T(this.gl,V),V.callback=null)}},drawElements:function(V,U,G,b,Y,W,H){var X=this.gl;V.beginDraw(),G.bind(),b.bind(),this.glTextureUnits.bindUnits(U),X.drawElements(H||X.TRIANGLE_STRIP,Y,X.UNSIGNED_SHORT,W)},drawInstancedArrays:function(V,U,G,b,Y,W,H,X){var K=this.gl;V.beginDraw(),G.bind(),b.bind(),this.glTextureUnits.bindUnits(U),K.drawArraysInstanced(X||K.TRIANGLE_STRIP,Y,W,H)},snapshot:function(V,U,G){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,V,U,G)},snapshotArea:function(V,U,G,b,Y,W,H){var X=this.snapshotState;return X.callback=Y,X.type=W,X.encoder=H,X.getPixel=!1,X.x=V,X.y=U,X.width=G,X.height=b,X.unpremultiplyAlpha=this.game.config.premultipliedAlpha,this},snapshotPixel:function(V,U,G){return this.snapshotArea(V,U,1,1,G),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(V,U,G,b,Y,W,H,X,K,Z,Q){Y===void 0&&(Y=!1),W===void 0&&(W=0),H===void 0&&(H=0),X===void 0&&(X=U),K===void 0&&(K=G),Z==="pixel"&&(Y=!0,Z="image/png"),this.snapshotArea(W,H,X,K,b,Z,Q);var j=this.snapshotState;return j.getPixel=Y,j.isFramebuffer=!0,j.bufferWidth=U,j.bufferHeight=G,j.width=Math.min(j.width,U),j.height=Math.min(j.height,G),this.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:V}}),T(this.gl,j),j.callback=null,j.isFramebuffer=!1,this},canvasToTexture:function(V,U,G,b){G===void 0&&(G=!1),b===void 0&&(b=!0);var Y=this.gl,W=Y.NEAREST,H=Y.NEAREST,X=V.width,K=V.height,Z=Y.CLAMP_TO_EDGE,Q=a(X,K);return!G&&Q&&(Z=Y.REPEAT),this.config.antialias&&(W=Q&&this.mipmapFilter?this.mipmapFilter:Y.LINEAR,H=Y.LINEAR),U?(U.update(V,X,K,b,Z,Z,W,H,U.format),U):this.createTexture2D(0,W,H,Z,Z,Y.RGBA,V,X,K,!0,!1,b)},createCanvasTexture:function(V,U,G){return U===void 0&&(U=!1),G===void 0&&(G=!0),this.canvasToTexture(V,null,U,G)},updateCanvasTexture:function(V,U,G,b){return G===void 0&&(G=!0),b===void 0&&(b=!1),this.canvasToTexture(V,U,b,G)},videoToTexture:function(V,U,G,b){G===void 0&&(G=!1),b===void 0&&(b=!0);var Y=this.gl,W=Y.NEAREST,H=Y.NEAREST,X=V.videoWidth,K=V.videoHeight,Z=Y.CLAMP_TO_EDGE,Q=a(X,K);return!G&&Q&&(Z=Y.REPEAT),this.config.antialias&&(W=Q&&this.mipmapFilter?this.mipmapFilter:Y.LINEAR,H=Y.LINEAR),U?(U.update(V,X,K,b,Z,Z,W,H,U.format),U):this.createTexture2D(0,W,H,Z,Z,Y.RGBA,V,X,K,!0,!0,b)},createVideoTexture:function(V,U,G){return U===void 0&&(U=!1),G===void 0&&(G=!0),this.videoToTexture(V,null,U,G)},updateVideoTexture:function(V,U,G,b){return G===void 0&&(G=!0),b===void 0&&(b=!1),this.videoToTexture(V,U,b,G)},createUint8ArrayTexture:function(V,U,G,b,Y){var W=this.gl,H=W.NEAREST,X=W.NEAREST,K=W.CLAMP_TO_EDGE,Z=a(U,G);return Z&&(K=W.REPEAT),b===void 0&&(b=!0),Y===void 0&&(Y=!0),this.createTexture2D(0,H,X,K,K,W.RGBA,V,U,G,b,!1,Y)},setTextureFilter:function(V,U){var G=this.gl,b=U===0?G.LINEAR:G.NEAREST,Y=this.glTextureUnits,W=Y.units[0];return Y.bind(V,0),V.update(V.pixels,V.width,V.height,V.flipY,V.wrapS,V.wrapT,b,b,V.format),W&&Y.bind(W,0),this},setTextureWrap:function(V,U,G){var b=this.gl;if(!a(V.width,V.height)&&(U!==b.CLAMP_TO_EDGE||G!==b.CLAMP_TO_EDGE))return this;var Y=this.glTextureUnits,W=Y.units[0];return Y.bind(V,0),V.update(V.pixels,V.width,V.height,V.flipY,U,G,V.minFilter,V.magFilter,V.format),W&&Y.bind(W,0),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.off(o.RESIZE,this.baseDrawingContext.resize,this.baseDrawingContext),this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);var V=function(U){U.destroy()};e(this.glBufferWrappers,V),e(this.glFramebufferWrappers,V),e(this.glProgramWrappers,V),e(this.glTextureWrappers,V),this.removeAllListeners(),this.extensions={},this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0}});h.exports=z},14500:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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}};h.exports=d},4159:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(14500),l=t(79291),i={Shaders:t(89350),ShaderAdditionMakers:t(83786),DrawingContext:t(87774),DrawingContextPool:t(65656),ProgramManager:t(56436),RenderNodes:t(54521),ShaderProgramFactory:t(18804),Utils:t(70554),WebGLRenderer:t(74797),Wrappers:t(31884)};i=l(!1,i,e),h.exports=i},47774:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={createCombined:function(t,e,l,i,s,r){var o=t.gl;e===void 0&&(e=!0),l===void 0&&(l=[0,0,0,0]),i===void 0&&(i=o.FUNC_ADD),s===void 0&&(s=o.ONE),r===void 0&&(r=o.ONE_MINUS_SRC_ALPHA);var a={enabled:e,color:l,equation:[i,i],func:[s,r,s,r]};return a},createSeparate:function(t,e,l,i,s,r,o,a,u){var f=t.gl;e===void 0&&(e=!0),l===void 0&&(l=[0,0,0,0]),i===void 0&&(i=f.FUNC_ADD),s===void 0&&(s=f.FUNC_ADD),r===void 0&&(r=f.ONE),o===void 0&&(o=f.ONE_MINUS_SRC_ALPHA),a===void 0&&(a=f.ONE),u===void 0&&(u=f.ONE_MINUS_SRC_ALPHA);var v={enabled:e,color:l,equation:[i,s],func:[r,o,a,u]};return v}};h.exports=d},53314:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(8054),l=t(62644),i=t(71623),s={getDefault:function(r){var o={bindings:{activeTexture:0,arrayBuffer:null,elementArrayBuffer:null,framebuffer:null,program:null,renderbuffer:null},blend:l(r.blendModes[e.BlendModes.NORMAL]),colorClearValue:[0,0,0,1],colorWritemask:[!0,!0,!0,!0],cullFace:!1,depthTest:!1,scissor:{enable:!0,box:[0,0,0,0]},stencil:i.create(r),texturing:{flipY:!1,premultiplyAlpha:!1},vao:null,viewport:[0,0,0,0]};return o}};h.exports=s},71623:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={create:function(t,e,l,i,s,r,o,a,u){var f=t.gl;e===void 0&&(e=!1),l===void 0&&(l=f.ALWAYS),i===void 0&&(i=0),s===void 0&&(s=255),r===void 0&&(r=f.KEEP),o===void 0&&(o=f.KEEP),a===void 0&&(a=f.KEEP),u===void 0&&(u=0);var v={enabled:e,func:{func:l,ref:i,mask:s},op:{fail:r,zfail:o,zpass:a},clear:u};return v}};h.exports=d},13961:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(56436),i=t(40952),s=t(6141),r=t(36909),o=new e({Extends:s,initialize:function(u,f,v){var c=u.renderer,g=c.gl;v=this._copyAndCompleteConfig(u,v||{},f);var p=v.name;if(!p)throw new Error("BatchHandler must have a name");s.call(this,p,u),this.instancesPerBatch=-1,this.verticesPerInstance=v.verticesPerInstance;var T=65536,C=Math.floor(T/this.verticesPerInstance),M=v.instancesPerBatch||c.config.batchSize||C;this.instancesPerBatch=Math.min(M,C),this.indicesPerInstance=v.indicesPerInstance,this.bytesPerIndexPerInstance=this.indicesPerInstance*Uint16Array.BYTES_PER_ELEMENT,this.maxTexturesPerBatch=1,this.manager.on(r.Events.SET_PARALLEL_TEXTURE_UNITS,this.updateTextureCount,this),c.glWrapper.updateVAO({vao:null}),this.indexBuffer=c.createIndexBuffer(this._generateElementIndices(this.instancesPerBatch),v.indexBufferDynamic?g.DYNAMIC_DRAW:g.STATIC_DRAW);var A=v.vertexBufferLayout;if(A.count=this.instancesPerBatch*this.verticesPerInstance,this.vertexBufferLayout=new i(c,A,null),this.programManager=new l(c,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(v.shaderName,v.vertexSource,v.fragmentSource),v.shaderAdditions)for(var R=0;R<v.shaderAdditions.length;R++){var P=v.shaderAdditions[R];this.programManager.addAddition(P)}if(v.shaderFeatures)for(R=0;R<v.shaderFeatures.length;R++)this.programManager.addFeature(v.shaderFeatures[R]);this.bytesPerInstance=this.vertexBufferLayout.layout.stride*this.verticesPerInstance,this.floatsPerInstance=this.bytesPerInstance/Float32Array.BYTES_PER_ELEMENT,this.currentBatchEntry={start:0,count:0,unit:0,texture:[]},this.batchEntries=[],this.instanceCount=0,this.updateTextureCount(u.maxParallelTextureUnits),this.resize(c.width,c.height),c.on(r.Events.RESIZE,this.resize,this)},_copyAndCompleteConfig:function(a,u,f){var v={};v.name=u.name||f.name,v.verticesPerInstance=u.verticesPerInstance||f.verticesPerInstance,v.indicesPerInstance=u.indicesPerInstance||f.indicesPerInstance,v.shaderName=u.shaderName||f.shaderName,v.vertexSource=u.vertexSource||f.vertexSource,v.fragmentSource=u.fragmentSource||f.fragmentSource,v.shaderAdditions=u.shaderAdditions||f.shaderAdditions,Array.isArray(v.shaderAdditions)&&(v.shaderAdditions=v.shaderAdditions.map(function(A){return Object.assign({},A)})),v.shaderFeatures=u.shaderFeatures||f.shaderFeatures,v.indexBufferDynamic=u.indexBufferDynamic||f.indexBufferDynamic,v.instancesPerBatch=u.instancesPerBatch,v.maxTexturesPerBatch=u.maxTexturesPerBatch;var c=u.vertexBufferLayout||f.vertexBufferLayout;v.vertexBufferLayout={},v.vertexBufferLayout.usage=c.usage,v.vertexBufferLayout.layout=[];for(var g=u.vertexBufferLayoutRemove||[],p=0;p<c.layout.length;p++){var T=c.layout[p];g.indexOf(T.name)===-1&&(v.vertexBufferLayout.layout[p]={name:T.name,size:T.size||1,type:T.type||"FLOAT",normalized:T.normalized||!1})}if(u.vertexBufferLayoutAdd){var C=u.vertexBufferLayoutAdd||[];for(p=0;p<C.length;p++){var M=C[p];v.vertexBufferLayout.layout.push({name:M.name,size:M.size||1,type:M.type||"FLOAT",normalized:M.normalized||!1})}}return v},_generateElementIndices:function(a){return new ArrayBuffer(a*this.bytesPerInstance)},resize:function(a,u){},updateTextureCount:function(a){},run:function(a){},batch:function(){}});h.exports=o},16971:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(4127),i=t(89924),s=t(13961),r=new e({Extends:s,initialize:function(o,a){s.call(this,o,this.defaultConfig,a),this._emptyTextures=[]},defaultConfig:{name:"BatchHandlerPointLight",verticesPerInstance:4,indicesPerInstance:6,shaderName:"POINTLIGHT",vertexSource:i,fragmentSource:l,vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius",size:1},{name:"inLightAttenuation",size:1},{name:"inLightColor",size:4}]}},_generateElementIndices:function(o){for(var a=new ArrayBuffer(o*6*2),u=new Uint16Array(a),f=0,v=0;v<o;v++){var c=v*4;u[f++]=c,u[f++]=c,u[f++]=c+1,u[f++]=c+2,u[f++]=c+3,u[f++]=c+3}return a},setupUniforms:function(o){var a=this.programManager,u=o.width,f=o.height;a.setUniform("uCameraZoom",o.camera.zoom),a.setUniform("uResolution",[u,f]),o.renderer.setProjectionMatrixFromDrawingContext(o),a.setUniform("uProjectionMatrix",o.renderer.projectionMatrix.val)},run:function(o){var a=this.instanceCount;if(a!==0){this.onRunBegin(o);var u=this.programManager,f=u.getCurrentProgramSuite();if(f){var v=f.program,c=f.vao;this.setupUniforms(o),u.applyUniforms(v),this.vertexBufferLayout.buffer.update(this.instanceCount*this.bytesPerInstance),this.manager.renderer.drawElements(o,this._emptyTextures,v,c,a*this.indicesPerInstance,0)}this.instanceCount=0,this.onRunEnd(o)}},batch:function(o,a,u,f,v,c,g,p,T,C,M,A){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,o);var R=a.color,P=a.intensity,L=a.radius,F=a.attenuation,w=R.r*P,O=R.g*P,B=R.b*P,I=a.alpha,D=this.instanceCount*this.floatsPerInstance,N=this.vertexBufferLayout.buffer,z=N.viewF32;z[D++]=v,z[D++]=c,z[D++]=M,z[D++]=A,z[D++]=L,z[D++]=F,z[D++]=w,z[D++]=O,z[D++]=B,z[D++]=I,z[D++]=u,z[D++]=f,z[D++]=M,z[D++]=A,z[D++]=L,z[D++]=F,z[D++]=w,z[D++]=O,z[D++]=B,z[D++]=I,z[D++]=T,z[D++]=C,z[D++]=M,z[D++]=A,z[D++]=L,z[D++]=F,z[D++]=w,z[D++]=O,z[D++]=B,z[D++]=I,z[D++]=g,z[D++]=p,z[D++]=M,z[D++]=A,z[D++]=L,z[D++]=F,z[D++]=w,z[D++]=O,z[D++]=B,z[D++]=I,this.instanceCount++,this.instanceCount===this.instancesPerBatch&&this.run(o)}});h.exports=r},15214:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=t(83419),i=t(62644),s=t(70554),r=t(98840),o=t(44667),a=t(81084),u=t(44349),f=t(6184),v=t(11653),c=t(40829),g=t(42792),p=t(96049),T=t(33997),C=t(79532),M=t(65217),A=t(74505),R=t(13961),P=new l({Extends:R,initialize:function(F,w){this.renderOptions={multiTexturing:!1,texRes:!1,lighting:!1,selfShadow:!1,selfShadowPenumbra:0,selfShadowThreshold:0,smoothPixelArt:!1},R.call(this,F,this.defaultConfig,w),this.programManager.setUniform("uMainSampler[0]",this.manager.renderer.textureUnitIndices),this.nextRenderOptions=i(this.renderOptions),this._renderOptionsChanged=!1,this._lightVector=new e},defaultConfig:{name:"BatchHandlerQuad",verticesPerInstance:4,indicesPerInstance:6,shaderName:"STANDARD",vertexSource:o,fragmentSource:r,shaderAdditions:[g(),p(!0),A(!0),v(1),T(),u(),f(!0),M(!0),C(!0),c(!0),a(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(L){for(var F=new ArrayBuffer(L*6*2),w=new Uint16Array(F),O=0,B=0;B<L;B++){var I=B*4;w[O++]=I,w[O++]=I,w[O++]=I+1,w[O++]=I+2,w[O++]=I+3,w[O++]=I+3}return F},updateTextureCount:function(L){var F=this.manager.renderer;L===void 0&&(L=F.maxTextures);var w=Math.max(1,Math.min(L,F.maxTextures));if(w!==this.maxTexturesPerBatch){if(w<this.currentBatchEntry.unit&&this.manager.currentBatchNode===this&&this.manager.finishBatch(),this.maxTexturesPerBatch=w,this.renderOptions.multiTexturing){var O=this.programManager,B=O.getAdditionsByTag("TEXTURE")[0];B&&O.replaceAddition(B.name,T(this.maxTexturesPerBatch))}this.resize(F.width,F.height)}},setupUniforms:function(L){var F=this.programManager,w=this.renderOptions;F.setUniform("uResolution",[L.width,L.height]),L.renderer.setProjectionMatrixFromDrawingContext(L),F.setUniform("uProjectionMatrix",L.renderer.projectionMatrix.val),this.renderOptions.lighting&&s.updateLightingUniforms(w.lighting,L,F,1,this._lightVector,w.selfShadow,w.selfShadowThreshold,w.selfShadowPenumbra)},setupTextureUniforms:function(L){var F=this.programManager;if(this.renderOptions.multiTexturing){for(var w=[],O=0;O<L.length;O++)w.push(L[O].width,L[O].height);F.setUniform("uMainResolution[0]",w)}else F.setUniform("uMainResolution[0]",[L[0].width,L[0].height])},finalizeTextureCount:function(L){var F=this.programManager;this.renderOptions.lighting&&(L=1);var w=F.getAdditionsByTag("TEXTURE")[0];w&&F.replaceAddition(w.name,T(L));var O=F.getAdditionsByTag("TexCount")[0];O&&F.replaceAddition(O.name,v(L))},updateRenderOptions:function(L){var F=this.nextRenderOptions,w=this.renderOptions,O=!1,B=!!L.multiTexturing&&!L.lighting;B!==w.multiTexturing&&(F.multiTexturing=B,O=!0);var I=!!L.lighting;I!==w.lighting&&(F.lighting=I,O=!0);var D=I&&L.lighting.selfShadow&&L.lighting.selfShadow.enabled;D!==w.selfShadow&&(F.selfShadow=D,O=!0);var N=D?L.lighting.selfShadow.penumbra:0;N!==w.selfShadowPenumbra&&(F.selfShadowPenumbra=N,O=!0);var z=D?L.lighting.selfShadow.diffuseFlatThreshold:0;z!==w.selfShadowThreshold&&(F.selfShadowThreshold=z,O=!0);var V=!!L.smoothPixelArt;V!==w.smoothPixelArt&&(F.smoothPixelArt=V,F.texRes=V,O=!0),this._renderOptionsChanged=O},updateShaderConfig:function(){var L=this.programManager,F=this.renderOptions,w=this.nextRenderOptions,O;if(F.multiTexturing!==w.multiTexturing){var B=w.multiTexturing;F.multiTexturing=B;var I=L.getAdditionsByTag("TexCount")[0];I&&L.replaceAddition(I.name,v(B?this.maxTexturesPerBatch:1));var D=L.getAdditionsByTag("TEXTURE")[0];D&&L.replaceAddition(D.name,T(B?this.maxTexturesPerBatch:1))}if(F.lighting!==w.lighting){var N=w.lighting;F.lighting=N;var z=L.getAdditionsByTag("LIGHTING");for(O=0;O<z.length;O++){var V=z[O];V.disable=!N}if(N){var U=L.getAddition("DefineLights");U&&(U.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}}if(F.selfShadow!==w.selfShadow){var G=w.selfShadow;F.selfShadow=G,G?L.addFeature("SELFSHADOW"):L.removeFeature("SELFSHADOW")}if(F.selfShadowPenumbra=w.selfShadowPenumbra,F.selfShadowThreshold=w.selfShadowThreshold,F.smoothPixelArt!==w.smoothPixelArt){var b=w.smoothPixelArt;F.smoothPixelArt=b;var Y=L.getAddition("SmoothPixelArt");Y&&(Y.disable=!b)}if(F.texRes!==w.texRes){var W=w.texRes;F.texRes=W;var H=L.getAddition("GetTexRes");H&&(H.disable=!W)}},run:function(L){if(this.instanceCount!==0){this.onRunBegin(L),this.pushCurrentBatchEntry();var F=this.programManager,w=this.bytesPerIndexPerInstance,O=this.indicesPerInstance,B=this.manager.renderer,I=this.vertexBufferLayout.buffer;I.update(this.instanceCount*this.bytesPerInstance);for(var D=this.batchEntries.length,N=0;N<D;N++){var z=this.batchEntries[N];this.finalizeTextureCount(z.unit);var V=F.getCurrentProgramSuite();if(V){var U=V.program,G=V.vao;this.setupUniforms(L),F.applyUniforms(U),this.renderOptions.texRes&&(this.setupTextureUniforms(z.texture),F.applyUniforms(U)),B.drawElements(L,z.texture,U,G,z.count*O,z.start*w)}}this.instanceCount=0,this.currentBatchEntry.start=0,this.batchEntries.length=0,this.onRunEnd(L)}},batch:function(L,F,w,O,B,I,D,N,z,V,U,G,b,Y,W,H,X,K,Z,Q){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,L),this.updateRenderOptions(Q),this._renderOptionsChanged&&(this.run(L),this.updateShaderConfig());var j=this.batchTextures(F,Q),J=this.instanceCount*this.floatsPerInstance,tt=this.vertexBufferLayout.buffer,k=tt.viewF32,q=tt.viewU32;k[J++]=B,k[J++]=I,k[J++]=U,k[J++]=G+Y,k[J++]=j,k[J++]=W,q[J++]=X,k[J++]=w,k[J++]=O,k[J++]=U,k[J++]=G,k[J++]=j,k[J++]=W,q[J++]=H,k[J++]=z,k[J++]=V,k[J++]=U+b,k[J++]=G+Y,k[J++]=j,k[J++]=W,q[J++]=Z,k[J++]=D,k[J++]=N,k[J++]=U+b,k[J++]=G,k[J++]=j,k[J++]=W,q[J++]=K,this.instanceCount++,this.currentBatchEntry.count++,this.instanceCount===this.instancesPerBatch&&this.run(L)},batchTextures:function(L,F){var w=this.renderOptions,O=0,B=this.currentBatchEntry;if(w.multiTexturing)O=L.batchUnit,O===-1&&(B.texture.length===this.maxTexturesPerBatch&&(this.pushCurrentBatchEntry(),B=this.currentBatchEntry),O=B.unit,L.batchUnit=O,B.texture[O]=L,B.unit++);else if(w.lighting){O=F.lighting.normalMapRotation;var I=F.lighting.normalGLTexture;(B.texture[0]!==L||B.texture[1]!==I)&&(this.pushCurrentBatchEntry(),B=this.currentBatchEntry,L.batchUnit=0,I.batchUnit=1,B.texture[0]=L,B.texture[1]=I,B.unit=2)}else B.texture[0]!==L&&(this.pushCurrentBatchEntry(),B=this.currentBatchEntry,L.batchUnit=0,B.texture[0]=L,B.unit=1);return O},pushCurrentBatchEntry:function(){if(!(this.currentBatchEntry.count<1)){this.batchEntries.push(this.currentBatchEntry);for(var L=this.currentBatchEntry.texture,F=0;F<L.length;F++)L[F].batchUnit=-1;this.currentBatchEntry={start:this.instanceCount,count:0,unit:0,texture:[]}}}});h.exports=P},72266:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(15214),i=new e({Extends:l,initialize:function(r,o){o===void 0&&(o={}),o.name||(o.name="BatchHandlerQuadSingle"),o.shaderName||(o.shaderName="STANDARD_SINGLE"),o.instancesPerBatch||(o.instancesPerBatch=1),l.call(this,r,o)}});h.exports=i},62791:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(98840),i=t(44667),s=t(44349),r=t(11653),o=t(42792),a=t(96049),u=t(74505),f=t(33997),v=t(70554),c=t(15214),g=v.getTintAppendFloatAlpha,p=new e({Extends:c,initialize:function(C,M){c.call(this,C,M),this.renderOptions.multiTexturing=!0},defaultConfig:{name:"BatchHandlerStrip",verticesPerInstance:2,indicesPerInstance:2,shaderName:"STRIP",vertexSource:i,fragmentSource:l,shaderAdditions:[o(),a(!0),u(!0),r(1),f(),s()],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(T){for(var C=new ArrayBuffer(T*2*2),M=new Uint16Array(C),A=M.length,R=0;R<A;R++)M[R]=R;return C},batchStrip:function(T,C,M,A,R,P,L,F,w,O,B,I){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,T);var D=R.length/(2*this.verticesPerInstance);if(D>this.instancesPerBatch)throw new Error("BatchHandlerStrip: Vertex count exceeds maximum per batch ("+this.maxVerticesPerBatch+")");this.instanceCount+D>this.instancesPerBatch&&this.run(T),this.updateRenderOptions(B),this._renderOptionsChanged&&(this.run(T),this.updateShaderConfig());var N=this.batchTextures(A),z=this.instanceCount*this.floatsPerInstance,V=this.vertexBufferLayout.buffer,U=V.viewF32,G=V.viewU32,b=!1;if(this.instanceCount>0){var Y=1+this.floatsPerInstance/this.verticesPerInstance;U[z++]=U[z-Y],U[z++]=U[z-Y],U[z++]=U[z-Y],U[z++]=U[z-Y],U[z++]=U[z-Y],U[z++]=U[z-Y],G[z++]=G[z-Y],b=!0}var W;I&&(W=[]);for(var H=M.a,X=M.b,K=M.c,Z=M.d,Q=M.e,j=M.f,J=R.length,tt=0;tt<J;tt+=2){var k=R[tt],q=R[tt+1],_=k*H+q*K+Q,rt=k*X+q*Z+j;U[z++]=_,U[z++]=rt,U[z++]=P[tt],U[z++]=P[tt+1],U[z++]=N,U[z++]=O,G[z++]=g(L[tt/2],F[tt/2]*w),b?(tt-=2,this.instanceCount++,this.currentBatchEntry.count++,b=!1):W&&W.push(_,rt),tt%4===2&&(this.instanceCount++,this.currentBatchEntry.count++)}I&&I.call(C,C,J,W)}});h.exports=p},21832:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(98840),i=t(44667),s=t(81084),r=t(44349),o=t(6184),a=t(11653),u=t(40829),f=t(42792),v=t(96049),c=t(33997),g=t(10455),p=t(79532),T=t(65217),C=t(74505),M=t(44832),A=t(23295),R=t(15214),P=new e({Extends:R,initialize:function(F,w){R.call(this,F,w)},defaultConfig:{name:"BatchHandlerTileSprite",verticesPerInstance:4,indicesPerInstance:6,shaderName:"TILESPRITE",vertexSource:i,fragmentSource:l,shaderAdditions:[g(),f(),v(!0),A(!0),M(!0),C(!0),a(1),c(),r(),o(!0),T(!0),p(!0),u(!0),s(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inFrame",size:4},{name:"inTexDatum"},{name:"inTintEffect"},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},updateRenderOptions:function(L){R.prototype.updateRenderOptions.call(this,L);var F=this.renderOptions,w=this.nextRenderOptions,O=this._renderOptionsChanged;w.clampFrame=!!L.clampFrame,w.clampFrame!==F.clampFrame&&(O=!0),w.wrapFrame=!!L.wrapFrame,w.wrapFrame!==F.wrapFrame&&(O=!0),w.texRes=w.clampFrame||w.texRes,w.texRes!==F.texRes&&(O=!0),O&&(this._renderOptionsChanged=!0)},updateShaderConfig:function(){R.prototype.updateShaderConfig.call(this);var L=this.programManager,F=this.renderOptions,w=this.nextRenderOptions;if(w.clampFrame!==F.clampFrame){var O=w.clampFrame;F.clampFrame=O;var B=L.getAddition("TexCoordFrameClamp");B.disable=!w.clampFrame}if(w.wrapFrame!==F.wrapFrame){var I=w.wrapFrame;F.wrapFrame=I;var D=L.getAddition("TexCoordFrameWrap");D.disable=!I}},batch:function(L,F,w,O,B,I,D,N,z,V,U,G,b,Y,W,H,X,K,Z,Q,j,J,tt,k,q,_,rt,at){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,L),this.updateRenderOptions(Q),this._renderOptionsChanged&&(this.run(L),this.updateShaderConfig());var ht=this.batchTextures(F,Q),ot=this.instanceCount*this.floatsPerInstance,nt=this.vertexBufferLayout.buffer,it=nt.viewF32,lt=nt.viewU32;it[ot++]=B,it[ot++]=I,it[ot++]=tt,it[ot++]=k,it[ot++]=U,it[ot++]=G,it[ot++]=b,it[ot++]=Y,it[ot++]=ht,it[ot++]=W,lt[ot++]=X,it[ot++]=w,it[ot++]=O,it[ot++]=j,it[ot++]=J,it[ot++]=U,it[ot++]=G,it[ot++]=b,it[ot++]=Y,it[ot++]=ht,it[ot++]=W,lt[ot++]=H,it[ot++]=z,it[ot++]=V,it[ot++]=rt,it[ot++]=at,it[ot++]=U,it[ot++]=G,it[ot++]=b,it[ot++]=Y,it[ot++]=ht,it[ot++]=W,lt[ot++]=Z,it[ot++]=D,it[ot++]=N,it[ot++]=q,it[ot++]=_,it[ot++]=U,it[ot++]=G,it[ot++]=b,it[ot++]=Y,it[ot++]=ht,it[ot++]=W,lt[ot++]=K,this.instanceCount++,this.currentBatchEntry.count++,this.instanceCount===this.instancesPerBatch&&this.run(L)}});h.exports=P},62087:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=t(83419),i=t(81084),s=t(6184),r=t(13198),o=t(73416),a=t(91627),u=t(70554),f=t(13961),v=new l({Extends:f,initialize:function(g,p){f.call(this,g,this.defaultConfig,p),this._emptyTextures=[],this.vertexCount=0,this._lightVector=new e,this.renderOptions={lighting:!1},this.nextRenderOptions={lighting:!1},this._renderOptionsChanged=!1},defaultConfig:{name:"BatchHandlerTriFlat",verticesPerInstance:3,indicesPerInstance:3,shaderName:"FLAT",vertexSource:a,fragmentSource:o,shaderAdditions:[s(!0),r(!0),i(!0)],indexBufferDynamic:!0,vertexBufferLayout:{usage:"DYNAMIC_DRAW",layout:[{name:"inPosition",size:2},{name:"inTint",size:4,type:"UNSIGNED_BYTE",normalized:!0}]}},_generateElementIndices:function(c){return new ArrayBuffer(c*3*2)},setupUniforms:function(c){var g=this.programManager;c.renderer.setProjectionMatrixFromDrawingContext(c),g.setUniform("uProjectionMatrix",c.renderer.projectionMatrix.val),this.renderOptions.lighting&&(u.updateLightingUniforms(this.renderOptions.lighting,c,g,1,this._lightVector),g.setUniform("uResolution",[c.width,c.height]))},updateRenderOptions:function(c){var g=this.nextRenderOptions,p=this.renderOptions,T=!1;c!==p.lighting&&(g.lighting=c,T=!0),this._renderOptionsChanged=T},updateShaderConfig:function(){var c=this.programManager,g=this.renderOptions,p=this.nextRenderOptions;if(g.lighting!==p.lighting){var T=p.lighting;g.lighting=T;for(var C=c.getAdditionsByTag("LIGHTING"),M=0;M<C.length;M++){var A=C[M];A.disable=!T}if(T){var R=c.getAddition("DefineLights");R&&(R.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}}},run:function(c){if(this.instanceCount!==0){this.onRunBegin(c);var g=this.programManager,p=g.getCurrentProgramSuite();if(p){var T=p.program,C=p.vao;this.setupUniforms(c),g.applyUniforms(T);var M=this.indicesPerInstance,A=this.instanceCount,R=this.manager.renderer,P=this.vertexBufferLayout.buffer,L=this.vertexBufferLayout.layout.stride;P.update(this.vertexCount*L),C.bind(),C.indexBuffer.update(A*M*2),R.drawElements(c,this._emptyTextures,T,C,A*M,0,R.gl.TRIANGLES)}this.instanceCount=0,this.vertexCount=0,this.onRunEnd(c)}},batch:function(c,g,p,T,C){this.instanceCount===0&&this.manager.setCurrentBatchNode(this,c),this.updateRenderOptions(C),this._renderOptionsChanged&&(this.run(c),this.updateShaderConfig());for(var M=0,A=0,R=this.instancesPerBatch,P=this.vertexBufferLayout.layout.stride,L=this.verticesPerInstance,F=this.indexBuffer,w=F.viewU16,O=this.instanceCount*this.indicesPerInstance,B=this.vertexBufferLayout.buffer,I=B.viewF32,D=B.viewU32,N=this.vertexCount*P/I.BYTES_PER_ELEMENT,z=[],V=0,U=[],G=0,b=0;b<g.length;b++){var Y=g[b],W=Y*2;z[b]!==M&&(I[N++]=p[W],I[N++]=p[W+1],D[N++]=T[Y],z[V++]=M,U[G++]=this.vertexCount,this.vertexCount++);var H=U[G-1];w[O++]=H,A++,A===L&&(this.instanceCount++,A=0),(this.instanceCount===R||A===0&&O+L>=w.length)&&(M++,this.run(c),O=this.instanceCount*this.indicesPerInstance,N=this.vertexCount*P/I.BYTES_PER_ELEMENT,V=0,G=0)}}});h.exports=v},61842:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19715),l=t(1e3),i=t(61340),s=t(87841),r=t(43855),o=t(83419),a=t(70554),u=t(6141);function f(c){return a.getTintAppendFloatAlpha(16777215,c)}var v=new o({Extends:u,initialize:function(g){u.call(this,"Camera",g),this.batchHandlerQuadSingleNode=g.getNode("BatchHandlerQuadSingle"),this.fillCameraNode=g.getNode("FillCamera"),this.listCompositorNode=g.getNode("ListCompositor"),this._parentTransformMatrix=new i},run:function(c,g,p,T,C,M){this.onRunBegin(c);var A,R=c.renderer.drawingContextPool,P=this.manager,L=p.alpha,F=p.filters.internal.getActive(),w=p.filters.external.getActive(),O=C||p.forceComposite||F.length||w.length||L<1;T?p.matrixExternal.multiply(T,T):T=this._parentTransformMatrix.copyFrom(p.matrixExternal);var B=T.decomposeMatrix(),I=r(B.translateX,0)&&r(B.translateY,0)&&r(B.rotation,0)&&r(B.scaleX,1)&&r(B.scaleY,1),D=p.x,N=p.y,z=p.width,V=p.height,U=c.getClone();U.setCamera(p),O?(A=R.get(z,V),A.setCamera(p),A.setScissorBox(0,0,z,V)):(A=U,A.setScissorBox(D,N,z,V)),A.use();var G=this.fillCameraNode;if(p.backgroundColor.alphaGL>0){var b=p.backgroundColor,Y=l(b.red,b.green,b.blue,b.alpha);G.run(A,Y,O)}this.listCompositorNode.run(A,g,null,M);var W=p.flashEffect;W.postRenderWebGL()&&(Y=l(W.red,W.green,W.blue,W.alpha*255),G.run(A,Y,O));var H=p.fadeEffect;if(H.postRenderWebGL()&&(Y=l(H.red,H.green,H.blue,H.alpha*255),G.run(A,Y,O)),P.finishBatch(),O){var X,K,Z,Q,j,J={smoothPixelArt:P.renderer.game.config.smoothPixelArt},tt=new s(0,0,A.width,A.height);for(X=0;X<F.length;X++)K=F[X],Q=P.getNode(K.renderNode),A=Q.run(K,A),Z=K.getPadding(),tt.setTo(tt.x+Z.x,tt.y+Z.y,tt.width+Z.width,tt.height+Z.height);var k=A,q=w.length>0,_=!q,rt=new s(0,0,U.width,U.height);if(q){for(X=w.length-1;X>=0;X--)K=w[X],K.active&&(Z=K.getPadding(),rt.setTo(rt.x+Z.x,rt.y+Z.y,rt.width+Z.width,rt.height+Z.height));_=rt.width!==A.width||rt.height!==A.height||!I,_&&(A=R.get(rt.width,rt.height),A.setScissorBox(0,0,rt.width,rt.height),A.setCamera(U.camera),A.use())}else A=U;if(_){var at=rt.x,ht=rt.y,ot;T.setQuad(tt.x,tt.y,tt.x+tt.width,tt.y+tt.height),ot=T.quad,j=q?4294967295:f(L),this.batchHandlerQuadSingleNode.batch(A,k.texture,ot[0]-at,ot[1]-ht,ot[2]-at,ot[3]-ht,ot[6]-at,ot[7]-ht,ot[4]-at,ot[5]-ht,0,1,1,-1,!1,j,j,j,j,J)}if(k!==A&&k.release(),q){var nt=!1;for(k=null,Z=new s,X=0;X<w.length;X++)K=w[X],K.allowBaseDraw&&A.width===U.width&&A.height===U.height&&X===w.length-1&&L===1&&(nt=!0,k=U),Q=P.getNode(K.renderNode),A=Q.run(K,A,k,Z),Z=K.currentPadding,Z.x=-Z.x,Z.y=-Z.y,Z.width=-Z.width,Z.height=-Z.height;if(!nt){j=f(L);var it=-Z.x,lt=-Z.y,dt=A.width+Z.right,ct=A.height+Z.bottom;this.batchHandlerQuadSingleNode.batch(U,A.texture,it,ct,it,lt,dt,ct,dt,lt,0,0,1,1,!1,j,j,j,j,J),A.release()}}}p.dirty=!1,p.emit(e.POST_RENDER,p),this.onRunEnd(c)}});h.exports=v},76409:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(6141),i=new e({Extends:l,initialize:function(r){l.call(this,"DrawLine",r)},run:function(s,r,o,a,u,f,v,c,g){this.onRunBegin(s);var p=u-o,T=f-a,C=Math.sqrt(p*p+T*T),M=v*(f-a)/C,A=v*(o-u)/C,R=c*(f-a)/C,P=c*(o-u)/C,L=u-R,F=f-P,w=o-M,O=a-A,B=u+R,I=f+P,D=o+M,N=a+A,z=g.length;r?(g[z+0]=r.getX(D,N),g[z+1]=r.getY(D,N),g[z+2]=r.getX(w,O),g[z+3]=r.getY(w,O),g[z+4]=r.getX(L,F),g[z+5]=r.getY(L,F),g[z+6]=r.getX(B,I),g[z+7]=r.getY(B,I)):(g[z+0]=D,g[z+1]=N,g[z+2]=w,g[z+3]=O,g[z+4]=L,g[z+5]=F,g[z+6]=B,g[z+7]=I),this.onRunEnd(s)}});h.exports=i},95449:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19715),l=t(42538),i=t(83419),s=t(10312),r=t(6141),o=new i({Extends:r,initialize:function(u){r.call(this,"DynamicTextureHandler",u),this.fillRectNode=this.manager.getNode("FillRect")},run:function(a){var u=a.drawingContext,f=u.camera,v=u.renderer,c=a.manager;this.onRunBegin(u);var g=u.framebuffer.renderTexture;if(g)for(var p=v.glTextureUnits,T=p.units,C=0;C<T.length;C++)T[C]===g&&p.bind(null,C);u.setScissorBox(0,0,f.width,f.height),u.use();for(var M,A,R,P,L,F,w,O,B,I,D,N,z,V,U=a.commandBuffer,G=U.length,b=!1,Y=null,W=!1,H=u,X=v.gl,K=0;K<G;K++){var Z=U[K];switch(Z){case l.CLEAR:{z=U[++K],V=U[++K],N=U[++K],P=U[++K];var Q=H.getClone();Q.setScissorEnable(!0),Q.setScissorBox(z,V,N,P),Q.use(),Q.clear(X.COLOR_BUFFER_BIT|X.DEPTH_BUFFER_BIT|X.STENCIL_BUFFER_BIT),Q.release();break}case l.FILL:{var j=U[++K];z=U[++K],V=U[++K],N=U[++K],P=U[++K],this.fillRectNode.run(H,null,null,z,V,N,P,j,j,j,j,!1);break}case l.STAMP:{L=U[++K],R=U[++K],z=U[++K],V=U[++K],M=U[++K],D=U[++K],O=U[++K],B=U[++K],I=U[++K],F=U[++K],w=U[++K],A=U[++K];var J=c.resetStamp(M,D);J.setPosition(z,V).setRotation(O).setTexture(L,R).setOrigin(F,w).setScale(B,I).setBlendMode(A),H=this._draw(v,J,H,u,Y);break}case l.REPEAT:{L=U[++K],R=U[++K],z=U[++K],V=U[++K],M=U[++K],D=U[++K],O=U[++K],B=U[++K],I=U[++K],F=U[++K],w=U[++K],A=U[++K],N=U[++K],P=U[++K];var tt=U[++K],k=U[++K],q=U[++K],_=U[++K],rt=U[++K],at=c.resetTileSprite(M,D);at.setPosition(z,V).setRotation(O).setTexture(L,R).setSize(N,P).setOrigin(F,w).setScale(B,I).setBlendMode(A).setTilePosition(tt,k).setTileRotation(q).setTileScale(_,rt),H=this._draw(v,at,H,u,Y);break}case l.DRAW:{var ht=U[++K];if(z=U[++K],V=U[++K],z!==void 0){var ot=ht.x;ht.x+=z}if(V!==void 0){var nt=ht.y;ht.y+=V}H=this._draw(v,ht,H,u,Y),z!==void 0&&(ht.x=ot),V!==void 0&&(ht.y=nt);break}case l.SET_ERASE:{b=U[++K],b?(Y||(Y=u.getClone(),Y.setBlendMode(s.ERASE)),H!==Y&&(H.release(),H=Y,Y.use())):H===Y&&(Y.release(),H=u,u.use());break}case l.PRESERVE:{W=U[++K];break}case l.CALLBACK:{var it=U[++K];it();break}case l.CAPTURE:{ht=U[++K];var lt=U[++K],dt=a.startCapture(ht,lt),ct=H;lt.camera&&(ct=ct.getClone(),ct.setCamera(lt.camera),ct.use()),this._draw(v,ht,ct,u,Y,dt.transform),a.finishCapture(ht,dt),lt.camera&&ct.release();break}}}W||(U.length=0),H.release(),f.emit(e.POST_RENDER,f),this.onRunEnd(u)},_draw:function(a,u,f,v,c,g){if(f!==c&&u.blendMode!==f.blendMode&&u.blendMode!==s.SKIP_CHECK){f.release();var p=u.blendMode;p===v.blendMode?f=v:(f=v.getClone(),f.setBlendMode(p)),f.use()}return u.renderWebGLStep(a,u,f,g),f}});h.exports=o},61199:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(6141),i=new e({Extends:l,initialize:function(r){l.call(this,"FillCamera",r),this.fillRectNode=this.manager.getNode("FillRect")},run:function(s,r,o){this.onRunBegin(s);var a=s.camera,u=o?0:a.x,f=o?0:a.y,v=a.width,c=a.height;this.fillRectNode.run(s,null,null,u,f,v,c,r,r,r,r),this.onRunEnd(s)}});h.exports=i},14255:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(94811),l=t(83419),i=t(6141),s=new l({Extends:i,initialize:function(o){i.call(this,"FillPath",o)},run:function(r,o,a,u,f,v,c,g,p){this.onRunBegin(r),g===void 0&&(g=0);var T=u.length,C,M,A,R,P,L,F=0,w=0,O=[],B=[],I=0;for(M=0;M<T;M++)A=u[M],P=o.getX(A.x,A.y),L=o.getY(A.x,A.y),!(M>0&&M<T-1&&Math.abs(P-O[F-2])<=g&&Math.abs(L-O[F-1])<=g)&&(O[F++]=P,O[F++]=L);if(R=e(O),f===v&&f===c){var D=O.length;for(C=0;C<D;C+=2)B[I++]=f;a.batch(r,R,O,B,p)}else{var N=R.length,z=Array(N),V=Array(N*2),U=0;for(C=0;C<N;C+=3){var G=R[C]*2;P=O[G+0],L=O[G+1],V[U++]=P,V[U++]=L,G=R[C+1]*2,P=O[G+0],L=O[G+1],V[U++]=P,V[U++]=L,G=R[C+2]*2,P=O[G+0],L=O[G+1],V[U++]=P,V[U++]=L,B[I++]=f,B[I++]=v,B[I++]=c,z[w++]=C+0,z[w++]=C+1,z[w++]=C+2}a.batch(r,z,V,B,p)}this.onRunEnd(r)}});h.exports=s},12682:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=t(83419),i=t(6141),s=new l({Extends:i,initialize:function(o){i.call(this,"FillRect",o),this._batchHandlerDefault=o.getNode("BatchHandlerTriFlat"),this._identityMatrix=new e,this._indexedTriangles=[0,1,2,2,3,0]},run:function(r,o,a,u,f,v,c,g,p,T,C,M){this.onRunBegin(r),o||(o=this._identityMatrix),a||(a=this._batchHandlerDefault);var A=o.setQuad(u,f,u+v,f+c);a.batch(r,this._indexedTriangles,A,[g,T,C,p],M),this.onRunEnd(r)}});h.exports=s},13119:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(6141),i=new e({Extends:l,initialize:function(r){l.call(this,"FillTri",r),this._indexedTriangles=[0,1,2]},run:function(s,r,o,a,u,f,v,c,g,p,T,C,M){this.onRunBegin(s),r?o.batch(s,this._indexedTriangles,[r.getX(a,u),r.getY(a,u),r.getX(f,v),r.getY(f,v),r.getX(c,g),r.getY(c,g)],[p,T,C],M):o.batch(s,this._indexedTriangles,[a,u,f,v,c,g],[p,T,C],M),this.onRunEnd(s)}});h.exports=i},27996:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(8054),i=t(6141),s=new e({Extends:i,initialize:function(o){i.call(this,"ListCompositor",o)},run:function(r,o,a,u){this.onRunBegin(r);for(var f=r,v=r.blendMode,c=v,g=this.manager.renderer,p=0;p<o.length;p++){var T=o[p];T.blendMode!==c&&T.blendMode!==l.BlendModes.SKIP_CHECK&&(f!==r&&f.release(),c=T.blendMode,c===v?f=r:(f=r.getClone(),f.setBlendMode(c),f.use())),T.renderWebGLStep(g,T,f,a,u,o,p)}f!==r&&f.release(),this.onRunEnd(r)}});h.exports=s},56432:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(46975),i=t(6141),s=new e({Extends:i,initialize:function(o){i.call(this,"RebindContext",o),this._state={bindings:{activeTexture:0,arrayBuffer:null,elementArrayBuffer:null,framebuffer:null,program:null,renderbuffer:null},vao:null}},run:function(r){this.onRunBegin(r);var o=this.manager.renderer,a=o.glWrapper;o.clearFramebuffer(void 0,void 0,0),a.update(l(this._state,a.state),!0),o.glTextureUnits.unbindAllUnits(),this.onRunEnd(r)}});h.exports=s},6141:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r){this.name=s,this.manager=r,this._run=null},run:function(){},onRunBegin:function(i){},onRunEnd:function(i){},setDebug:function(i){i?(this._run=this.run,this.run=function(){var s=this.manager;s.pushDebug(this.name);var r=this._run.apply(this,arguments);return s.popDebug(),r}):(this.run=this._run,this._run=null)}});h.exports=l},30130:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(50792),l=t(83419),i=t(92503),s=t(47406),r=t(53663),o=t(16971),a=t(15214),u=t(72266),f=t(62791),v=t(21832),c=t(62087),g=t(61842),p=t(76409),T=t(95449),C=t(61199),M=t(14255),A=t(12682),R=t(13119),P=t(22731),L=t(57032),F=t(52903),w=t(13922),O=t(33466),B=t(75798),I=t(90830),D=t(52302),N=t(34989),z=t(15600),V=t(99786),U=t(26703),G=t(55905),b=t(58167),Y=t(13279),W=t(27459),H=t(88856),X=t(27996),K=t(56432),Z=t(17486),Q=t(31029),j=t(94494),J=t(87469),tt=t(89723),k=t(12913),q=t(22995),_=t(86081),rt=t(88383),at=t(34454),ht=t(46211),ot=t(95433),nt=new l({Extends:e,initialize:function(lt){e.call(this),this.renderer=lt;var dt=lt.game;this.maxParallelTextureUnits=dt.config.autoMobileTextures&&!dt.device.os.desktop?1:lt.maxTextures,this._nodes={},this._nodeConstructors={BaseFilter:s,BaseFilterShader:r,BatchHandlerPointLight:o,BatchHandlerQuad:a,BatchHandlerQuadSingle:u,BatchHandlerStrip:f,BatchHandlerTileSprite:v,BatchHandlerTriFlat:c,Camera:g,DrawLine:p,DynamicTextureHandler:T,FillCamera:C,FillPath:M,FillRect:A,FillTri:R,FilterBarrel:P,FilterBlend:L,FilterBlocky:F,FilterBlur:w,FilterBlurHigh:O,FilterBlurLow:B,FilterBlurMed:I,FilterBokeh:D,FilterColorMatrix:N,FilterDisplacement:z,FilterGlow:V,FilterMask:U,FilterParallelFilters:G,FilterPixelate:b,FilterSampler:Y,FilterShadow:W,FilterThreshold:H,ListCompositor:X,RebindContext:K,StrokePath:Z,SubmitterQuad:Q,SubmitterTile:j,SubmitterTilemapGPULayer:J,SubmitterTileSprite:tt,TexturerImage:k,TexturerTileSprite:q,TransformerImage:_,TransformerStamp:rt,TransformerTile:at,TransformerTileSprite:ht,YieldContext:ot},Object.entries(dt.config.renderNodes).forEach(function(ct){var Bt=ct[0],Lt=ct[1];this.addNodeConstructor(Bt,Lt)},this),this.currentBatchNode=null,this.currentBatchDrawingContext=null,this.debug=!1,this.debugGraph=null,this.currentDebugNode=null},addNode:function(it,lt){if(this._nodes[it])throw new Error("node "+it+" already exists.");this._nodes[it]=lt,this.debug&<.setDebug(!0)},addNodeConstructor:function(it,lt){if(this._nodeConstructors[it])throw new Error("node constructor "+it+" already exists.");this._nodeConstructors[it]=lt},getNode:function(it){if(this._nodes[it])return this._nodes[it];if(this._nodeConstructors[it]){var lt=new this._nodeConstructors[it](this);return this.addNode(it,lt),lt}return null},hasNode:function(it,lt){return!!this._nodes[it]||!lt&&!!this._nodeConstructors[it]},setCurrentBatchNode:function(it,lt){this.currentBatchNode!==it&&(this.currentBatchNode!==null&&this.currentBatchNode.run(this.currentBatchDrawingContext),this.currentBatchNode=it,this.currentBatchDrawingContext=it?lt:null)},setMaxParallelTextureUnits:function(it){this.maxParallelTextureUnits=Math.max(1,Math.min(it,this.renderer.maxTextures)),this.emit(i.SET_PARALLEL_TEXTURE_UNITS,this.maxParallelTextureUnits)},finishBatch:function(){this.currentBatchNode!==null&&this.setCurrentBatchNode(null)},startStandAloneRender:function(){this.finishBatch()},setDebug:function(it){this.debug=it;for(var lt in this._nodes)this._nodes[lt].setDebug(it);it&&(this.debugGraph=null,this.currentDebugNode=null,this.pushDebug("[Render Tree Root]"),this.renderer.once(i.POST_RENDER,function(){this.setDebug(!1)},this))},pushDebug:function(it){if(this.debug){var lt={name:it,children:[],parent:this.currentDebugNode};this.debugGraph?this.currentDebugNode.children.push(lt):this.debugGraph=lt,this.currentDebugNode=lt}},popDebug:function(){this.debug&&(this.currentDebugNode.parent?this.currentDebugNode=this.currentDebugNode.parent:this.currentDebugNode=null)},debugToString:function(){var it="",lt=0,dt=this.debugGraph;function ct(Lt){return" ".repeat(Lt)}function Bt(Lt,zt){for(var Kt=ct(zt)+Lt.name+`
|
||
`,fe=0;fe<Lt.children.length;fe++)Kt+=Bt(Lt.children[fe],zt+1);return Kt}return it=Bt(dt,lt),it}});h.exports=nt},55403:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(40952),i=t(56436),s=t(6141),r=t(65884),o=t(72823),a=new e({Extends:s,initialize:function(f,v){s.call(this,"ShaderQuad",f);var c=f.renderer;this.renderer=c,v=this._completeConfig(v),v.updateShaderConfig&&(this.updateShaderConfig=v.updateShaderConfig),this.indexBuffer=c.genericQuadIndexBuffer,this.vertexBufferLayout=new l(c,v.vertexBufferLayout,null),this.programManager=new i(c,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(v.shaderName,v.vertexSource,v.fragmentSource);for(var g=0;g<v.shaderAdditions.length;g++){var p=v.shaderAdditions[g];this.programManager.addAddition(p)}this.setUniform=this.programManager.setUniform.bind(this.programManager),this.transformerNode=f.getNode("TransformerImage"),this._texturerProxy={frameWidth:1,frameHeight:1,frame:{realWidth:1,realHeight:1},uvSource:{x:0,y:0}}},_completeConfig:function(u){var f=this.renderer.gl,v=u.vertexSource;if(!v){var c=u.vertexKey;if(c){var g=this.manager.renderer.game.cache.shader.get(c);g&&g.glsl&&(v=g.glsl)}}v||(v=r);var p=u.fragmentSource;if(!p){var T=u.fragmentKey;T&&(g=this.manager.renderer.game.cache.shader.get(T),g&&g.glsl&&(p=g.glsl))}return p||(p=o),{name:u.name||"ShaderQuad",shaderName:u.shaderName||u.name||"ShaderQuad",vertexSource:v,fragmentSource:p,shaderAdditions:u.shaderAdditions||[],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2,type:f.FLOAT,normalized:!1},{name:"inTexCoord",size:2,type:f.FLOAT,normalized:!1}]}}},run:function(u,f,v){var c=this.manager,g=this.renderer;c.startStandAloneRender(),this.onRunBegin(u);var p=f.width,T=f.height;this._texturerProxy.frame.realWidth=p,this._texturerProxy.frame.realHeight=T,this._texturerProxy.frameWidth=p,this._texturerProxy.frameHeight=T;var C,M,A,R,P,L,F,w;if(f.renderToTexture)C=0,M=0,A=0,R=T,P=p,L=T,F=p,w=0;else{var O=this.transformerNode;O.run(u,f,this._texturerProxy,v);var B=O.quad;C=B[0],M=B[1],A=B[2],R=B[3],P=B[4],L=B[5],F=B[6],w=B[7]}var I=this.vertexBufferLayout.layout.stride,D=this.vertexBufferLayout.buffer,N=D.viewF32,z=0;N[z++]=A,N[z++]=R,N[z++]=f.textureCoordinateBottomLeft.x,N[z++]=f.textureCoordinateBottomLeft.y,N[z++]=C,N[z++]=M,N[z++]=f.textureCoordinateTopLeft.x,N[z++]=f.textureCoordinateTopLeft.y,N[z++]=P,N[z++]=L,N[z++]=f.textureCoordinateBottomRight.x,N[z++]=f.textureCoordinateBottomRight.y,N[z++]=F,N[z++]=w,N[z++]=f.textureCoordinateTopRight.x,N[z++]=f.textureCoordinateTopRight.y,D.update(I*4);var V=this.programManager;this.updateShaderConfig(u,f,this);var U=V.getCurrentProgramSuite();if(U){var G=U.program,b=U.vao,Y=this.setUniform;g.setProjectionMatrixFromDrawingContext(u),Y("uProjectionMatrix",u.renderer.projectionMatrix.val),f.setupUniforms(Y,u),V.applyUniforms(G),g.drawElements(u,this.setupTextures(f),G,b,4,0)}this.onRunEnd(u)},setupTextures:function(u){for(var f=u.textures,v=[],c=0;c<f.length;c++){var g=f[c],p=g.get().source.glTexture;v.push(p)}return v},updateShaderConfig:function(u,f,v){}});h.exports=a},17486:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(6141),i=new e({Extends:l,initialize:function(r){l.call(this,"StrokePath",r),this.drawLineNode=this.manager.getNode("DrawLine")},run:function(s,r,o,a,u,f,v,c,g,p,T,C){this.onRunBegin(s);var M=this.drawLineNode,A=o.length-1,R,P,L=!1,F=!1;a>2&&A>1&&(L=!0,u||(F=!0));for(var w=[],O=0,B=[],I=0,D,N=[],z=0,V,U,G,b,Y=T*T,W,H,X,K=0;K<A;K+=X){if(W=K===0,H=K===A-1,X=1,R=o[K],P=o[K+X],Y&&!H)for(V=P.x-R.x,U=P.y-R.y,G=f.getX(V,U)-f.tx,b=f.getY(V,U)-f.ty;K+X<A-1&&G*G+b*b<=Y;)X++,P=o[K+X],V=P.x-R.x,U=P.y-R.y,G=f.getX(V,U)-f.tx,b=f.getY(V,U)-f.ty;M.run(s,f,R.x,R.y,P.x,P.y,R.width/2,P.width/2,B),I+=8,D=I/2,N[z++]=v,N[z++]=g,N[z++]=p,N[z++]=c,w[O++]=D-4,w[O++]=D-3,w[O++]=D-2,w[O++]=D-2,w[O++]=D-1,w[O++]=D-4,L&&!W&&(w[O++]=D-4,w[O++]=D-3,w[O++]=D-6,w[O++]=D-6,w[O++]=D-5,w[O++]=D-4,F&&H&&(w[O++]=D-2,w[O++]=D-1,w[O++]=0,w[O++]=0,w[O++]=1,w[O++]=D-2))}r.batch(s,w,B,N,C),this.onRunEnd(s)}});h.exports=i},95433:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(6141),i=new e({Extends:l,initialize:function(r){l.call(this,"YieldContext",r),this._state={blend:this.manager.renderer.blendModes[0],vao:null}},run:function(s){this.onRunBegin(s);var r=this.manager,o=r.renderer;r.startStandAloneRender(),o.glWrapper.update(this._state),o.glTextureUnits.unbindAllUnits(),this.onRunEnd(s)}});h.exports=i},70972:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]]);h.exports=l},98682:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]]);h.exports=l},87891:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","BatchHandlerTriFlat"],["FillPath","FillPath"],["FillRect","FillRect"],["FillTri","FillTri"],["StrokePath","StrokePath"]]);h.exports=l},40939:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"],["Transformer","TransformerImage"],["Texturer","TexturerImage"]]);h.exports=l},68668:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"]]);h.exports=l},43246:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["BatchHandler","BatchHandlerPointLight"]]);h.exports=l},30529:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["BatchHandler","BatchHandlerQuad"]]);h.exports=l},85760:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["BatchHandler","BatchHandlerStrip"]]);h.exports=l},78705:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","SubmitterQuad"],["BatchHandler","BatchHandlerQuad"],["Transformer","TransformerStamp"],["Texturer","TexturerImage"]]);h.exports=l},41571:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","SubmitterTileSprite"],["BatchHandler","BatchHandlerTileSprite"],["Transformer","TransformerTileSprite"],["Texturer","TexturerTileSprite"]]);h.exports=l},67743:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","SubmitterTilemapGPULayer"]]);h.exports=l},79317:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=new e([["Submitter","SubmitterTile"],["BatchHandler","BatchHandlerTileSprite"],["Transformer","TransformerTile"]]);h.exports=l},59212:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={DefaultBitmapTextNodes:t(70972),DefaultBlitterNodes:t(98682),DefaultGraphicsNodes:t(87891),DefaultImageNodes:t(40939),DefaultParticleEmitterNodes:t(68668),DefaultPointLightNodes:t(43246),DefaultQuadNodes:t(30529),DefaultRopeNodes:t(85760),DefaultStampNodes:t(78705),DefaultTilemapGPULayerNodes:t(67743),DefaultTilemapLayerNodes:t(79317),DefaultTileSpriteNodes:t(41571)};h.exports=e},47406:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(6141),i=new e({Extends:l,initialize:function(r,o){l.call(this,r,o)},run:function(s,r,o,a){}});h.exports=i},53663:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(2807),i=t(99501),s=t(56436),r=t(40952),o=t(47406),a=new e({Extends:o,initialize:function(v,c,g,p,T){if(!p){var C=c.renderer.game.cache.shader.get(g);if(!(C&&C.glsl))throw new Error("BaseFilterShader: No fragment shader source provided and no shader found with key "+g);p=C.glsl}o.call(this,v,c);var M=c.renderer,A=M.gl,R={shaderName:v,vertexSource:l,fragmentSource:p,shaderAdditions:T||[],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2,type:A.FLOAT,normalized:!1},{name:"inTexCoord",size:2,type:A.FLOAT,normalized:!1}]}};R.shaderAdditions.push(i()),this.indexBuffer=M.genericQuadIndexBuffer,this.vertexBufferLayout=new r(M,R.vertexBufferLayout,null),this.programManager=new s(M,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(R.shaderName,R.vertexSource,R.fragmentSource);for(var P=0;P<R.shaderAdditions.length;P++){var L=R.shaderAdditions[P];this.programManager.addAddition(L)}this.programManager.setUniform("uMainSampler",0)},run:function(f,v,c,g){var p=this.manager,T=p.renderer;p.startStandAloneRender(),g||(g=f.getPadding()),c||(c=T.drawingContextPool.get(v.width+g.width,v.height+g.height)),c.use(),this.onRunBegin(c);var C=[v.texture];this.setupTextures(f,C,c);var M=-1,A=-1,R=-1,P=1,L=1,F=1,w=1,O=-1;if(g.left){var B=2*g.left/c.width;M-=B,R-=B}if(g.right){var I=2*g.right/c.width;w-=I,L-=I}if(g.top){var D=2*g.top/c.height;P+=D,F+=D}if(g.bottom){var N=2*g.bottom/c.height;A+=N,O+=N}var z=this.vertexBufferLayout.layout.stride,V=this.vertexBufferLayout.buffer,U=V.viewF32,G=0;U[G++]=-1,U[G++]=-1,U[G++]=u(0,M,w),U[G++]=u(0,A,O),U[G++]=-1,U[G++]=1,U[G++]=u(0,R,L),U[G++]=u(1,P,F),U[G++]=1,U[G++]=-1,U[G++]=u(1,M,w),U[G++]=u(0,A,O),U[G++]=1,U[G++]=1,U[G++]=u(1,R,L),U[G++]=u(1,P,F),V.update(z*4);var b=this.programManager;this.updateShaderConfig(f,c);var Y=b.getCurrentProgramSuite();if(Y){var W=Y.program,H=Y.vao;this.setupUniforms(f,c),b.applyUniforms(W),T.drawElements(c,C,W,H,4,0)}return v.release(),this.onRunEnd(c),c},updateShaderConfig:function(f,v){},setupTextures:function(f,v,c){},setupUniforms:function(f,v){}});function u(f,v,c){return v=(1/v+1)*.5,c=(1/c+1)*.5,v+f*(c-v)}h.exports=a},22731:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(10235),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterBarrel",o,null,i)},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("amount",r.amount)}});h.exports=s},57032:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=t(83419),i=t(10312),s=t(53663),r=t(65980),o=new l({Extends:s,initialize:function(u){this._blendModeMap=new e;var f=this._blendModeMap;Object.entries(i).forEach(function(g){f.set(g[1],g[0])});var v=f.get(i.NORMAL),c=[{name:v,additions:{fragmentHeader:"#define BLEND "+v},tags:["blendmode"]}];s.call(this,"FilterBlend",u,null,r,c)},updateShaderConfig:function(a,u){var f=a.blendMode;f===i.SKIP_CHECK&&(f=i.NORMAL);var v=this._blendModeMap.get(f)||this._blendModeMap.get(i.NORMAL),c=this.programManager.getAdditionsByTag("blendmode")[0];c.name=v,c.additions.fragmentHeader="#define BLEND "+v},setupTextures:function(a,u,f){u[1]=a.glTexture},setupUniforms:function(a,u){var f=this.programManager;f.setUniform("uMainSampler2",1),f.setUniform("amount",a.amount),f.setUniform("color",a.color)}});h.exports=o},52903:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(5899),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterBlocky",o,null,i)},setupUniforms:function(r,o){var a=this.programManager,u=Math.max(1,r.size.x),f=Math.max(1,r.size.y);a.setUniform("resolution",[o.width,o.height]),a.setUniform("uSizeAndOffset",[u,f,r.offset.x,r.offset.y])}});h.exports=s},13922:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=t(83419),i=t(47406),s=new l({Extends:i,initialize:function(o){i.call(this,"FilterBlur",o)},run:function(r,o,a,u){this.onRunBegin(a);var f=r.quality,v=r.steps,c=null;switch(f){case 2:{c=this.manager.getNode("FilterBlurHigh");break}case 1:{c=this.manager.getNode("FilterBlurMed");break}case 0:default:{c=this.manager.getNode("FilterBlurLow");break}}var g={strength:r.strength,color:r.glcolor,x:r.x,y:r.y};u||(u=r.getPadding());for(var p=o,T=0;T<v;T++){g.x=r.x,g.y=0,p=c.run(g,p,null,u),T===0&&(u=new e);var C=T===v-1?a:null;g.x=0,g.y=r.y,p=c.run(g,p,C,u)}return a=p,this.onRunEnd(a),a}});h.exports=s},33466:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(20784),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterBlurHigh",o,null,i)},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("resolution",[o.width,o.height]),a.setUniform("strength",r.strength),a.setUniform("color",r.color),a.setUniform("offset",[r.x,r.y])}});h.exports=s},75798:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(65122),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterBlurLow",o,null,i)},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("resolution",[o.width,o.height]),a.setUniform("strength",r.strength),a.setUniform("color",r.color),a.setUniform("offset",[r.x,r.y])}});h.exports=s},90830:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(60942),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterBlurMed",o,null,i)},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("resolution",[o.width,o.height]),a.setUniform("strength",r.strength),a.setUniform("color",r.color),a.setUniform("offset",[r.x,r.y])}});h.exports=s},52302:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(43722),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterBokeh",o,null,i)},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("radius",r.radius),a.setUniform("amount",r.amount),a.setUniform("contrast",r.contrast),a.setUniform("strength",r.strength),a.setUniform("blur",[r.blurX,r.blurY]),a.setUniform("isTiltShift",r.isTiltShift),a.setUniform("resolution",[o.width,o.height])}});h.exports=s},34989:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(19883),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterColorMatrix",o,null,i)},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("uColorMatrix[0]",r.colorMatrix.getData()),a.setUniform("uAlpha",r.colorMatrix.alpha)}});h.exports=s},15600:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(12886),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterDisplacement",o,null,i)},setupTextures:function(r,o){o[1]=r.glTexture},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("uDisplacementSampler",1),a.setUniform("amount",[r.x,r.y])}});h.exports=s},99786:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(33016),s=new e({Extends:l,initialize:function(o){var a=[{name:"distance_10.0",additions:{fragmentDefine:"#define DISTANCE 10.0"},tags:["distance"]},{name:"quality_0.1",additions:{fragmentDefine:"#define QUALITY 0.1"},tags:["quality"]}];l.call(this,"FilterGlow",o,null,i,a)},updateShaderConfig:function(r,o){var a=this.programManager,u=r.distance.toFixed(0)+".0",f=a.getAdditionsByTag("distance")[0];f.name="distance_"+u,f.additions.fragmentDefine=`#undef DISTANCE
|
||
#define DISTANCE `+u;var v=r.quality.toFixed(0)+".0",c=a.getAdditionsByTag("quality")[0];c.name="quality_"+v,c.additions.fragmentDefine=`#undef QUALITY
|
||
#define QUALITY `+v},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("resolution",[o.width,o.height]),a.setUniform("glowColor",r.glcolor),a.setUniform("outerStrength",r.outerStrength),a.setUniform("innerStrength",r.innerStrength),a.setUniform("scale",r.scale),a.setUniform("knockout",r.knockout)}});h.exports=s},26703:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(39603),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterMask",o,null,i)},setupTextures:function(r,o,a){r.maskGameObject&&(r.needsUpdate||r.autoUpdate)&&r.updateDynamicTexture(a.width,a.height),o[1]=r.glTexture},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("uMaskSampler",1),a.setUniform("invert",r.invert)}});h.exports=s},55905:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=t(83419),i=t(10312),s=t(47406),r=new l({Extends:s,initialize:function(a){s.call(this,"FilterParallelFilters",a)},run:function(o,a,u,f){this.onRunBegin(u),a.lock(this);var v=o.bottom.getActive(),c=o.top.getActive(),g=f||o.getPadding();if(v.length+c.length>0){var p=a,T=a;if(v.length>0){f=g;for(var C=0;C<v.length;C++){var M=v[C],A=this.manager.getNode(M.renderNode);p=A.run(M,p,null,f),C===0&&C<v.length-1&&(f=new e)}}if(c.length>0)for(f=g,C=0;C<c.length;C++)M=c[C],A=this.manager.getNode(M.renderNode),T=A.run(M,T,null,f),C===0&&C<c.length-1&&(f=new e);a.unlock(this),a!==p&&a!==T&&a.release();var R=o.blend;R.glTexture=T.texture,A=this.manager.getNode("FilterBlend"),u=this.manager.getNode("FilterBlend").run(o.blend,p,u,f),T.release()}else{A=this.manager.getNode("FilterBlend");var P={blendMode:i.COPY,glTexture:a.texture,amount:1,color:[1,1,1,1]};a.unlock(this),u=A.run(P,a,u,g)}return this.onRunEnd(u),u}});h.exports=r},58167:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(99191),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterPixelate",o,null,i)},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("amount",r.amount),a.setUniform("resolution",[o.width,o.height])}});h.exports=s},13279:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(47406),i=new e({Extends:l,initialize:function(r){l.call(this,"FilterSampler",r)},run:function(s,r,o,a){this.onRunBegin(r);var u=this.manager.renderer,f=0,v=0,c=1,g=1,p=r.width,T=r.height,C=!1;return s.region?(f=s.region.x,v=s.region.y,s.region.width!==void 0?(c=s.region.width,g=s.region.height):C=!0):(c=p,g=T),u.snapshotFramebuffer(r.framebuffer,p,T,s.callback,C,f,v,c,g),this.onRunEnd(r),r}});h.exports=i},27459:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(69355),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterShadow",o,null,i)},setupUniforms:function(r,o){var a=this.programManager,u=r.samples;a.setUniform("lightPosition",[r.x,1-r.y]),a.setUniform("decay",r.decay),a.setUniform("power",r.power/u),a.setUniform("color",r.glcolor),a.setUniform("samples",u),a.setUniform("intensity",r.intensity)}});h.exports=s},88856:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53663),i=t(92636),s=new e({Extends:l,initialize:function(o){l.call(this,"FilterThreshold",o,null,i)},setupUniforms:function(r,o){var a=this.programManager;a.setUniform("edge1",r.edge1),a.setUniform("edge2",r.edge2),a.setUniform("invert",r.invert)}});h.exports=s},54521:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={BaseFilter:t(47406),BaseFilterShader:t(53663),BatchHandler:t(13961),BatchHandlerPointLight:t(16971),BatchHandlerQuad:t(15214),BatchHandlerQuadSingle:t(72266),BatchHandlerStrip:t(62791),BatchHandlerTileSprite:t(21832),BatchHandlerTriFlat:t(62087),Camera:t(61842),Defaults:t(59212),DrawLine:t(76409),DynamicTextureHandler:t(95449),FillCamera:t(61199),FillPath:t(14255),FillRect:t(12682),FillTri:t(13119),FilterBarrel:t(22731),FilterBlend:t(57032),FilterBlur:t(13922),FilterBlurHigh:t(33466),FilterBlurLow:t(75798),FilterBlurMed:t(90830),FilterBokeh:t(52302),FilterColorMatrix:t(34989),FilterDisplacement:t(15600),FilterGlow:t(99786),FilterMask:t(26703),FilterParallelFilters:t(55905),FilterPixelate:t(58167),FilterSampler:t(13279),FilterShadow:t(27459),FilterThreshold:t(88856),ListCompositor:t(27996),RebindContext:t(56432),RenderNode:t(6141),StrokePath:t(17486),SubmitterQuad:t(31029),SubmitterSpriteGPULayer:t(53384),SubmitterTile:t(94494),SubmitterTilemapGPULayer:t(87469),SubmitterTileSprite:t(89723),TexturerImage:t(12913),TexturerTileSprite:t(22995),TransformerImage:t(86081),TransformerStamp:t(88383),TransformerTile:t(34454),TransformerTileSprite:t(46211),YieldContext:t(95433)};h.exports=e},31029:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(46975),i=t(70554),s=t(6141),r=i.getTintAppendFloatAlpha,o=new e({Extends:s,initialize:function(u,f){f=l(f||{},this.defaultConfig),s.call(this,f.name,u),this.batchHandler=f.batchHandler,this._renderOptions={multiTexturing:!0,lighting:null,smoothPixelArt:null},this._lightingOptions={normalGLTexture:null,normalMapRotation:0,selfShadow:{enabled:!1,penumbra:0,diffuseFlatThreshold:0}}},defaultConfig:{name:"SubmitterQuad",role:"Submitter",batchHandler:"BatchHandler"},run:function(a,u,f,v,c,g,p,T,C){this.onRunBegin(a);var M,A,R,P,L;c.run&&c.run(a,u,v),g.run&&g.run(a,u,c,f,v),p?(p.run&&p.run(a,u,v),M=p.tintFill,A=p.tintTopLeft,R=p.tintBottomLeft,P=p.tintTopRight,L=p.tintBottomRight):(M=u.tintFill,A=r(u.tintTopLeft,u._alphaTL),R=r(u.tintBottomLeft,u._alphaBL),P=r(u.tintTopRight,u._alphaTR),L=r(u.tintBottomRight,u._alphaBR));var F=g.quad,w=c.uvSource,O=w.u0,B=w.v0,I=w.u1,D=w.v1;this.setRenderOptions(u,T,C),(u.customRenderNodes[this.batchHandler]||u.defaultRenderNodes[this.batchHandler]).batch(a,c.frame.source.glTexture,F[0],F[1],F[2],F[3],F[6],F[7],F[4],F[5],O,B,I-O,D-B,M,A,R,P,L,this._renderOptions),this.onRunEnd(a)},setRenderOptions:function(a,u,f){var v=this._renderOptions,c,g;if(a.displayTexture?(c=a.displayTexture,g=a.displayFrame.sourceIndex):a.texture?(c=a.texture,g=a.frame.sourceIndex):a.tileset&&(Array.isArray(a.tileset)?c=a.tileset[0].image:c=a.tileset.image,g=0),a.lighting){if(u||c&&(u=c.dataSource[g]),u?u=u.glTexture:u=this.manager.renderer.normalTexture,isNaN(f)&&(f=a.rotation,a.parentContainer)){var p=a.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);f=p.rotationNormalized}var T=a.selfShadow,C=T.enabled;C===null&&(C=a.scene.sys.game.config.selfShadow),this._lightingOptions.normalGLTexture=u,this._lightingOptions.normalMapRotation=f,this._lightingOptions.selfShadow.enabled=C,this._lightingOptions.selfShadow.penumbra=T.penumbra,this._lightingOptions.selfShadow.diffuseFlatThreshold=T.diffuseFlatThreshold,v.lighting=this._lightingOptions}else v.lighting=null;var M;c&&c.smoothPixelArt!==null?M=c.smoothPixelArt:M=a.scene.sys.game.config.smoothPixelArt,v.smoothPixelArt=M}});h.exports=o},53384:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=t(26099),i=t(83419),s=t(46975),r=t(56436),o=t(81084),a=t(44349),u=t(6184),f=t(11653),v=t(40829),c=t(42792),g=t(96049),p=t(33997),T=t(79532),C=t(74505),M=t(70554),A=t(40952),R=t(6141),P=t(49119),L=t(3524),F=new i({Extends:R,initialize:function(O,B,I){var D=O.renderer,N=s(B||{},this.defaultConfig),z=N.name;this._completeLayout(N),R.call(this,z,O),this.config=N,this.gameObject=I,this.instanceBufferLayout=new A(D,N.instanceBufferLayout,null),this.vertexBufferLayout=new A(D,N.vertexBufferLayout,null);var V=this.vertexBufferLayout.buffer,U=V.viewU8;if(U[0]=0,U[1]=1,U[2]=2,U[3]=3,V.update(),this.programManager=new r(D,[this.vertexBufferLayout,this.instanceBufferLayout],this.indexBuffer),this.programManager.setBaseShader(N.shaderName,N.vertexSource,N.fragmentSource),N.shaderAdditions)for(var G=0;G<N.shaderAdditions.length;G++){var b=N.shaderAdditions[G];this.programManager.addAddition(b)}if(N.shaderFeatures)for(G=0;G<N.shaderFeatures.length;G++)this.programManager.addFeature(N.shaderFeatures[G]);this._calcMatrix=new e,this._lightVector=new l},defaultConfig:{name:"SubmitterSpriteGPULayer",count:0,shaderName:"SpriteGPULayer",vertexSource:L,fragmentSource:P,shaderAdditions:[c(),g(),C(!0),f(1),p(),a(),u(!0),T(!0),v(!0),o(!0)],instanceBufferLayout:{usage:"STATIC_DRAW",instanceDivisor:1,layout:[{name:"inPositionX",size:4},{name:"inPositionY",size:4},{name:"inRotation",size:4},{name:"inScaleX",size:4},{name:"inScaleY",size:4},{name:"inAlpha",size:4},{name:"inFrame",size:4},{name:"inTintBlend",size:4},{name:"inTintBL",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintTL",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintBR",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inTintTR",size:4,type:"UNSIGNED_BYTE",normalized:!0},{name:"inOriginAndTintFillAndCreationTime",size:4},{name:"inScrollFactor",size:2}]},vertexBufferLayout:{usage:"STATIC_DRAW",count:4,layout:[{name:"inVertex",type:"UNSIGNED_BYTE"}]}},_completeLayout:function(w){var O=w.vertexBufferLayout;w.vertexBufferLayout={},w.vertexBufferLayout.usage=O.usage,w.vertexBufferLayout.count=O.count,w.vertexBufferLayout.layout=[];for(var B=w.vertexBufferLayoutRemove||[],I=0;I<O.layout.length;I++){var D=O.layout[I];B.indexOf(D.name)===-1&&(w.vertexBufferLayout.layout[I]={name:D.name,size:D.size||1,type:D.type||"FLOAT",normalized:D.normalized||!1})}if(w.vertexBufferLayoutAdd){var N=w.vertexBufferLayoutAdd||[];for(I=0;I<N.length;I++){var z=N[I];w.vertexBufferLayout.layout.push({name:z.name,size:z.size||1,type:z.type||"FLOAT",normalized:z.normalized||!1})}}for(O=w.instanceBufferLayout,w.instanceBufferLayout={},w.instanceBufferLayout.usage=O.usage,w.instanceBufferLayout.instanceDivisor=O.instanceDivisor,w.instanceBufferLayout.layout=[],B=w.instanceBufferLayoutRemove||[],I=0;I<O.layout.length;I++)D=O.layout[I],B.indexOf(D.name)===-1&&(w.instanceBufferLayout.layout[I]={name:D.name,size:D.size||1,type:D.type||"FLOAT",normalized:D.normalized||!1});if(w.instanceBufferLayoutAdd)for(N=w.instanceBufferLayoutAdd||[],I=0;I<N.length;I++)z=N[I],w.instanceBufferLayout.layout.push({name:z.name,size:z.size||1,type:z.type||"FLOAT",normalized:z.normalized||!1})},setupUniforms:function(w){var O=w.camera,B=this.programManager,I=this.gameObject;B.setUniform("uRoundPixels",O.roundPixels),B.setUniform("uResolution",[w.width,w.height]),w.renderer.setProjectionMatrixFromDrawingContext(w),B.setUniform("uProjectionMatrix",w.renderer.projectionMatrix.val);var D=O.matrixCombined;B.setUniform("uViewMatrix",[D.a,D.b,0,D.c,D.d,0,D.tx,D.ty,1]),B.setUniform("uCameraScrollAndAlpha",[O.scrollX,O.scrollY,I.alpha]),B.setUniform("uTime",I.timeElapsed),B.setUniform("uDiffuseResolution",[I.frame.source.width,I.frame.source.height]),B.setUniform("uFrameDataResolution",[I.frameDataTexture.width,I.frameDataTexture.height]),B.setUniform("uGravity",I.gravity),B.setUniform("uMainSampler[0]",0),B.setUniform("uFrameDataTexture",1);var N=I.texture.source[0].glTexture;B.setUniform("uMainResolution[0]",[N.width,N.height]),M.updateLightingUniforms(I.lighting,w,B,2,this._lightVector,I.selfShadow.enabled,I.selfShadow.diffuseFlatThreshold,I.selfShadow.penumbra)},updateRenderOptions:function(){for(var w=this.programManager,O=this.gameObject.lighting,B=w.getAdditionsByTag("LIGHTING"),I=0;I<B.length;I++)B[I].disable=!O;if(O){var D=w.getAddition("DefineLights");D&&(D.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}var N=w.getAddition("SmoothPixelArt");if(N){var z=this.gameObject.texture.smoothPixelArt;z===null&&(z=this.gameObject.scene.game.config.smoothPixelArt),N.disable=!z}w.clearFeatures();var V=this.gameObject.getShaderFeatures();for(I=0;I<V.length;I++)w.addFeature(V[I]);this.gameObject.selfShadow.enabled&&w.addFeature("SELFSHADOW")},run:function(w){var O,B=this.gameObject;if(B.memberCount!==0){this.manager.startStandAloneRender(),this.onRunBegin(w);var I=B.bufferUpdateSegments;if(I>0){var D=this.instanceBufferLayout.buffer,N=B.memberCount,z=Math.floor(N/B.bufferUpdateSegmentSize),V=!0;for(O=0;O<=z;O++)if(!(1<<O&I)){V=!1;break}if(I===B.MAX_BUFFER_UPDATE_SEGMENTS_FULL||N<=B.bufferUpdateSegmentSize||V)D.update();else{var U=B.bufferUpdateSegmentSize,G=U*this.instanceBufferLayout.layout.stride;for(O=0;O<32&&O*U<N;O++)I&1<<O&&D.update(G,O*G)}B.clearAllSegmentsNeedUpdate()}var b=[B.frame.source.glTexture,B.frameDataTexture];if(B.lighting){var Y=B.texture.dataSource[B.frame.sourceIndex];Y?Y=Y.glTexture:Y=this.manager.renderer.normalTexture,b[2]=Y}this.updateRenderOptions();var W=this.programManager,H=W.getCurrentProgramSuite();if(H){var X=H.program,K=H.vao;this.setupUniforms(w),W.applyUniforms(X),this.manager.renderer.drawInstancedArrays(w,b,X,K,0,4,B.memberCount)}this.onRunEnd(w)}}});h.exports=F},94494:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(31029),i=new e({Extends:l,initialize:function(r,o){l.call(this,r,o),this._renderOptions.clampFrame=!0},defaultConfig:{name:"SubmitterTile",role:"Submitter",batchHandler:"BatchHandler"},run:function(s,r,o,a,u,f,v,c,g){this.onRunBegin(s);var p,T,C,M,A;if(u.run&&u.run(s,r,a),f.run&&f.run(s,r,u,o,a),v)v.run&&v.run(s,r,a),p=v.tintFill,T=v.tintTopLeft,C=v.tintBottomLeft,M=v.tintTopRight,A=v.tintBottomRight;else{p=r.tintFill;var R=4294967295;T=R,C=R,M=R,A=R}var P=u.frame,L=f.quad,F=u.uvSource,w=F.u0,O=F.v0,B=F.u1,I=F.v1;this.setRenderOptions(r,c,g),(r.customRenderNodes[this.batchHandler]||r.defaultRenderNodes[this.batchHandler]).batch(s,P.source.glTexture,L[0],L[1],L[2],L[3],L[6],L[7],L[4],L[5],w,O,B-w,I-O,p,T,C,M,A,this._renderOptions,w,I,w,O,B,I,B,O),this.onRunEnd(s)}});h.exports=i},89723:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(70554),i=t(31029),s=l.getTintAppendFloatAlpha,r=new e({Extends:i,initialize:function(a,u){i.call(this,a,u),this._renderOptions.wrapFrame=!0},defaultConfig:{name:"SubmitterTileSprite",role:"Submitter",batchHandler:"BatchHandler"},run:function(o,a,u,f,v,c,g,p,T){this.onRunBegin(o);var C,M,A,R,P;v.run&&v.run(o,a,f),c.run&&c.run(o,a,v,u,f),g?(g.run&&g.run(o,a,f),C=g.tintFill,M=g.tintTopLeft,A=g.tintBottomLeft,R=g.tintTopRight,P=g.tintBottomRight):(C=a.tintFill,M=s(a.tintTopLeft,a._alphaTL),A=s(a.tintBottomLeft,a._alphaBL),R=s(a.tintTopRight,a._alphaTR),P=s(a.tintBottomRight,a._alphaBR));var L=v.frame,F=c.quad,w=L,O=w.u0,B=w.v0,I=w.u1,D=w.v1,N=v.uvMatrix.quad;this.setRenderOptions(a,p,T),this._lightingOptions.normalMapRotation+=a.tileRotation,(a.customRenderNodes[this.batchHandler]||a.defaultRenderNodes[this.batchHandler]).batch(o,L.source.glTexture,F[0],F[1],F[2],F[3],F[6],F[7],F[4],F[5],O,B,I-O,D-B,C,M,A,R,P,this._renderOptions,N[0],N[1],N[2],N[3],N[6],N[7],N[4],N[5]),this.onRunEnd(o)}});h.exports=r},87469:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license None
|
||
*/var e=t(61340),l=t(26099),i=t(83419),s=t(46975),r=t(56436),o=t(84639),a=t(81084),u=t(6184),f=t(747),v=t(74505),c=t(57532),g=t(23879),p=t(40952),T=t(6141),C=t(70554),M=new i({Extends:T,initialize:function(R,P){var L=R.renderer,F=s(P||{},this.defaultConfig),w=F.name;if(this._completeLayout(F),T.call(this,w,R),this.config=F,this.indexBuffer=L.genericQuadIndexBuffer,this.vertexBufferLayout=new p(L,F.vertexBufferLayout,null),this.programManager=new r(L,[this.vertexBufferLayout],this.indexBuffer),this.programManager.setBaseShader(F.shaderName,F.vertexSource,F.fragmentSource),F.shaderAdditions)for(var O=0;O<F.shaderAdditions.length;O++){var B=F.shaderAdditions[O];this.programManager.addAddition(B)}if(F.shaderFeatures)for(O=0;O<F.shaderFeatures.length;O++)this.programManager.addFeature(F.shaderFeatures[O]);this._spriteMatrix=new e,this._calcMatrix=new e,this._lightVector=new l,this._quad=new Float32Array(8)},defaultConfig:{name:"SubmitterTilemapGPULayer",shaderName:"TilemapGPULayer",vertexSource:g,fragmentSource:c,shaderAdditions:[v(!0),f(!0),u(!0),a(!0)],vertexBufferLayout:{usage:"DYNAMIC_DRAW",count:4,layout:[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]}},_completeLayout:function(A){var R=A.vertexBufferLayout;A.vertexBufferLayout={},A.vertexBufferLayout.usage=R.usage,A.vertexBufferLayout.count=R.count||4,A.vertexBufferLayout.layout=[];for(var P=A.vertexBufferLayoutRemove||[],L=0;L<R.layout.length;L++){var F=R.layout[L];P.indexOf(F.name)===-1&&(A.vertexBufferLayout.layout[L]={name:F.name,size:F.size||1,type:F.type||"FLOAT",normalized:F.normalized||!1})}if(A.vertexBufferLayoutAdd){var w=A.vertexBufferLayoutAdd||[];for(L=0;L<w.length;L++){var O=w[L];A.vertexBufferLayout.layout.push({name:O.name,size:O.size||1,type:O.type||"FLOAT",normalized:O.normalized||!1})}}},setupUniforms:function(A,R){var P=this.programManager;P.setUniform("uResolution",[A.width,A.height]),A.renderer.setProjectionMatrixFromDrawingContext(A),P.setUniform("uProjectionMatrix",A.renderer.projectionMatrix.val);var L=R.tileset,F=L.glTexture,w=R.layerDataTexture,O=L.getAnimationDataTexture(A.renderer);P.setUniform("uMainSampler",0),P.setUniform("uLayerSampler",1),P.setUniform("uAnimSampler",2),P.setUniform("uMainResolution",[F.width,F.height]),P.setUniform("uLayerResolution",[w.width,w.height]),P.setUniform("uAnimResolution",[O.width,O.height]),P.setUniform("uTileColumns",L.columns),P.setUniform("uTileWidthHeightMarginSpacing",[L.tileWidth,L.tileHeight,L.tileMargin,L.tileSpacing]),P.setUniform("uAlpha",R.alpha),P.setUniform("uTime",R.timeElapsed),C.updateLightingUniforms(R.lighting,A,P,3,this._lightVector,R.selfShadow.enabled,R.selfShadow.diffuseFlatThreshold,R.selfShadow.penumbra)},updateRenderOptions:function(A){var R=this.programManager,P=A.tileset.image,L=R.getAdditionsByTag("MAXANIMS")[0];L&&R.removeAddition(L.name),A.tileset.maxAnimationLength>0&&R.addAddition(o(A.tileset.maxAnimationLength));for(var F=A.lighting,w=R.getAdditionsByTag("LIGHTING"),O=0;O<w.length;O++){var B=w[O];B.disable=!F}if(F){var I=R.getAddition("DefineLights");I&&(I.additions.fragmentDefine="#define LIGHT_COUNT "+this.manager.renderer.config.maxLights)}var D=A.selfShadow.enabled;D===null&&(D=A.scene.sys.game.config.selfShadow),D?R.addFeature("SELFSHADOW"):R.removeFeature("SELFSHADOW");var N=P.smoothPixelArt;N===null&&(N=A.scene.sys.game.config.smoothPixelArt);var z=R.getAddition("SmoothPixelArt");z&&(z.disable=!N);var V=P.source[0].glTexture.magFilter===this.manager.renderer.gl.LINEAR;V?R.addFeature("BORDERFILTER"):R.removeFeature("BORDERFILTER")},run:function(A,R,P){var L=this.manager,F=L.renderer;L.startStandAloneRender(),this.onRunBegin(A);var w=A.camera,O=this._spriteMatrix,B=this._calcMatrix,I=this._quad,D=R.x,N=R.y,z=R.width,V=R.height;B.copyWithScrollFactorFrom(w.getViewMatrix(!A.useCanvas),w.scrollX,w.scrollY,R.scrollFactorX,R.scrollFactorY),P&&B.multiply(P),O.applyITRS(D,N,0,R.scaleX,R.scaleY),B.multiply(O),B.setQuad(D,N,D+z,N+V,I);var U=this.vertexBufferLayout.layout.stride,G=this.vertexBufferLayout.buffer,b=G.viewF32,Y=0;b[Y++]=I[2],b[Y++]=I[3],b[Y++]=0,b[Y++]=0,b[Y++]=I[0],b[Y++]=I[1],b[Y++]=0,b[Y++]=1,b[Y++]=I[4],b[Y++]=I[5],b[Y++]=1,b[Y++]=0,b[Y++]=I[6],b[Y++]=I[7],b[Y++]=1,b[Y++]=1,G.update(U*4);var W=R.tileset,H=W.glTexture,X=W.getAnimationDataIndexMap(F).size>0,K=[H,R.layerDataTexture];if(X&&(K[2]=W.getAnimationDataTexture(F)),R.lighting){var Z=W.image,Q=Z.dataSource[0];Q?Q=Q.glTexture:Q=this.manager.renderer.normalTexture,K[3]=Q}this.updateRenderOptions(R);var j=this.programManager,J=j.getCurrentProgramSuite();if(J){var tt=J.program,k=J.vao;this.setupUniforms(A,R),j.applyUniforms(tt),F.drawElements(A,K,tt,k,4,0)}this.onRunEnd(A)}});h.exports=M},12913:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(6141),i=new e({Extends:l,initialize:function(r){l.call(this,"TexturerImage",r),this.frame=null,this.frameWidth=0,this.frameHeight=0,this.uvSource=null},run:function(s,r,o){this.onRunBegin(s);var a=r.frame;if(this.frame=a,this.frameWidth=a.cutWidth,this.frameHeight=a.cutHeight,this.uvSource=a,r.isCropped){var u=r._crop;this.uvSource=u,(u.flipX!==r.flipX||u.flipY!==r.flipY)&&r.frame.updateCropUVs(u,r.flipX,r.flipY),this.frameWidth=u.width,this.frameHeight=u.height}var f=a.source.resolution;this.frameWidth/=f,this.frameHeight/=f,this.onRunEnd(s)}});h.exports=i},22995:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=t(83419),i=t(6141),s=new l({Extends:i,initialize:function(o){i.call(this,"TexturerTileSprite",o),this.frame=null,this.uvMatrix=new e},run:function(r,o,a){this.onRunBegin(r);var u=o.frame;if(this.frame=u,o.isCropped){var f=o._crop;(f.flipX!==o.flipX||f.flipY!==o.flipY)&&o.frame.updateCropUVs(f,o.flipX,o.flipY)}this.uvMatrix.loadIdentity(),this.uvMatrix.scale(1/u.width,1/u.height),this.uvMatrix.translate(o.tilePositionX,o.tilePositionY),this.uvMatrix.scale(1/o.tileScaleX,1/o.tileScaleY),this.uvMatrix.rotate(-o.tileRotation),this.uvMatrix.setQuad(0,0,o.width,o.height),this.onRunEnd(r)}});h.exports=s},86081:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=t(83419),i=t(46975),s=t(6141),r=new l({Extends:s,initialize:function(a,u){u=i(u||{},this.defaultConfig),s.call(this,u.name,a),this.quad=new Float32Array(8),this._spriteMatrix=new e,this._calcMatrix=new e},defaultConfig:{name:"TransformerImage",role:"Transformer"},run:function(o,a,u,f,v){this.onRunBegin(o);var c=u.frame,g=u.uvSource,p=g.x,T=g.y,C=a.displayOriginX,M=a.displayOriginY,A=-C+p,R=-M+T,P=c.customPivot,L=1,F=1;a.flipX&&(P||(A+=-c.realWidth+C*2),L=-1),a.flipY&&(P||(R+=-c.realHeight+M*2),F=-1);var w=o.camera,O=this._spriteMatrix,B=this._calcMatrix.copyWithScrollFactorFrom(w.getViewMatrix(!o.useCanvas),w.scrollX,w.scrollY,a.scrollFactorX,a.scrollFactorY);f&&B.multiply(f),O.applyITRS(a.x,a.y,a.rotation,a.scaleX*L,a.scaleY*F),B.multiply(O),B.setQuad(A,R,A+u.frameWidth,R+u.frameHeight,this.quad);var I=B.matrix,D=I[0]===1&&I[1]===0&&I[2]===0&&I[3]===1;if(a.willRoundVertices(w,D)){var N=this.quad;N[0]=Math.round(N[0]),N[1]=Math.round(N[1]),N[2]=Math.round(N[2]),N[3]=Math.round(N[3]),N[4]=Math.round(N[4]),N[5]=Math.round(N[5]),N[6]=Math.round(N[6]),N[7]=Math.round(N[7])}this.onRunEnd(o)}});h.exports=r},88383:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=t(83419),i=t(46975),s=t(6141),r=new l({Extends:s,initialize:function(a,u){u=i(u||{},this.defaultConfig),s.call(this,u.name,a),this._spriteMatrix=new e,this.quad=this._spriteMatrix.quad},defaultConfig:{name:"TransformerStamp",role:"Transformer"},run:function(o,a,u,f,v){this.onRunBegin(o);var c=u.frame,g=u.uvSource,p=g.x,T=g.y,C=a.displayOriginX,M=a.displayOriginY,A=-C+p,R=-M+T,P=c.customPivot,L=1,F=1;a.flipX&&(P||(A+=-c.realWidth+C*2),L=-1),a.flipY&&(P||(R+=-c.realHeight+M*2),F=-1);var w=a.x,O=a.y,B=this._spriteMatrix;B.applyITRS(w,O,a.rotation,a.scaleX*L,a.scaleY*F);var I=B.matrix;this.onlyTranslate=I[0]===1&&I[1]===0&&I[2]===0&&I[3]===1,B.setQuad(A,R,A+u.frameWidth,R+u.frameHeight);var D=B.matrix,N=D[0]===1&&D[1]===0&&D[2]===0&&D[3]===1;if(a.willRoundVertices(o.camera,N)){var z=this.quad;z[0]=Math.round(z[0]),z[1]=Math.round(z[1]),z[2]=Math.round(z[2]),z[3]=Math.round(z[3]),z[4]=Math.round(z[4]),z[5]=Math.round(z[5]),z[6]=Math.round(z[6]),z[7]=Math.round(z[7])}this.onRunEnd(o)}});h.exports=r},34454:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(86081),i=new e({Extends:l,initialize:function(r,o){l.call(this,r,o)},defaultConfig:{name:"TransformerTile",role:"Transformer"},run:function(s,r,o,a,u){this.onRunBegin(s);var f=s.camera,v=this._calcMatrix,c=this._spriteMatrix;v.copyWithScrollFactorFrom(f.getViewMatrix(!s.useCanvas),f.scrollX,f.scrollY,r.scrollFactorX,r.scrollFactorY),a&&v.multiply(a);var g=o.frameWidth,p=o.frameHeight,T=g,C=p,M=g/2,A=p/2,R=r.scaleX,P=r.scaleY,L=r.gidMap[u.index],F=L.tileOffset.x,w=L.tileOffset.y,O=r.x+u.pixelX*R+(M*R-F),B=r.y+u.pixelY*P+(A*P-w),I=-M,D=-A;u.flipX&&(T*=-1,I+=g),u.flipY&&(C*=-1,I+=p),c.applyITRS(O,B,u.rotation,R,P),v.multiply(c),v.setQuad(I,D,I+T,D+C,this.quad);var N=v.matrix,z=N[0]===1&&N[1]===0&&N[2]===0&&N[3]===1;if(r.willRoundVertices(f,z)){var V=this.quad;V[0]=Math.round(V[0]),V[1]=Math.round(V[1]),V[2]=Math.round(V[2]),V[3]=Math.round(V[3]),V[4]=Math.round(V[4]),V[5]=Math.round(V[5]),V[6]=Math.round(V[6]),V[7]=Math.round(V[7])}this.onRunEnd(s)}});h.exports=i},46211:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(86081),i=new e({Extends:l,initialize:function(r,o){l.call(this,r,o)},defaultConfig:{name:"TransformerTileSprite",role:"Transformer"},run:function(s,r,o,a,u){this.onRunBegin(s);var f=r.width,v=r.height,c=r.displayOriginX,g=r.displayOriginY,p=-c,T=-g,C=1,M=1;r.flipX&&(p+=-f+c*2,C=-1),r.flipY&&(T+=-v+g*2,M=-1);var A=r.x,R=r.y,P=s.camera,L=this._calcMatrix,F=this._spriteMatrix;L.copyWithScrollFactorFrom(P.getViewMatrix(!s.useCanvas),P.scrollX,P.scrollY,r.scrollFactorX,r.scrollFactorY),a&&L.multiply(a),F.applyITRS(A,R,r.rotation,r.scaleX*C,r.scaleY*M),L.multiply(F),L.setQuad(p,T,p+f,T+v,this.quad);var w=L.matrix,O=w[0]===1&&w[1]===0&&w[2]===0&&w[3]===1;if(r.willRoundVertices(P,O)){var B=this.quad;B[0]=Math.round(B[0]),B[1]=Math.round(B[1]),B[2]=Math.round(B[2]),B[3]=Math.round(B[3]),B[4]=Math.round(B[4]),B[5]=Math.round(B[5]),B[6]=Math.round(B[6]),B[7]=Math.round(B[7])}this.onRunEnd(s)}});h.exports=i},84547:h=>{h.exports=["vec4 applyLighting (vec4 fragColor, vec3 normal)","{"," vec4 lighting = getLighting(fragColor, normal);"," return fragColor * vec4(lighting.rgb * lighting.a, lighting.a);","}"].join(`
|
||
`)},11104:h=>{h.exports=["vec4 applyTint(vec4 texture)","{"," 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;"," }"," return color;","}"].join(`
|
||
`)},81556:h=>{h.exports=["vec4 boundedSampler(sampler2D sampler, vec2 uv)","{"," if (clamp(uv, 0.0, 1.0) != uv)"," {"," return vec4(0.0, 0.0, 0.0, 0.0);"," }"," return texture2D(sampler, uv);","}"].join(`
|
||
`)},96293:h=>{h.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];"," c.rgb *= c.a;"," result.rgb *= result.a;"," gl_FragColor = mix(c, result, uAlpha);","}"].join(`
|
||
`)},78390:h=>{h.exports=["vec2 v2len (vec2 a, vec2 b)","{"," return sqrt(a*a+b*b);","}","vec2 getBlockyTexCoord (vec2 texCoord, vec2 texRes) {"," texCoord *= texRes;"," vec2 seam = floor(texCoord + 0.5);"," texCoord = (texCoord - seam) / v2len(dFdx(texCoord), dFdy(texCoord)) + seam;"," texCoord = clamp(texCoord, seam-.5, seam+.5);"," return texCoord / texRes;","}"].join(`
|
||
`)},11719:h=>{h.exports=["struct Light","{"," vec3 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = LIGHT_COUNT;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform int uLightCount;","#ifdef FEATURE_SELFSHADOW","uniform float uDiffuseFlatThreshold;","uniform float uPenumbra;","#endif","vec4 getLighting (vec4 fragColor, vec3 normal)","{"," vec3 finalColor = vec3(0.0);"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," #ifdef FEATURE_SELFSHADOW"," vec3 unpremultipliedColor = fragColor.rgb / fragColor.a;"," float occlusionThreshold = 1.0 - ((unpremultipliedColor.r + unpremultipliedColor.g + unpremultipliedColor.b) / uDiffuseFlatThreshold);"," #endif"," 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), light.position.z / res.x);"," 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);"," #ifdef FEATURE_SELFSHADOW"," float occluded = smoothstep(0.0, 1.0, (diffuseFactor - occlusionThreshold) / uPenumbra);"," vec3 diffuse = light.color * diffuseFactor * occluded;"," #else"," vec3 diffuse = light.color * diffuseFactor;"," #endif"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," return colorOutput;","}"].join(`
|
||
`)},14030:h=>{h.exports=["vec2 clampTexCoordWithinFrame (vec2 texCoord)","{"," vec2 texRes = getTexRes();"," vec4 frameTexel = outFrame * texRes.xyxy;"," vec2 frameMin = frameTexel.xy + vec2(0.5, 0.5);"," vec2 frameMax = frameTexel.xy + frameTexel.zw - vec2(0.5, 0.5);"," return clamp(texCoord, frameMin / texRes, frameMax / texRes);","}"].join(`
|
||
`)},10235:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = boundedSampler(uMainSampler, texCoord);","}"].join(`
|
||
`)},65980:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uMainSampler2;","uniform float amount;","uniform vec4 color;","varying vec2 outTexCoord;","vec4 NORMAL (vec4 base, vec4 blend)","{"," return blend + base * (1.0 - blend.a);","}","vec4 ADD (vec4 base, vec4 blend)","{"," return base + blend;","}","vec4 MULTIPLY (vec4 base, vec4 blend)","{"," return base * blend;","}","vec4 SCREEN (vec4 base, vec4 blend)","{"," return 1.0 - (1.0 - base) * (1.0 - blend);","}","float overlayChannel (float base, float blend)","{"," return base < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);","}","vec4 OVERLAY (vec4 base, vec4 blend)","{"," return vec4("," overlayChannel(base.r, blend.r),"," overlayChannel(base.g, blend.g),"," overlayChannel(base.b, blend.b),"," overlayChannel(base.a, blend.a)"," );","}","vec4 DARKEN (vec4 base, vec4 blend)","{"," return min(base, blend);","}","vec4 LIGHTEN (vec4 base, vec4 blend)","{"," return max(base, blend);","}","float dodgeChannel (float base, float blend)","{"," return blend == 1.0 ? blend : min(1.0, base / (1.0 - blend));","}","vec4 COLOR_DODGE (vec4 base, vec4 blend)","{"," return vec4("," dodgeChannel(base.r, blend.r),"," dodgeChannel(base.g, blend.g),"," dodgeChannel(base.b, blend.b),"," dodgeChannel(base.a, blend.a)"," );","}","float burnChannel (float base, float blend)","{"," return blend == 0.0 ? blend : 1.0 - min(1.0, (1.0 - base) / blend);","}","vec4 COLOR_BURN (vec4 base, vec4 blend)","{"," return vec4("," burnChannel(base.r, blend.r),"," burnChannel(base.g, blend.g),"," burnChannel(base.b, blend.b),"," burnChannel(base.a, blend.a)"," );","}","float hardLightChannel (float base, float blend)","{"," return blend < 0.5 ? 2.0 * base * blend : 1.0 - 2.0 * (1.0 - base) * (1.0 - blend);","}","vec4 HARD_LIGHT (vec4 base, vec4 blend)","{"," return vec4("," hardLightChannel(base.r, blend.r),"," hardLightChannel(base.g, blend.g),"," hardLightChannel(base.b, blend.b),"," hardLightChannel(base.a, blend.a)"," );","}","float softLightChannel (float base, float blend)","{"," return blend < 0.5 ? (2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend));","}","vec4 SOFT_LIGHT (vec4 base, vec4 blend)","{"," return vec4("," softLightChannel(base.r, blend.r),"," softLightChannel(base.g, blend.g),"," softLightChannel(base.b, blend.b),"," softLightChannel(base.a, blend.a)"," );","}","vec4 DIFFERENCE (vec4 base, vec4 blend)","{"," return abs(base - blend);","}","vec4 EXCLUSION (vec4 base, vec4 blend)","{"," return base + blend - 2.0 * base * blend;","}","vec3 rgbToHsl (vec3 color)","{"," vec3 hsl = vec3(0.0);"," float fmin = min(min(color.r, color.g), color.b);"," float fmax = max(max(color.r, color.g), color.b);"," float delta = fmax - fmin;"," hsl.z = (fmax + fmin) / 2.0;"," if (delta == 0.0)"," {"," hsl.x = 0.0;"," hsl.y = 0.0;"," }"," else"," {"," if (hsl.z < 0.5)"," {"," hsl.y = delta / (fmax + fmin);"," }"," else"," {"," hsl.y = delta / (2.0 - fmax - fmin);"," }"," float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta;"," float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta;"," float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta;"," if (color.r == fmax)"," {"," hsl.x = deltaB - deltaG;"," }"," else if (color.g == fmax)"," {"," hsl.x = (1.0 / 3.0) + deltaR - deltaB;"," }"," else if (color.b == fmax)"," {"," hsl.x = (2.0 / 3.0) + deltaG - deltaR;"," }"," if (hsl.x < 0.0)"," {"," hsl.x += 1.0;"," }"," else if (hsl.x > 1.0)"," {"," hsl.x -= 1.0;"," }"," }"," return hsl;","}","vec3 hslToRgb (vec3 hsl)","{"," float p = hsl.z * (1.0 - hsl.y);"," float q = hsl.z * (1.0 - hsl.y * hsl.x);"," float t = hsl.z * (1.0 - hsl.y * (1.0 - hsl.x));"," if (hsl.x < 1.0 / 6.0)"," {"," return vec3(hsl.z, t, p);"," }"," else if (hsl.x < 0.5)"," {"," return vec3(q, hsl.z, p);"," }"," else if (hsl.x < 2.0 / 3.0)"," {"," return vec3(p, hsl.z, t);"," }"," return vec3(p, q, hsl.z);","}","vec4 HUE (vec4 base, vec4 blend)","{"," vec3 baseHSL = rgbToHsl(base.rgb);"," vec3 blendHSL = rgbToHsl(blend.rgb);"," return vec4(hslToRgb(vec3(blendHSL.x, baseHSL.y, baseHSL.z)), base.a);","}","vec4 SATURATION (vec4 base, vec4 blend)","{"," vec3 baseHSL = rgbToHsl(base.rgb);"," vec3 blendHSL = rgbToHsl(blend.rgb);"," return vec4(hslToRgb(vec3(baseHSL.x, blendHSL.y, baseHSL.z)), base.a);","}","vec4 COLOR (vec4 base, vec4 blend)","{"," vec3 baseHSL = rgbToHsl(base.rgb);"," vec3 blendHSL = rgbToHsl(blend.rgb);"," return vec4(hslToRgb(vec3(blendHSL.x, blendHSL.y, baseHSL.z)), base.a);","}","vec4 LUMINOSITY (vec4 base, vec4 blend)","{"," vec3 baseHSL = rgbToHsl(base.rgb);"," vec3 blendHSL = rgbToHsl(blend.rgb);"," return vec4(hslToRgb(vec3(baseHSL.x, baseHSL.y, blendHSL.z)), base.a);","}","vec4 ERASE (vec4 base, vec4 blend)","{"," return base * (1.0 - blend.a);","}","vec4 SOURCE_IN (vec4 base, vec4 blend)","{"," return blend * base.a;","}","vec4 SOURCE_OUT (vec4 base, vec4 blend)","{"," return blend * (1.0 - base.a);","}","vec4 SOURCE_ATOP (vec4 base, vec4 blend)","{"," return base * (1.0 - blend.a) + blend * base.a;","}","vec4 DESTINATION_OVER (vec4 base, vec4 blend)","{"," return base + blend * (1.0 - base.a);","}","vec4 DESTINATION_IN (vec4 base, vec4 blend)","{"," return base * blend.a;","}","vec4 DESTINATION_OUT (vec4 base, vec4 blend)","{"," return base * (1.0 - blend.a);","}","vec4 DESTINATION_ATOP (vec4 base, vec4 blend)","{"," return base * blend.a + blend * (1.0 - base.a);","}","vec4 LIGHTER (vec4 base, vec4 blend)","{"," return ADD(base, blend);","}","vec4 COPY (vec4 base, vec4 blend)","{"," return blend;","}","vec4 XOR (vec4 base, vec4 blend)","{"," return base * (1.0 - blend.a) + blend * (1.0 - base.a);","}","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec4 base = boundedSampler(uMainSampler, outTexCoord);"," vec4 blend = boundedSampler(uMainSampler2, outTexCoord) * color;"," vec4 blended = BLEND(base, blend);"," gl_FragColor = mix(base, blended, amount);","}"].join(`
|
||
`)},5899:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec4 uSizeAndOffset;","varying vec2 outTexCoord;","void main()","{"," vec2 gridCell = floor((outTexCoord * resolution + uSizeAndOffset.zw) / uSizeAndOffset.xy) * uSizeAndOffset.xy - uSizeAndOffset.zw;"," vec2 texCoord = gridCell / resolution;"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(`
|
||
`)},20784:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","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 += boundedSampler(uMainSampler, uv) * 0.1964825501511404;"," col += boundedSampler(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += boundedSampler(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += boundedSampler(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += boundedSampler(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += boundedSampler(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += boundedSampler(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
||
`)},65122:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += boundedSampler(uMainSampler, uv) * 0.29411764705882354;"," col += boundedSampler(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += boundedSampler(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
||
`)},60942:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","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 += boundedSampler(uMainSampler, uv) * 0.2270270270;"," col += boundedSampler(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += boundedSampler(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += boundedSampler(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += boundedSampler(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(`
|
||
`)},43722:h=>{h.exports=["#pragma phaserTemplate(shaderName)","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;","}","#pragma phaserTemplate(fragmentHeader)","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 = boundedSampler(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(`
|
||
`)},19883:h=>{h.exports=["#pragma phaserTemplate(shaderName)","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(`
|
||
`)},12886:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rg) * amount;"," gl_FragColor = boundedSampler(uMainSampler, outTexCoord + disp).rgba;","}"].join(`
|
||
`)},33016:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#define DISTANCE 10.0","#define QUALITY 10.0","#pragma phaserTemplate(fragmentDefine)","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform float scale;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float MAX_ALPHA = DISTANCE * (DISTANCE + 1.0) * QUALITY / 2.0;","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y) * scale;"," float totalAlpha = 0.0;"," float curAngle = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float curDistance = 0.0; curDistance < DISTANCE; curDistance++)"," {"," curAngle += fract(sin(dot(vec2(curDistance, outTexCoord.x + outTexCoord.y), vec2(12.9898, 78.233))) * 43758.5453);"," for (float i = 0.0; i < QUALITY; i++)"," {"," curAngle += PI * 2.0 / (QUALITY);"," direction = vec2(cos(curAngle), sin(curAngle)) * px;"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = boundedSampler(uMainSampler, displaced);"," totalAlpha += (DISTANCE - curDistance) * color.a;"," }"," }"," color = boundedSampler(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);"," if (knockout)"," {"," float resultAlpha = outerGlowStrength + innerGlowStrength;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(`
|
||
`)},39603:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool invert;","varying vec2 outTexCoord;","void main ()","{"," vec4 color = texture2D(uMainSampler, outTexCoord);"," vec4 mask = texture2D(uMaskSampler, outTexCoord);"," float a = mask.a;"," color *= invert ? (1.0 - a) : a;"," gl_FragColor = color;","}"].join(`
|
||
`)},99191:h=>{h.exports=["#pragma phaserTemplate(shaderName)","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(`
|
||
`)},69355:h=>{h.exports=["#pragma phaserTemplate(shaderName)","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;","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec4 texture = boundedSampler(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 += boundedSampler(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, clamp(shadow * mask, 0.0, 1.0));","}"].join(`
|
||
`)},92636:h=>{h.exports=["#pragma phaserTemplate(shaderName)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 edge1;","uniform vec4 edge2;","uniform vec4 invert;","varying vec2 outTexCoord;","void main ()","{"," vec4 color = texture2D(uMainSampler, outTexCoord);"," color = clamp((color - edge1) / (edge2 - edge1), 0.0, 1.0);"," color = mix(color, 1.0 - color, invert);"," gl_FragColor = color;","}"].join(`
|
||
`)},73416:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec4 fragColor = outTint;"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},91627:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec4 inTint;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTint = vec4(inTint.bgr * inTint.a, inTint.a);"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},84220:h=>{h.exports=["vec3 getNormalFromMap (vec2 texCoord)","{"," vec3 normalMap = texture2D(uNormSampler, texCoord).rgb;"," return normalize(outInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));","}"].join(`
|
||
`)},2860:h=>{h.exports=["uniform vec2 uMainResolution[TEXTURE_COUNT];","vec2 getTexRes ()","{"," #if TEXTURE_COUNT == 1"," float texId = 0.0;"," #else"," float texId = outTexDatum;"," #endif"," #pragma phaserTemplate(texIdProcess)"," vec2 texRes = vec2(0.0);"," for (int i = 0; i < TEXTURE_COUNT; i++)"," {"," if (texId == float(i))"," {"," texRes = uMainResolution[i];"," break;"," }"," }"," return texRes;","}"].join(`
|
||
`)},46432:h=>{h.exports=["uniform sampler2D uMainSampler[TEXTURE_COUNT];","vec4 getTexture (vec2 texCoord)","{"," #if TEXTURE_COUNT == 1"," return texture2D(uMainSampler[0], texCoord);"," #else"," if (outTexDatum == 0.0) return texture2D(uMainSampler[0], texCoord);"," #define ELSE_TEX_CASE(INDEX) else if (outTexDatum == float(INDEX)) return texture2D(uMainSampler[INDEX], texCoord);"," #pragma phaserTemplate(texIdProcess)"," else return vec4(0.0, 0.0, 0.0, 0.0);"," #endif","}"].join(`
|
||
`)},98840:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","varying vec2 outTexCoord;","varying float outTexDatum;","varying float outTintEffect;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},44667:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexDatum;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexDatum;","varying float outTintEffect;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexDatum = inTexDatum;"," outTint = inTint;"," outTintEffect = inTintEffect;"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},62807:h=>{h.exports=["float inverseRotation = -rotation - uCamera.z;","float irSine = sin(inverseRotation);","float irCosine = cos(inverseRotation);","outInverseRotationMatrix = mat3("," irCosine, irSine, 0.0,"," -irSine, irCosine, 0.0,"," 0.0, 0.0, 1.0",");"].join(`
|
||
`)},4127:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","precision mediump float;","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","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;"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(`
|
||
`)},89924:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","precision mediump float;","#pragma phaserTemplate(vertexDefine)","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;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","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);"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},72823:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(fragmentDefine)","varying vec2 outTexCoord;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," vec4 fragColor = vec4(outTexCoord.xyx, 1.0);"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},65884:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outTexCoord;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},2807:h=>{h.exports=["#pragma phaserTemplate(shaderName)","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(`
|
||
`)},49119:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(fragmentHeader)","void main ()","{"," #pragma phaserTemplate(fragmentProcess)"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},3524:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#define ROUND_BIAS 0.5001","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","uniform mat3 uViewMatrix;","uniform vec3 uCameraScrollAndAlpha;","uniform int uRoundPixels;","uniform vec2 uResolution;","uniform float uTime;","uniform vec2 uDiffuseResolution;","uniform vec2 uFrameDataResolution;","uniform sampler2D uFrameDataTexture;","uniform float uGravity;","attribute float inVertex;","attribute vec4 inPositionX;","attribute vec4 inPositionY;","attribute vec4 inRotation;","attribute vec4 inScaleX;","attribute vec4 inScaleY;","attribute vec4 inAlpha;","attribute vec4 inFrame;","attribute vec4 inTintBlend;","attribute vec4 inTintTL;","attribute vec4 inTintTR;","attribute vec4 inTintBL;","attribute vec4 inTintBR;","attribute vec4 inOriginAndTintFillAndCreationTime;","attribute vec2 inScrollFactor;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","const float PI = 3.14159265359;","const float HALF_PI = PI / 2.0;","const float BOUNCE_OVERSHOOT = 1.70158;","const float BOUNCE_OVERSHOOT_PLUS = BOUNCE_OVERSHOOT + 1.0;","const float BOUNCE_OVERSHOOT_IN_OUT = BOUNCE_OVERSHOOT * 1.525;","const float BOUNCE_OVERSHOOT_IN_OUT_PLUS = BOUNCE_OVERSHOOT_IN_OUT + 1.0;","float animate (vec4 anim)","{"," float value = anim.x;"," float a = anim.y;"," float b = abs(anim.z);"," float c = abs(anim.w);"," bool yoyo = anim.z < 0.0;"," bool loop = anim.w > 0.0;"," int type = int(floor(c));"," if (type == 0|| b == 0.0)"," {"," return value;"," }"," float duration = b;"," float delay = mod(c, 1.0) * 2.0;"," float rawTime = ((uTime - inOriginAndTintFillAndCreationTime.w) / duration) - delay;"," float time = mod(rawTime, 1.0);"," if (yoyo && (mod(rawTime, 2.0) >= 1.0))"," {"," time = 1.0 - time;"," }"," float repeats = loop ? 0.0 : floor(a);"," float timeContinuous = loop ? time : rawTime;"," #ifdef FEATURE_LINEAR"," if (type == 1)"," {"," return value + a * timeContinuous;"," }"," #endif"," #ifdef FEATURE_GRAVITY"," if (type == 2)"," {"," float v = floor(a);"," float gravityFactor = (a - v) * 2.0 - 1.0;"," if (gravityFactor == 0.0)"," {"," gravityFactor = 1.0;"," }"," float seconds = timeContinuous * duration / 1000.0;"," float accel = uGravity * gravityFactor;"," return value + (v * seconds) + (0.5 * accel * seconds * seconds);"," }"," #endif"," #ifdef FEATURE_QUAD_EASEOUT"," if (type == 10)"," {"," return value + a * time * (2.0 - time)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUAD_EASEIN"," if (type == 11)"," {"," return value + a * time * time"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUAD_EASEINOUT"," if (type == 12)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * time * time * 0.5"," + repeats * a;"," }"," time -= 1.0;"," return value + a * -0.5 * (time * (time - 2.0) - 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CUBIC_EASEOUT"," if (type == 20)"," {"," time -= 1.0;"," return value + a * (time * time * time + 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CUBIC_EASEIN"," if (type == 21)"," {"," return value + a * time * time * time"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CUBIC_EASEINOUT"," if (type == 22)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * time * time * time * 0.5"," + repeats * a;"," }"," time -= 2.0;"," return value + a * 0.5 * (time * time * time + 2.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUART_EASEOUT"," if (type == 30)"," {"," time -= 1.0;"," return value + a * (1.0 - time * time * time * time)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUART_EASEIN"," if (type == 31)"," {"," return value + a * time * time * time * time"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUART_EASEINOUT"," if (type == 32)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * time * time * time * time * 0.5"," + repeats * a;"," }"," time -= 2.0;"," return value + a * -0.5 * (time * time * time * time - 2.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUINT_EASEOUT"," if (type == 40)"," {"," time -= 1.0;"," return value + a * (time * time * time * time * time + 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUINT_EASEIN"," if (type == 41)"," {"," return value + a * time * time * time * time * time"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_QUINT_EASEINOUT"," if (type == 42)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * time * time * time * time * time * 0.5"," + repeats * a;"," }"," time -= 2.0;"," return value + a * 0.5 * (time * time * time * time * time + 2.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SINE_EASEOUT"," if (type == 50)"," {"," return value + a * sin(time * HALF_PI)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SINE_EASEIN"," if (type == 51)"," {"," return value + a * (1.0 - cos(time * HALF_PI))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SINE_EASEINOUT"," if (type == 52)"," {"," return value + a * 0.5 * (1.0 - cos(PI * time))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_EXPO_EASEOUT"," if (type == 60)"," {"," return value + a * (1.0 - pow(2.0, -10.0 * time))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_EXPO_EASEIN"," if (type == 61)"," {"," return value + a * pow(2.0, 10.0 * (time - 1.0) - 0.001)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_EXPO_EASEINOUT"," if (type == 62)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * 0.5 * pow(2.0, 10.0 * (time - 1.0))"," + repeats * a;"," }"," time -= 1.0;"," return value + a * 0.5 * (2.0 - pow(2.0, -10.0 * (time - 1.0)))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CIRC_EASEOUT"," if (type == 70)"," {"," time -= 1.0;"," return value + a * sqrt(1.0 - time * time)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CIRC_EASEIN"," if (type == 71)"," {"," return value + a * (1.0 - sqrt(1.0 - time * time))"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_CIRC_EASEINOUT"," if (type == 72)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * -0.5 * (sqrt(1.0 - time * time) - 1.0)"," + repeats * a;"," }"," time -= 2.0;"," return value + a * 0.5 * (sqrt(1.0 - time * time) + 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_BACK_EASEOUT"," if (type == 90)"," {"," time -= 1.0;"," return value + a * (time * time * (BOUNCE_OVERSHOOT_PLUS * time + BOUNCE_OVERSHOOT) + 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_BACK_EASEIN"," if (type == 91)"," {"," return value + a * time * time * (BOUNCE_OVERSHOOT_PLUS * time - BOUNCE_OVERSHOOT)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_BACK_EASEINOUT"," if (type == 92)"," {"," time *= 2.0;"," if (time < 1.0)"," {"," return value + a * 0.5 * (time * time * (BOUNCE_OVERSHOOT_IN_OUT_PLUS * time - BOUNCE_OVERSHOOT_IN_OUT))"," + repeats * a;"," }"," time -= 2.0;"," return value + a * 0.5 * (time * time * (BOUNCE_OVERSHOOT_IN_OUT_PLUS * time + BOUNCE_OVERSHOOT_IN_OUT) + 2.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_BOUNCE_EASEOUT"," if (type == 100)"," {"," if (time < 1.0 / 2.75)"," {"," return value + a * (7.5625 * time * time)"," + repeats * a;"," }"," else if (time < 2.0 / 2.75)"," {"," time -= 1.5 / 2.75;"," return value + a * (7.5625 * time * time + 0.75)"," + repeats * a;"," }"," else if (time < 2.5 / 2.75)"," {"," time -= 2.25 / 2.75;"," return value + a * (7.5625 * time * time + 0.9375)"," + repeats * a;"," }"," else"," {"," time -= 2.625 / 2.75;"," return value + a * (7.5625 * time * time + 0.984375)"," + repeats * a;"," }"," }"," #endif"," #ifdef FEATURE_BOUNCE_EASEIN"," if (type == 101)"," {"," time = 1.0 - time;"," if (time < 1.0 / 2.75)"," {"," return value + a * (1.0 - 7.5625 * time * time)"," + repeats * a;"," }"," else if (time < 2.0 / 2.75)"," {"," time -= 1.5 / 2.75;"," return value + a * (1.0 - (7.5625 * time * time + 0.75))"," + repeats * a;"," }"," else if (time < 2.5 / 2.75)"," {"," time -= 2.25 / 2.75;"," return value + a * (1.0 - (7.5625 * time * time + 0.9375))"," + repeats * a;"," }"," else"," {"," time -= 2.625 / 2.75;"," return value + a * (1.0 - (7.5625 * time * time + 0.984375))"," + repeats * a;"," }"," }"," #endif"," #ifdef FEATURE_BOUNCE_EASEINOUT"," if (type == 102)"," {"," bool reverse = false;"," if (time < 0.5)"," {"," time = 1.0 - time * 2.0;"," reverse = true;"," }"," if (time < 1.0 / 2.75)"," {"," time = 7.5625 * time * time;"," }"," else if (time < 2.0 / 2.75)"," {"," time -= 1.5 / 2.75;"," time = 7.5625 * time * time + 0.75;"," }"," else if (time < 2.5 / 2.75)"," {"," time -= 2.25 / 2.75;"," time = 7.5625 * time * time + 0.9375;"," }"," else"," {"," time -= 2.625 / 2.75;"," time = 7.5625 * time * time + 0.984375;"," }"," if (reverse)"," {"," return value + a * (1.0 - time) * 0.5"," + repeats * a;"," }"," return value + a * time * 0.5 + 0.5"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_STEPPED"," if (type == 110)"," {"," return value + a * floor(time + 0.5)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SMOOTHSTEP_EASEOUT"," if (type == 120)"," {"," return value + a * (smoothstep(0.0, 1.0, time / 2.0 + 0.5) * 2.0 - 1.0)"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SMOOTHSTEP_EASEIN"," if (type == 121)"," {"," return value + a * smoothstep(0.0, 1.0, time / 2.0) * 2.0"," + repeats * a;"," }"," #endif"," #ifdef FEATURE_SMOOTHSTEP_EASEINOUT"," if (type == 122)"," {"," return value + a * smoothstep(0.0, 1.0, time)"," + repeats * a;"," }"," #endif"," return value;","}","struct Frame {"," vec2 position;"," vec2 size;"," vec2 offset;","};","Frame getFrame (float frame)","{"," float index1 = floor(frame) * 3.0;"," float index2 = index1 + 1.0;"," float index3 = index1 + 2.0;"," float width = uFrameDataResolution.x;"," float x = mod(index1, width);"," float y = floor(index1 / width);"," vec4 texelUV = texture2D("," uFrameDataTexture,"," vec2(x + 0.5, y + 0.5) / uFrameDataResolution"," );"," x = mod(index2, width);"," y = floor(index2 / width);"," vec4 texelWH = texture2D("," uFrameDataTexture,"," vec2(x + 0.5, y + 0.5) / uFrameDataResolution"," );"," x = mod(index3, width);"," y = floor(index3 / width);"," vec4 texelOrigin = texture2D("," uFrameDataTexture,"," vec2(x + 0.5, y + 0.5) / uFrameDataResolution"," );"," return Frame("," vec2("," texelUV.r + texelUV.g * 256.0,"," texelUV.b + texelUV.a * 256.0"," ) * 255.0,"," vec2("," texelWH.r + texelWH.g * 256.0,"," texelWH.b + texelWH.a * 256.0"," ) * 255.0,"," vec2("," texelOrigin.r + texelOrigin.g * 256.0,"," texelOrigin.b + texelOrigin.a * 256.0"," ) * 255.0 - 32768.0"," );","}","void main ()","{"," float positionX = animate(inPositionX);"," float positionY = animate(inPositionY);"," float rotation = animate(inRotation);"," float scaleX = animate(inScaleX);"," float scaleY = animate(inScaleY);"," float frame = animate(inFrame);"," float tintBlend = animate(inTintBlend);"," float alpha = animate(inAlpha);"," vec2 origin = inOriginAndTintFillAndCreationTime.xy;"," float tintFill = inOriginAndTintFillAndCreationTime.z;"," float scrollFactorX = inScrollFactor.x;"," float scrollFactorY = inScrollFactor.y;"," Frame frameData = getFrame(frame);"," vec2 uv = frameData.position / uDiffuseResolution;"," vec2 wh = frameData.size / uDiffuseResolution;"," float u = uv.s;"," float v = uv.t;"," float w = wh.s;"," float h = wh.t;"," float width = frameData.size.s;"," float height = frameData.size.t;"," vec4 tint = inTintTL;"," float x = -origin.x;"," float y = -origin.y;"," if (inVertex == 0.0)"," {"," y = 1.0 - origin.y;"," v += h;"," tint = inTintBL;"," }"," else if (inVertex == 2.0)"," {"," x = 1.0 - origin.x;"," y = 1.0 - origin.y;"," u += w;"," v += h;"," tint = inTintBR;"," }"," else if (inVertex == 3.0)"," {"," x = 1.0 - origin.x;"," u += w;"," tint = inTintTR;"," }"," vec3 position = vec3("," (x * width - frameData.offset.x) * scaleX,"," (y * height - frameData.offset.y) * scaleY,"," 1.0"," );"," mat3 viewMatrix = uViewMatrix * mat3("," 1.0, 0.0, 0.0,"," 0.0, 1.0, 0.0,"," uCameraScrollAndAlpha.x * (1.0 - scrollFactorX), uCameraScrollAndAlpha.y * (1.0 - scrollFactorY), 1.0"," );"," float sine = sin(rotation);"," float cosine = cos(rotation);"," mat3 transformMatrix = mat3("," cosine, sine, 0.0,"," -sine, cosine, 0.0,"," positionX, positionY, 1.0"," );"," position = viewMatrix * transformMatrix * position;"," alpha *= uCameraScrollAndAlpha.z;"," tint.a *= alpha;"," if (uRoundPixels == 1 && rotation == 0.0 && scaleX == 1.0 && scaleY == 1.0)"," {"," position.xy = floor(position.xy + ROUND_BIAS);"," }"," gl_Position = uProjectionMatrix * vec4(position.xy, 1.0, 1.0);"," outTexCoord = vec2(u, 1.0 - v);"," outTint = mix(vec4(1.0, 1.0, 1.0, tint.a), tint, tintBlend);"," outTintEffect = tintFill;"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},57532:h=>{h.exports=["#version 100","#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","/* Redefine MAX_ANIM_FRAMES to support animations with different frame numbers. */","#define MAX_ANIM_FRAMES 0","#pragma phaserTemplate(fragmentDefine)","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uLayerSampler;","uniform vec2 uMainResolution;","uniform vec2 uLayerResolution;","uniform float uTileColumns;","uniform vec4 uTileWidthHeightMarginSpacing;","uniform float uAlpha;","uniform float uTime;","#if MAX_ANIM_FRAMES > 0","uniform sampler2D uAnimSampler;","uniform vec2 uAnimResolution;","#endif","varying vec2 outTexCoord;","varying vec2 outTileStride;","#pragma phaserTemplate(outVariables)","vec2 getTexRes ()","{"," return uMainResolution;","}","float floatTexel (vec4 texel)","{"," return texel.r * 255.0 + (texel.g * 255.0 * 256.0) + (texel.b * 255.0 * 256.0 * 256.0) + (texel.a * 255.0 * 256.0 * 256.0 * 256.0);","}","struct Tile","{"," float index;"," vec2 uv; // In texels."," #if MAX_ANIM_FRAMES > 0"," bool animated;"," #endif"," bool empty;","};","Tile getLayerData (vec2 coord)","{"," vec2 texelCoord = coord * uLayerResolution;"," vec2 tile = floor(texelCoord);"," vec2 uv = fract(texelCoord);"," uv.y = 1.0 - uv.y;"," vec4 texel = texture2D(uLayerSampler, (tile + 0.5) / uLayerResolution) * 255.0;"," float flags = texel.a;"," /* Check for empty tile flag in bit 28. */"," if (flags == 16.0)"," {"," return Tile("," 0.0,"," vec2(0.0),"," #if MAX_ANIM_FRAMES > 0"," false,"," #endif"," true"," );"," }"," /* Bit 31 is flipX. */"," bool flipX = flags > 127.0;"," /* Bit 30 is flipY. */"," bool flipY = mod(flags, 128.0) > 63.0;"," #if MAX_ANIM_FRAMES > 0"," /* Bit 29 is animation. */"," bool animated = mod(flags, 64.0) > 31.0;"," #endif"," if (flipX)"," {"," uv.x = 1.0 - uv.x;"," }"," if (flipY)"," {"," uv.y = 1.0 - uv.y;"," }"," float index = texel.r + (texel.g * 256.0) + (texel.b * 256.0 * 256.0);"," return Tile("," index,"," uv * uTileWidthHeightMarginSpacing.xy,"," #if MAX_ANIM_FRAMES > 0"," animated,"," #endif"," false"," );","}","vec2 getFrameCorner (float index)","{"," float x = mod(index, uTileColumns);"," float y = floor(index / uTileColumns);"," vec2 xy = vec2(x, y);"," return xy * outTileStride + uTileWidthHeightMarginSpacing.zz;","}","#if MAX_ANIM_FRAMES > 0","float animationIndex (float index)","{"," float animTextureWidth = uAnimResolution.x;"," vec2 index2D = vec2(mod(index, animTextureWidth), floor(index / animTextureWidth));"," vec4 animDurationTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);"," index2D = vec2(mod(index + 1.0, animTextureWidth), floor((index + 1.0) / animTextureWidth));"," vec4 animIndexTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);"," float animDuration = floatTexel(animDurationTexel);"," float animIndex = floatTexel(animIndexTexel);"," float animTime = mod(uTime, animDuration);"," float animTimeAccum = 0.0;"," for (int i = 0; i < MAX_ANIM_FRAMES; i++)"," {"," index2D = vec2(mod(animIndex, animTextureWidth), floor(animIndex / animTextureWidth));"," animDurationTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);"," float frameDuration = floatTexel(animDurationTexel);"," animTimeAccum += frameDuration;"," if (animTime <= animTimeAccum)"," {"," break;"," }"," animIndex += 2.0;"," }"," animIndex += 1.0;"," index2D = vec2(mod(animIndex, animTextureWidth), floor(animIndex / animTextureWidth));"," animIndexTexel = texture2D(uAnimSampler, (index2D + 0.5) / uAnimResolution);"," float animFrameIndex = floatTexel(animIndexTexel);"," return animFrameIndex;","}","#endif","vec2 getTileTexelCoord (Tile tile)","{"," if (tile.empty)"," {"," return vec2(0.0);"," }"," float index = tile.index;"," #if MAX_ANIM_FRAMES > 0"," if (tile.animated)"," {"," index = animationIndex(index);"," }"," #endif"," vec2 frameCorner = getFrameCorner(index);"," return frameCorner + tile.uv;","}","#pragma phaserTemplate(fragmentHeader)","struct Samples {"," vec4 color;"," #pragma phaserTemplate(defineSamples)","};","Samples getColorSamples (vec2 texCoord)","{"," Samples samples;"," samples.color = texture2D("," uMainSampler,"," vec2(texCoord.x, 1.0 - texCoord.y)"," );"," #pragma phaserTemplate(getSamples)"," return samples;","}","Samples mixSamples (Samples samples1, Samples samples2, float alpha)","{"," Samples samples;"," samples.color = mix(samples1.color, samples2.color, alpha);"," #pragma phaserTemplate(mixSamples)"," return samples;","}","Samples getFinalSamples (Tile tile, vec2 layerTexCoord)","{"," vec2 texelCoord = getTileTexelCoord(tile);"," vec2 texCoord = texelCoord / uMainResolution;"," #pragma phaserTemplate(texCoord)"," #ifndef FEATURE_BORDERFILTER"," return getColorSamples(texCoord);"," #else"," #pragma phaserTemplate(finalSamples)"," vec2 wh = uTileWidthHeightMarginSpacing.xy;"," vec2 frameCorner = getFrameCorner(tile.index);"," vec2 frameCornerOpposite = frameCorner + wh;"," vec2 texCoordClamped = clamp(texCoord, (frameCorner + 0.5) / uMainResolution, (frameCornerOpposite - 0.5) / uMainResolution);"," vec2 dTexelCoord = (texCoord - texCoordClamped) * uMainResolution;"," dTexelCoord.y = -dTexelCoord.y;"," vec2 offsets = sign(dTexelCoord);"," Samples samples0 = getColorSamples(texCoordClamped);"," if (offsets.x == 0.0)"," {"," if (offsets.y == 0.0)"," {"," return samples0;"," }"," Tile tileY = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordY = getTileTexelCoord(tileY);"," vec2 texCoordY = texelCoordY / uMainResolution;"," Samples samplesY = getColorSamples(texCoordY);"," return mixSamples(samples0, samplesY, abs(dTexelCoord.y));"," }"," else"," {"," if (offsets.y == 0.0)"," {"," Tile tileX = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordX = getTileTexelCoord(tileX);"," vec2 texCoordX = texelCoordX / uMainResolution;"," Samples samplesX = getColorSamples(texCoordX);"," return mixSamples(samples0, samplesX, abs(dTexelCoord.x));"," }"," Tile tileX = getLayerData(layerTexCoord + (offsets * vec2(1.0, 0.0) - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordX = getTileTexelCoord(tileX);"," vec2 texCoordX = texelCoordX / uMainResolution;"," Samples samplesX = getColorSamples(texCoordX);"," Tile tileY = getLayerData(layerTexCoord + (offsets * vec2(0.0, 1.0) - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordY = getTileTexelCoord(tileY);"," vec2 texCoordY = texelCoordY / uMainResolution;"," Samples samplesY = getColorSamples(texCoordY);"," Tile tileXY = getLayerData(layerTexCoord + (offsets - dTexelCoord) / wh / uLayerResolution);"," vec2 texelCoordXY = getTileTexelCoord(tileXY);"," vec2 texCoordXY = texelCoordXY / uMainResolution;"," Samples samplesXY = getColorSamples(texCoordXY);"," Samples samples1 = mixSamples(samples0, samplesX, abs(dTexelCoord.x));"," Samples samples2 = mixSamples(samplesY, samplesXY, abs(dTexelCoord.x));"," return mixSamples(samples1, samples2, abs(dTexelCoord.y));"," }"," #endif","}","void main ()","{"," vec2 layerTexCoord = outTexCoord;"," Tile tile = getLayerData(layerTexCoord);"," Samples samples = getFinalSamples(tile, layerTexCoord);"," vec4 fragColor = samples.color;"," #pragma phaserTemplate(declareSamples)"," #pragma phaserTemplate(fragmentProcess)"," fragColor *= uAlpha;"," gl_FragColor = fragColor;","}"].join(`
|
||
`)},23879:h=>{h.exports=["#pragma phaserTemplate(shaderName)","#pragma phaserTemplate(extensions)","#pragma phaserTemplate(features)","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","#pragma phaserTemplate(vertexDefine)","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","uniform vec4 uTileWidthHeightMarginSpacing;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outTexCoord;","varying vec2 outTileStride;","#pragma phaserTemplate(outVariables)","#pragma phaserTemplate(vertexHeader)","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTileStride = uTileWidthHeightMarginSpacing.xy + uTileWidthHeightMarginSpacing.zz;"," #pragma phaserTemplate(vertexProcess)","}"].join(`
|
||
`)},84639:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return{name:t+"Anims",additions:{fragmentDefine:`#undef MAX_ANIM_FRAMES
|
||
#define MAX_ANIM_FRAMES `+t},tags:["MAXANIMS"],disable:!!e}};h.exports=d},67155:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(84547),l=function(i){return{name:"ApplyFlatLighting",additions:{fragmentHeader:e,fragmentProcess:"fragColor = applyLighting(fragColor, vec3(0.0, 0.0, 1.0));"},tags:["LIGHTING"],disable:!!i}};h.exports=l},81084:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(84547),l=function(i){return{name:"ApplyLighting",additions:{fragmentHeader:e,fragmentProcess:"fragColor = applyLighting(fragColor, normal);"},tags:["LIGHTING"],disable:!!i}};h.exports=l},44349:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(11104),l=function(i){return{name:"Tint",additions:{fragmentHeader:e,fragmentProcess:"fragColor = applyTint(fragColor);"},tags:["TINT"],disable:!!i}};h.exports=l},99501:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(81556),l=function(i){return{name:"BoundedSampler",additions:{fragmentHeader:e},disable:!!i}};h.exports=l},6184:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(11719),l=function(i){return{name:"DefineLights",additions:{fragmentDefine:"#define LIGHT_COUNT 1",fragmentHeader:e},tags:["LIGHTING"],disable:!!i}};h.exports=l},11653:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return{name:t+"TexCount",additions:{fragmentDefine:"#define TEXTURE_COUNT "+t},tags:["TexCount"],disable:!!e}};h.exports=d},13198:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return{name:"FlatNormal",additions:{fragmentProcess:"vec3 normal = vec3(0.0, 0.0, 1.0);"},tags:["LIGHTING"],disable:!!t}};h.exports=d},40829:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(84220),l=function(i){return{name:"NormalMap",additions:{fragmentHeader:e,fragmentProcess:"vec3 normal = getNormalFromMap(texCoord);"},tags:["LIGHTING"],disable:!!i}};h.exports=l},42792:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return{name:"TexCoordOut",additions:{fragmentProcess:`vec2 texCoord = outTexCoord;
|
||
#pragma phaserTemplate(texCoord)`},tags:["TEXCOORD"],disable:!!t}};h.exports=d},96049:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(2860),l=function(i){return{name:"GetTexRes",additions:{fragmentHeader:e},tags:["TEXRES"],disable:!!i}};h.exports=l},33997:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(46432),l=function(i,s){i===void 0&&(i=1);for(var r="",o=1;o<i;o++)r+="ELSE_TEX_CASE("+o+`)
|
||
`;var a=e.replace("#pragma phaserTemplate(texIdProcess)",r);return{name:"GetTexture"+i,additions:{fragmentHeader:a,fragmentProcess:"vec4 fragColor = getTexture(texCoord);"},tags:["TEXTURE"],disable:!!s}};h.exports=l},10455:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return{name:"OutFrame",additions:{vertexHeader:"attribute vec4 inFrame;",vertexProcess:"outFrame = inFrame;",outVariables:"varying vec4 outFrame;"},disable:!!t}};h.exports=d},79532:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62807),l=function(i){return{name:"OutInverseRotation",additions:{vertexHeader:"uniform vec4 uCamera;",vertexProcess:e,outVariables:"varying mat3 outInverseRotationMatrix;"},tags:["LIGHTING"],disable:!!i}};h.exports=l},65217:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return{name:"RotDatum",additions:{vertexProcess:"float rotation = inTexDatum;"},tags:["LIGHTING"],disable:!!t}};h.exports=d},747:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return{name:"SampleNormal",additions:{defineSamples:"vec4 normal;",getSamples:"samples.normal = texture2D(uNormSampler, texCoord);",mixSamples:"samples.normal = mix(samples1.normal, samples2.normal, alpha);",declareSamples:"vec3 normal = normalize(samples.normal.rgb * 2.0 - 1.0);"},tags:["LIGHTING"],disable:!!t}};h.exports=d},74505:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(78390),l=function(i){return{name:"SmoothPixelArt",additions:{extensions:"#extension GL_OES_standard_derivatives : enable",fragmentHeader:e,texCoord:"texCoord = getBlockyTexCoord(texCoord, getTexRes());"},disable:!!i}};h.exports=l},44832:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(14030),l=function(i){return{name:"TexCoordFrameClamp",additions:{fragmentHeader:e,texCoord:"texCoord = clampTexCoordWithinFrame(texCoord);"},disable:!!i}};h.exports=l},23295:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return{name:"TexCoordFrameWrap",additions:{texCoord:`// Wrap texture coordinate into the UV space of the texture frame.
|
||
texCoord = mod(texCoord, 1.0) * outFrame.zw + outFrame.xy;`},disable:!!t}};h.exports=d},83786:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={MakeAnimLength:t(84639),MakeApplyFlatLighting:t(67155),MakeApplyLighting:t(81084),MakeApplyTint:t(44349),MakeBoundedSampler:t(99501),MakeDefineLights:t(6184),MakeDefineTexCount:t(11653),MakeFlatNormal:t(13198),MakeGetNormalFromMap:t(40829),MakeGetTexCoordOut:t(42792),MakeGetTexRes:t(96049),MakeGetTexture:t(33997),MakeOutFrame:t(10455),MakeOutInverseRotation:t(79532),MakeRotationDatum:t(65217),MakeSampleNormal:t(747),MakeSmoothPixelArt:t(74505),MakeTexCoordFrameClamp:t(44832),MakeTexCoordFrameWrap:t(23295)}},89350:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@photonstorm.com>
|
||
* @copyright 2013-2023 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={ApplyLighting:t(84547),ApplyTint:t(11104),BoundedSampler:t(81556),ColorMatrixFrag:t(96293),DefineBlockyTexCoord:t(78390),DefineLights:t(11719),DefineTexCoordFrameClamp:t(14030),FilterBarrelFrag:t(10235),FilterBlendFrag:t(65980),FilterBlockyFrag:t(5899),FilterBlurHighFrag:t(20784),FilterBlurLowFrag:t(65122),FilterBlurMedFrag:t(60942),FilterBokehFrag:t(43722),FilterColorMatrixFrag:t(19883),FilterDisplacementFrag:t(12886),FilterGlowFrag:t(33016),FilterMaskFrag:t(39603),FilterPixelateFrag:t(99191),FilterShadowFrag:t(69355),FilterThresholdFrag:t(92636),FlatFrag:t(73416),FlatVert:t(91627),GetNormalFromMap:t(84220),GetTexRes:t(2860),GetTexture:t(46432),MultiFrag:t(98840),MultiVert:t(44667),OutInverseRotation:t(62807),PointLightFrag:t(4127),PointLightVert:t(89924),ShaderQuadFrag:t(72823),ShaderQuadVert:t(65884),SimpleTextureVert:t(2807),SpriteGPULayerFrag:t(49119),SpriteGPULayerVert:t(3524),TilemapGPULayerFrag:t(57532),TilemapGPULayerVert:t(23879)}},26128:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o,a){this.renderer=s,this.webGLBuffer=null,this.dataBuffer=r,this.viewF32=null,this.viewU8=new Uint8Array(r),this.viewU16=null,this.viewU32=null,this.bufferType=o,this.bufferUsage=a,this.createViews(),this.createResource()},createResource:function(){var i=this.renderer.gl,s=this.bufferType,r=i.createBuffer();this.webGLBuffer=r,this.bind(),i.bufferData(s,this.dataBuffer,this.bufferUsage),this.bind(!0)},bind:function(i){var s=this.renderer.gl,r=this.bufferType,o=i?null:this;r===s.ARRAY_BUFFER?this.renderer.glWrapper.updateBindingsArrayBuffer({bindings:{arrayBuffer:o}}):r===s.ELEMENT_ARRAY_BUFFER&&this.renderer.glWrapper.updateBindingsElementArrayBuffer({bindings:{elementArrayBuffer:o}})},update:function(i,s){var r=this.renderer.gl;this.bind(),s===void 0&&(s=0),i===void 0?r.bufferSubData(this.bufferType,s,this.dataBuffer):r.bufferSubData(this.bufferType,s,this.viewU8.subarray(s,s+i))},resize:function(i){var s=this.renderer.gl;this.dataBuffer=new ArrayBuffer(i),this.createViews(),this.bind(),s.bufferData(this.bufferType,this.dataBuffer,this.bufferUsage)},createViews:function(){var i=this.dataBuffer;this.viewF32=null,i.byteLength%Float32Array.BYTES_PER_ELEMENT===0&&(this.viewF32=new Float32Array(i)),this.viewU8=new Uint8Array(i),this.viewU16=null,i.byteLength%Uint16Array.BYTES_PER_ELEMENT===0&&(this.viewU16=new Uint16Array(i)),this.viewU32=null,i.byteLength%Uint32Array.BYTES_PER_ELEMENT===0&&(this.viewU32=new Uint32Array(i))},destroy:function(){this.renderer.gl.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.dataBuffer=null,this.viewF32=null,this.viewU8=null,this.viewU16=null,this.viewU32=null,this.renderer=null}});h.exports=l},84387:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},i=new e({initialize:function(r,o,a,u){var f=r.gl;if(this.webGLFramebuffer=null,this.renderer=r,this.useCanvas=!o||o.length===0,this.width=0,this.height=0,this.attachments=[],!this.useCanvas){for(var v=0;v<o.length;v++)if(this.attachments.push({texture:o[v],attachmentPoint:f.COLOR_ATTACHMENT0+v}),v===0)this.width=o[v].width,this.height=o[v].height;else if(o[v].width!==this.width||o[v].height!==this.height)throw new Error("Color attachments must have the same dimensions");u&&a?this.attachments.push({attachmentPoint:f.DEPTH_STENCIL_ATTACHMENT,internalFormat:f.DEPTH_STENCIL}):u?this.attachments.push({attachmentPoint:f.DEPTH_ATTACHMENT,internalFormat:f.DEPTH_COMPONENT16}):a&&this.attachments.push({attachmentPoint:f.STENCIL_ATTACHMENT,internalFormat:f.STENCIL_INDEX8})}this.renderTexture=null,this.attachments[0]&&(this.renderTexture=this.attachments[0].texture),this.createResource()},createResource:function(){if(!this.useCanvas){var s=this.renderer,r=s.glWrapper,o=s.gl;if(this.webGLFramebuffer){o.deleteFramebuffer(this.webGLFramebuffer);for(var a=0;a<this.attachments.length;a++){var u=this.attachments[a];u.texture||o.deleteRenderbuffer(u.renderbuffer)}}var f=o.createFramebuffer();for(this.webGLFramebuffer=f,r.updateBindingsFramebuffer({bindings:{framebuffer:this}},!0),a=0;a<this.attachments.length;a++){u=this.attachments[a];var v=u.attachmentPoint,c=u.texture;if(c)c.isRenderTexture=!0,o.framebufferTexture2D(o.FRAMEBUFFER,v,o.TEXTURE_2D,c.webGLTexture,0);else{var g=o.checkFramebufferStatus(o.FRAMEBUFFER);if(g!==o.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(l[g]||g));var p=o.createRenderbuffer();r.updateBindingsRenderbuffer({bindings:{renderbuffer:p}}),o.renderbufferStorage(o.RENDERBUFFER,u.internalFormat,this.width,this.height),o.framebufferRenderbuffer(o.FRAMEBUFFER,v,o.RENDERBUFFER,p),u.renderbuffer=p}}}},resize:function(s,r){this.useCanvas||(this.width=s,this.height=r,this.renderTexture.resize(s,r),this.createResource())},destroy:function(){if(this.renderer!==null){for(var s=this.renderer,r=s.gl,o=0;o<this.attachments.length;o++){var a=this.attachments[o];a.texture?(s.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:this}}),r.framebufferTexture2D(r.FRAMEBUFFER,a.attachmentPoint,r.TEXTURE_2D,null,0),s.deleteTexture(a.texture)):r.deleteRenderbuffer(a.renderbuffer)}r.deleteFramebuffer(this.webGLFramebuffer),s.glWrapper.updateBindingsFramebuffer({bindings:{framebuffer:null,renderbuffer:null}}),this.attachments.length=0,this.renderTexture=null,this.webGLFramebuffer=null,this.renderer=null}}});h.exports=i},37959:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(53314),i=new e({initialize:function(r){this.renderer=r,this.state=l.getDefault(r)},update:function(s,r,o){if(s===void 0){if(!r)return;s=this.state}r===void 0&&(r=!1),o===void 0&&(o=!1),s.vao!==void 0&&!o&&this.updateVAO(s,r),s.bindings!==void 0&&this.updateBindings(s,r),s.blend!==void 0&&this.updateBlend(s,r),s.colorClearValue!==void 0&&this.updateColorClearValue(s,r),s.colorWritemask!==void 0&&this.updateColorWritemask(s,r),s.cullFace!==void 0&&this.updateCullFace(s,r),s.depthTest!==void 0&&this.updateDepthTest(s,r),s.scissor!==void 0&&this.updateScissor(s,r),s.stencil!==void 0&&this.updateStencil(s,r),s.texturing!==void 0&&this.updateTexturing(s,r),s.viewport!==void 0&&this.updateViewport(s,r),s.vao!==void 0&&o&&this.updateVAO(s,r)},updateBindings:function(s,r){var o=s.bindings;o.activeTexture!==void 0&&this.updateBindingsActiveTexture(s,r),o.arrayBuffer!==void 0&&this.updateBindingsArrayBuffer(s,r),o.elementArrayBuffer!==void 0&&this.updateBindingsElementArrayBuffer(s,r),o.framebuffer!==void 0&&this.updateBindingsFramebuffer(s,r),o.program!==void 0&&this.updateBindingsProgram(s,r),o.renderbuffer!==void 0&&this.updateBindingsRenderbuffer(s,r)},updateBindingsActiveTexture:function(s,r){var o=s.bindings.activeTexture,a=o!==this.state.bindings.activeTexture;if(a&&(this.state.bindings.activeTexture=o),a||r){var u=this.renderer.gl;u.activeTexture(u.TEXTURE0+o)}},updateBindingsArrayBuffer:function(s,r){var o=s.bindings.arrayBuffer,a=this.renderer.gl;if(o!==null&&o.bufferType!==a.ARRAY_BUFFER)throw new Error("Invalid buffer type for ARRAY_BUFFER");var u=o!==this.state.bindings.arrayBuffer;if(u&&(this.state.bindings.arrayBuffer=o),u||r){var f=o?o.webGLBuffer:null;a.bindBuffer(a.ARRAY_BUFFER,f)}},updateBindingsElementArrayBuffer:function(s,r){var o=s.bindings.elementArrayBuffer,a=this.renderer.gl;if(o!==null&&o.bufferType!==a.ELEMENT_ARRAY_BUFFER)throw new Error("Invalid buffer type for ELEMENT_ARRAY_BUFFER");var u=o!==this.state.bindings.elementArrayBuffer;if(u&&(this.state.bindings.elementArrayBuffer=o),u||r){var f=o?o.webGLBuffer:null;a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f)}},updateBindingsFramebuffer:function(s,r){var o=s.bindings.framebuffer,a=o!==this.state.bindings.framebuffer;if(a&&(this.state.bindings.framebuffer=o),a||r){var u=this.renderer.gl,f=o?o.webGLFramebuffer:null;u.bindFramebuffer(u.FRAMEBUFFER,f)}},updateBindingsProgram:function(s,r){var o=s.bindings.program,a=o!==this.state.bindings.program;if(a&&(this.state.bindings.program=o),a||r){var u=o?o.webGLProgram:null;this.renderer.gl.useProgram(u)}},updateBindingsRenderbuffer:function(s,r){var o=s.bindings.renderbuffer,a=o!==this.state.bindings.renderbuffer;if(a&&(this.state.bindings.renderbuffer=o),a||r){var u=this.renderer.gl,f=o||null;u.bindRenderbuffer(u.RENDERBUFFER,f)}},updateBlend:function(s,r){var o=s.blend;o.enabled!==void 0&&this.updateBlendEnabled(s,r),o.color!==void 0&&this.updateBlendColor(s,r),o.equation!==void 0&&this.updateBlendEquation(s,r),o.func!==void 0&&this.updateBlendFunc(s,r)},updateBlendColor:function(s,r){var o=s.blend.color,a=o[0],u=o[1],f=o[2],v=o[3],c=a!==this.state.blend.color[0]||u!==this.state.blend.color[1]||f!==this.state.blend.color[2]||v!==this.state.blend.color[3];c&&(this.state.blend.color=[a,u,f,v]),(c||r)&&this.renderer.gl.blendColor(a,u,f,v)},updateBlendEnabled:function(s,r){var o=s.blend.enabled,a=o!==this.state.blend.enabled;if(a&&(this.state.blend.enabled=o),a||r){var u=this.renderer.gl;o?u.enable(u.BLEND):u.disable(u.BLEND)}},updateBlendEquation:function(s,r){var o=s.blend.equation,a=o[0]!==this.state.blend.equation[0]||o[1]!==this.state.blend.equation[1];a&&(this.state.blend.equation=[o[0],o[1]]),(a||r)&&this.renderer.gl.blendEquationSeparate(o[0],o[1])},updateBlendFunc:function(s,r){var o=s.blend.func,a=o[0]!==this.state.blend.func[0]||o[1]!==this.state.blend.func[1]||o[2]!==this.state.blend.func[2]||o[3]!==this.state.blend.func[3];a&&(this.state.blend.func=[o[0],o[1],o[2],o[3]]),(a||r)&&this.renderer.gl.blendFuncSeparate(o[0],o[1],o[2],o[3])},updateColorClearValue:function(s,r){var o=s.colorClearValue,a=o[0],u=o[1],f=o[2],v=o[3],c=a!==this.state.colorClearValue[0]||u!==this.state.colorClearValue[1]||f!==this.state.colorClearValue[2]||v!==this.state.colorClearValue[3];c&&(this.state.colorClearValue=[a,u,f,v]),(c||r)&&this.renderer.gl.clearColor(a,u,f,v)},updateColorWritemask:function(s,r){var o=s.colorWritemask,a=o[0],u=o[1],f=o[2],v=o[3],c=a!==this.state.colorWritemask[0]||u!==this.state.colorWritemask[1]||f!==this.state.colorWritemask[2]||v!==this.state.colorWritemask[3];c&&(this.state.colorWritemask=[a,u,f,v]),(c||r)&&this.renderer.gl.colorMask(a,u,f,v)},updateCullFace:function(s,r){var o=!!s.cullFace,a=o!==this.state.cullFace;if(a&&(this.state.cullFace=o),a||r){var u=this.renderer.gl;o?u.enable(u.CULL_FACE):u.disable(u.CULL_FACE)}},updateDepthTest:function(s,r){var o=!!s.depthTest,a=o!==this.state.depthTest;if(a&&(this.state.depthTest=o),a||r){var u=this.renderer.gl;o?u.enable(u.DEPTH_TEST):u.disable(u.DEPTH_TEST)}},updateScissor:function(s,r){var o=s.scissor;o.enable!==void 0&&this.updateScissorEnabled(s,r),o.box!==void 0&&this.updateScissorBox(s,r)},updateScissorEnabled:function(s,r){var o=s.scissor.enable,a=o!==this.state.scissor.enable;if(a&&(this.state.scissor.enable=o),a||r){var u=this.renderer.gl;o?u.enable(u.SCISSOR_TEST):u.disable(u.SCISSOR_TEST)}},updateScissorBox:function(s,r){var o=s.scissor.box,a=o[0],u=o[1],f=o[2],v=o[3],c=a!==this.state.scissor.box[0]||u!==this.state.scissor.box[1]||f!==this.state.scissor.box[2]||v!==this.state.scissor.box[3];c&&(this.state.scissor.box=[a,u,f,v]),(c||r)&&this.renderer.gl.scissor(a,u,f,v)},updateStencil:function(s,r){var o=s.stencil;o.clear!==void 0&&this.updateStencilClear(s,r),o.enabled!==void 0&&this.updateStencilEnabled(s,r),o.func!==void 0&&this.updateStencilFunc(s,r),o.op!==void 0&&this.updateStencilOp(s,r)},updateStencilClear:function(s,r){var o=s.stencil.clear,a=o!==this.state.stencil.clear;a&&(this.state.stencil.clear=o),(a||r)&&this.renderer.gl.clearStencil(o)},updateStencilEnabled:function(s,r){var o=s.stencil.enabled,a=o!==this.state.stencil.enabled;if(a&&(this.state.stencil.enabled=o),a||r){var u=this.renderer.gl;o?u.enable(u.STENCIL_TEST):u.disable(u.STENCIL_TEST)}},updateStencilFunc:function(s,r){var o=s.stencil.func,a=o.func!==this.state.stencil.func.func||o.ref!==this.state.stencil.func.ref||o.mask!==this.state.stencil.func.mask;if(a&&(this.state.stencil.func={func:o.func,ref:o.ref,mask:o.mask}),a||r){var u=this.renderer.gl;u.stencilFunc(o.func,o.ref,o.mask)}},updateStencilOp:function(s,r){var o=s.stencil.op,a=o.fail!==this.state.stencil.op.fail||o.zfail!==this.state.stencil.op.zfail||o.zpass!==this.state.stencil.op.zpass;if(a&&(this.state.stencil.op={fail:o.fail,zfail:o.zfail,zpass:o.zpass}),a||r){var u=this.renderer.gl;u.stencilOp(o.fail,o.zfail,o.zpass)}},updateTexturing:function(s,r){var o=s.texturing;o.flipY!==void 0&&this.updateTexturingFlipY(s,r),o.premultiplyAlpha!==void 0&&this.updateTexturingPremultiplyAlpha(s,r)},updateTexturingFlipY:function(s,r){var o=s.texturing.flipY,a=o!==this.state.texturing.flipY;if(a&&(this.state.texturing.flipY=o),a||r){var u=this.renderer.gl;u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,o)}},updateTexturingPremultiplyAlpha:function(s,r){var o=s.texturing.premultiplyAlpha,a=o!==this.state.texturing.premultiplyAlpha;if(a&&(this.state.texturing.premultiplyAlpha=o),a||r){var u=this.renderer.gl;u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o)}},updateVAO:function(s,r){var o=s.vao,a=o!==this.state.vao;if(a&&(this.state.vao=o),a||r){var u=this.renderer.gl;o?u.bindVertexArray(o.vertexArrayObject):u.bindVertexArray(null)}},updateViewport:function(s,r){var o=s.viewport,a=o[0],u=o[1],f=o[2],v=o[3],c=a!==this.state.viewport[0]||u!==this.state.viewport[1]||f!==this.state.viewport[2]||v!==this.state.viewport[3];c&&(this.state.viewport=[a,u,f,v]),(c||r)&&this.renderer.gl.viewport(a,u,f,v)}});h.exports=i},1482:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90330),l=t(83419);function i(r,o){return!(r===o||(Number.isNaN(r)||r===void 0)&&(Number.isNaN(o)||o===void 0))}var s=new l({initialize:function(o,a,u){this.renderer=o,this.webGLProgram=null,this.compiling=!1,this._compileStartTime=0,this.compileTimeMs=0,this.glState={bindings:{program:this}},this.vertexSource=a,this.fragmentSource=u,this._vertexShader=null,this._fragmentShader=null,this.glAttributes=[],this.glAttributeNames=new e,this.glAttributeBuffer=null,this.glUniforms=new e,this.uniformRequests=new e,this.createResource()},createResource:function(){var r=this.renderer,o=r.gl;if(this.glAttributeBuffer=null,!o.isContextLost()){this.compiling=!0,this._compileStartTime=performance.now(),r.glWrapper.state.bindings.program===this&&r.glWrapper.updateBindingsProgram({bindings:{program:null}});var a=o.createProgram();this.webGLProgram=a;var u=o.createShader(o.VERTEX_SHADER),f=o.createShader(o.FRAGMENT_SHADER);this._vertexShader=u,this._fragmentShader=f,o.shaderSource(u,this.vertexSource),o.shaderSource(f,this.fragmentSource),o.compileShader(u),o.compileShader(f),o.attachShader(a,u),o.attachShader(a,f),o.linkProgram(a),r.game.config.skipUnreadyShaders||this._completeProgram()}},checkParallelCompile:function(){var r=this.renderer,o=r.gl,a=r.parallelShaderCompileExtension;!a||!o.getProgramParameter(this.webGLProgram,a.COMPLETION_STATUS_KHR)||this._completeProgram()},_completeProgram:function(){var r=this.webGLProgram,o=this.renderer,a=o.gl,u=this._vertexShader,f=this._fragmentShader,v=`Shader failed:
|
||
`;if(!a.getProgramParameter(r,a.LINK_STATUS))throw a.getShaderParameter(u,a.COMPILE_STATUS)?a.getShaderParameter(f,a.COMPILE_STATUS)?(console.log(this.vertexSource,this.fragmentSource),new Error("Link Shader failed:"+a.getProgramInfoLog(r))):(console.log(this.fragmentSource),new Error("Fragment "+v+a.getShaderInfoLog(f))):(console.log(this.vertexSource),new Error("Vertex "+v+a.getShaderInfoLog(u)));this._setupAttributesAndUniforms(),this.compileTimeMs=performance.now()-this._compileStartTime,this.compiling=!1},_setupAttributesAndUniforms:function(){var r=this.webGLProgram,o=this.renderer,a=o.gl,u=this;this.glAttributeNames.clear(),this.glAttributes.length=0;for(var f=a.getProgramParameter(r,a.ACTIVE_ATTRIBUTES),v=0;v<f;v++){var c=a.getActiveAttrib(r,v),g=a.getAttribLocation(r,c.name);this.glAttributeNames.set(c.name,v),this.glAttributes[v]={location:g,name:c.name,size:c.size,type:c.type}}this.glUniforms.each(function(R,P){u.uniformRequests.has(R)||u.uniformRequests.set(R,P.value)}),this.glUniforms.clear();var p=a.getProgramParameter(r,a.ACTIVE_UNIFORMS);for(v=0;v<p;v++){var T=a.getActiveUniform(r,v),C=o.shaderSetters.constants[T.type],M=0,A=T.size*C.size;A>1&&(M=C.baseType===a.FLOAT?new Float32Array(A):new Int32Array(A)),this.glUniforms.set(T.name,{location:a.getUniformLocation(r,T.name),size:T.size,type:T.type,value:M})}},setUniform:function(r,o){this.uniformRequests.set(r,o)},bind:function(){this.renderer.glWrapper.updateBindingsProgram(this.glState),this.uniformRequests.each(this._processUniformRequest.bind(this)),this.uniformRequests.clear()},_processUniformRequest:function(r,o){var a=this.renderer,u=a.gl,f=this.glUniforms.get(r);if(f){var v=f.value;if(v.length){for(var c=!1,g=0;g<v.length;g++)i(v[g],o[g])&&(c=!0,v[g]=o[g]);if(!c)return}else{if(!i(v,o))return;v=o,f.value=o}var p=f.location,T=f.type,C=f.size,M=a.shaderSetters.constants[T];if(M.isMatrix)M.set.call(u,p,!1,v);else if(C>1)M.setV.call(u,p,v);else switch(M.size){case 1:M.set.call(u,p,o);break;case 2:M.set.call(u,p,o[0],o[1]);break;case 3:M.set.call(u,p,o[0],o[1],o[2]);break;case 4:M.set.call(u,p,o[0],o[1],o[2],o[3]);break}}},destroy:function(){if(this.webGLProgram){var r=this.renderer.gl;if(!r.isContextLost()){this._vertexShader&&r.deleteShader(this._vertexShader),this._fragmentShader&&r.deleteShader(this._fragmentShader),r.deleteProgram(this.webGLProgram);for(var o=0;o<this.glAttributes.length;o++)r.disableVertexAttribArray(this.glAttributes[o].location);this.glAttributes.length=0,this.glUniforms.clear()}this.glAttributeBuffer=null,this.glAttributeNames.clear(),this.uniformRequests.clear(),this._vertexShader=null,this._fragmentShader=null,this.webGLProgram=null,this.renderer=null}}});h.exports=s},86272:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s){var r=s.gl;this.constants={5124:{constant:r.INT,baseType:r.INT,size:1,bytes:4,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1},35667:{constant:r.INT_VEC2,baseType:r.INT,size:2,bytes:4,set:r.uniform2i,setV:r.uniform2iv,isMatrix:!1},35668:{constant:r.INT_VEC3,baseType:r.INT,size:3,bytes:4,set:r.uniform3i,setV:r.uniform3iv,isMatrix:!1},35669:{constant:r.INT_VEC4,baseType:r.INT,size:4,bytes:4,set:r.uniform4i,setV:r.uniform4iv,isMatrix:!1},5126:{constant:r.FLOAT,baseType:r.FLOAT,size:1,bytes:4,set:r.uniform1f,setV:r.uniform1fv,isMatrix:!1},35664:{constant:r.FLOAT_VEC2,baseType:r.FLOAT,size:2,bytes:4,set:r.uniform2f,setV:r.uniform2fv,isMatrix:!1},35665:{constant:r.FLOAT_VEC3,baseType:r.FLOAT,size:3,bytes:4,set:r.uniform3f,setV:r.uniform3fv,isMatrix:!1},35666:{constant:r.FLOAT_VEC4,baseType:r.FLOAT,size:4,bytes:4,set:r.uniform4f,setV:r.uniform4fv,isMatrix:!1},5125:{constant:r.UNSIGNED_INT,baseType:r.UNSIGNED_INT,size:1,bytes:4,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1},5120:{constant:r.BYTE,baseType:r.BYTE,size:1,bytes:1,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1},5121:{constant:r.UNSIGNED_BYTE,baseType:r.UNSIGNED_BYTE,size:1,bytes:1,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1},5122:{constant:r.SHORT,baseType:r.SHORT,size:1,bytes:2,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1},5123:{constant:r.UNSIGNED_SHORT,baseType:r.UNSIGNED_SHORT,size:1,bytes:2,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1},35670:{constant:r.BOOL,baseType:r.BOOL,size:1,bytes:4,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1},35671:{constant:r.BOOL_VEC2,baseType:r.BOOL,size:2,bytes:4,set:r.uniform2i,setV:r.uniform2iv,isMatrix:!1},35672:{constant:r.BOOL_VEC3,baseType:r.BOOL,size:3,bytes:4,set:r.uniform3i,setV:r.uniform3iv,isMatrix:!1},35673:{constant:r.BOOL_VEC4,baseType:r.BOOL,size:4,bytes:4,set:r.uniform4i,setV:r.uniform4iv,isMatrix:!1},35674:{constant:r.FLOAT_MAT2,baseType:r.FLOAT,size:4,bytes:4,set:r.uniformMatrix2fv,setV:r.uniformMatrix2fv,isMatrix:!0},35675:{constant:r.FLOAT_MAT3,baseType:r.FLOAT,size:9,bytes:4,set:r.uniformMatrix3fv,setV:r.uniformMatrix3fv,isMatrix:!0},35676:{constant:r.FLOAT_MAT4,baseType:r.FLOAT,size:16,bytes:4,set:r.uniformMatrix4fv,setV:r.uniformMatrix4fv,isMatrix:!0},35678:{constant:r.SAMPLER_2D,baseType:r.INT,size:1,bytes:4,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1},35680:{constant:r.SAMPLER_CUBE,baseType:r.INT,size:1,bytes:4,set:r.uniform1i,setV:r.uniform1iv,isMatrix:!1}}}});h.exports=l},13760:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s){this.renderer=s,this.units=[],this.unitIndices=[],this.init()},init:function(){var i=this.renderer.gl;this.units.length=0,this.unitIndices.length=0;for(var s=i.createTexture(),r=this.renderer.maxTextures-1;r>=0;r--)this.units[r]=void 0,this.renderer.glWrapper.updateBindingsActiveTexture({bindings:{activeTexture:r}}),i.bindTexture(i.TEXTURE_2D,s),this.unitIndices[r]=r;i.texImage2D(i.TEXTURE_2D,0,i.RGBA,1,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array([0,0,255,255]))},bind:function(i,s,r,o){var a=this.units[s]!==i;if((r||o!==!1||a)&&this.renderer.glWrapper.updateBindingsActiveTexture({bindings:{activeTexture:s}},r),!(!a&&!r)){this.units[s]=i;var u=i?i.webGLTexture:null,f=this.renderer.gl;f.bindTexture(f.TEXTURE_2D,u)}},bindUnits:function(i,s){for(var r=Math.min(i.length,this.renderer.maxTextures),o=r-1;o>=0;o--)i[o]!==void 0&&this.bind(i[o],o,s,!1)},unbindTexture:function(i){for(var s=this.units.length-1;s>=0;s--)this.units[s]===i&&this.bind(null,s,!0,!1)},unbindAllUnits:function(){for(var i=this.units.length-1;i>=0;i--)this.bind(null,i,!0,!1)}});h.exports=l},82751:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50030),i=new e({initialize:function(r,o,a,u,f,v,c,g,p,T,C,M,A){A===void 0&&(A=!0),this.renderer=r,this.webGLTexture=null,this.isRenderTexture=!1,this.mipLevel=o,this.minFilter=a,this.magFilter=u,this.wrapT=f,this.wrapS=v,this.format=c,this.pixels=g,this.width=p,this.height=T,this.pma=C??!0,this.forceSize=!!M,this.flipY=!!A,this.__SPECTOR_Metadata={},this.batchUnit=-1,this.createResource()},createResource:function(){var s=this.renderer.gl;if(!s.isContextLost()){if(this.pixels instanceof i){this.webGLTexture=this.pixels.webGLTexture;return}var r=s.createTexture();r.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=r,this._processTexture()}},resize:function(s,r){this.width===s&&this.height===r||(this.width=s,this.height=r,this._processTexture())},update:function(s,r,o,a,u,f,v,c,g){r===0||o===0||(this.pixels=s,this.width=r,this.height=o,this.flipY=a,this.wrapS=u,this.wrapT=f,this.minFilter=v,this.magFilter=c,this.format=g,this._processTexture())},_processTexture:function(){var s=this.renderer.gl;this.renderer.glTextureUnits.bind(this,0),this.renderer.glWrapper.updateTexturing({texturing:{flipY:this.flipY,premultiplyAlpha:this.pma}}),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,this.minFilter),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,this.magFilter),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,this.wrapS),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,this.wrapT);var r=this.pixels,o=this.mipLevel,a=this.width,u=this.height,f=this.format,v=!1;if(r==null)s.texImage2D(s.TEXTURE_2D,o,f,a,u,0,f,s.UNSIGNED_BYTE,null),v=l(a,u);else if(r.compressed){a=r.width,u=r.height,v=r.generateMipmap;for(var c=0;c<r.mipmaps.length;c++)s.compressedTexImage2D(s.TEXTURE_2D,c,r.internalFormat,r.mipmaps[c].width,r.mipmaps[c].height,0,r.mipmaps[c].data)}else r instanceof Uint8Array?(s.texImage2D(s.TEXTURE_2D,o,f,a,u,0,f,s.UNSIGNED_BYTE,r),v=l(a,u)):(this.forceSize||(a=r.width,u=r.height),s.texImage2D(s.TEXTURE_2D,o,f,f,s.UNSIGNED_BYTE,r),v=l(a,u));v&&s.generateMipmap(s.TEXTURE_2D)},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(s){this.__SPECTOR_Metadata=s,this.webGLTexture.__SPECTOR_Metadata=s}},destroy:function(){this.webGLTexture!==null&&(this.pixels instanceof i||this.renderer.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.renderer=null)}});h.exports=i},85788:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o,a){this.renderer=s,this.program=r,this.vertexArrayObject=null,this.indexBuffer=o,this.attributeBufferLayouts=a,this.glState={vao:this},this.createResource()},createResource:function(){var i=this.renderer.gl;this.vertexArrayObject=i.createVertexArray(),this.bind(),this.indexBuffer&&this.indexBuffer.bind();for(var s=this.program,r=s.glAttributes,o=s.glAttributeNames,a=0;a<this.attributeBufferLayouts.length;a++){var u=this.attributeBufferLayouts[a];u.buffer.bind();for(var f=u.layout.stride,v=u.layout.instanceDivisor,c=0;c<u.layout.layout.length;c++){var g=u.layout.layout[c],p=o.get(g.name);if(p!==void 0){var T=r[p];g.location=T.location;for(var C=g.location,M=g.bytes||4,A=g.columns||1,R=g.normalized,P=g.offset,L=g.size,F=g.type,w=0;w<A;w++)i.enableVertexAttribArray(C+w),i.vertexAttribPointer(C+w,L,F,R,f,P+M*w*L),isNaN(v)||i.vertexAttribDivisor(C+w,v)}}}this.renderer.glWrapper.updateVAO({vao:null}),this.renderer.glWrapper.updateBindings({bindings:{arrayBuffer:null,elementArrayBuffer:null}})},bind:function(){this.renderer.glWrapper.updateVAO(this.glState)},destroy:function(){var i=this.renderer.gl;this.vertexArrayObject&&(i.deleteVertexArray(this.vertexArrayObject),this.vertexArrayObject=null),this.indexBuffer=null,this.attributeBufferLayouts=null,this.glState=null,this.renderer=null}});h.exports=l},40952:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o){this.renderer=s,this.layout=r,this.completeLayout(r);var a=r.stride*r.count;if(o&&o.byteLength<a)throw new Error("Buffer too small for layout");this.buffer=o||s.createVertexBuffer(new ArrayBuffer(a),r.usage)},completeLayout:function(i){var s=this.renderer.gl,r=i.layout,o=this.renderer.shaderSetters.constants;typeof i.usage=="string"&&(i.usage=s[i.usage]);for(var a=0,u=0;u<r.length;u++){var f=r[u],v=f.size,c=f.columns||1;f.offset=a,typeof f.type=="string"&&(f.type=s[f.type]);var g=o[f.type],p=g.size,T=g.bytes;f.bytes=T,a+=v*c*T*p}i.stride=a}});h.exports=l},31884:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={WebGLGlobalWrapper:t(37959),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLShaderSetterWrapper:t(86272),WebGLTextureWrapper:t(82751),WebGLTextureUnitsWrapper:t(13760),WebGLFramebufferWrapper:t(84387),WebGLVAOWrapper:t(85788),WebGLVertexBufferLayoutWrapper:t(40952)};h.exports=e},76531:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(13560),l=t(83419),i=t(45319),s=t(50792),r=t(97480),o=t(8443),a=t(57811),u=t(74403),f=t(45818),v=t(29747),c=t(87841),g=t(86555),p=t(56583),T=t(26099),C=t(38058),M=new l({Extends:s,initialize:function(R){s.call(this),this.game=R,this.canvas,this.canvasBounds=new c,this.parent=null,this.parentIsWindow=!1,this.parentSize=new g,this.gameSize=new g,this.baseSize=new g,this.displaySize=new g,this.scaleMode=e.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new T(1,1),this.autoRound=!1,this.autoCenter=e.CENTER.NO_CENTER,this.orientation=e.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:v,windowResize:v,fullScreenChange:v,fullScreenError:v}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(o.BOOT,this.boot,this)},boot:function(){var A=this.game;this.canvas=A.canvas,this.fullscreen=A.device.fullscreen;var R=this.scaleMode;R!==e.SCALE_MODE.RESIZE&&R!==e.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(R),R===e.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()),A.events.on(o.PRE_STEP,this.step,this),A.events.once(o.READY,this.refresh,this),A.events.once(o.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(A){this.getParent(A),this.getParentBounds();var R=A.width,P=A.height,L=A.scaleMode,F=A.zoom,w=A.autoRound;if(typeof R=="string")if(R.substr(-1)!=="%")R=parseInt(R,10);else{var O=this.parentSize.width;O===0&&(O=window.innerWidth);var B=parseInt(R,10)/100;R=Math.floor(O*B)}if(typeof P=="string")if(P.substr(-1)!=="%")P=parseInt(P,10);else{var I=this.parentSize.height;I===0&&(I=window.innerHeight);var D=parseInt(P,10)/100;P=Math.floor(I*D)}this.scaleMode=L,this.autoRound=w,this.autoCenter=A.autoCenter,this.resizeInterval=A.resizeInterval,w&&(R=Math.floor(R),P=Math.floor(P)),this.gameSize.setSize(R,P),F===e.ZOOM.MAX_ZOOM&&(F=this.getMaxZoom()),this.zoom=F,F!==1&&(this._resetZoom=!0),this.baseSize.setSize(R,P),w&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),A.minWidth>0&&this.displaySize.setMin(A.minWidth*F,A.minHeight*F),A.maxWidth>0&&this.displaySize.setMax(A.maxWidth*F,A.maxHeight*F),this.displaySize.setSize(R,P),(A.snapWidth>0||A.snapHeight>0)&&this.displaySize.setSnap(A.snapWidth,A.snapHeight),this.orientation=f(R,P)},getParent:function(A){var R=A.parent;if(R!==null){if(this.parent=u(R),this.parentIsWindow=this.parent===document.body,A.expandParent&&A.scaleMode!==e.SCALE_MODE.NONE){var P=this.parent.getBoundingClientRect();(this.parentIsWindow||P.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",P=this.parent.getBoundingClientRect(),!this.parentIsWindow&&P.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}A.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=u(A.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var A=this.parentSize,R=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(R.height=a(!0));var P=R.width,L=R.height;if(A.width!==P||A.height!==L)return A.setSize(P,L),!0;if(this.canvas){var F=this.canvasBounds,w=this.canvas.getBoundingClientRect();if(w.x!==F.x||w.y!==F.y)return!0}return!1},lockOrientation:function(A){var R=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return R?R.call(screen,A):!1},setParentSize:function(A,R){return this.parentSize.setSize(A,R),this.refresh()},setGameSize:function(A,R){var P=this.autoRound;P&&(A=Math.floor(A),R=Math.floor(R));var L=this.width,F=this.height;return this.gameSize.resize(A,R),this.baseSize.resize(A,R),P&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(A/R),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(L,F)},resize:function(A,R){var P=this.zoom,L=this.autoRound;L&&(A=Math.floor(A),R=Math.floor(R));var F=this.width,w=this.height;this.gameSize.resize(A,R),this.baseSize.resize(A,R),L&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(A*P,R*P),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var O=this.canvas.style,B=A*P,I=R*P;return L&&(B=Math.floor(B),I=Math.floor(I)),(B!==A||I!==R)&&(O.width=B+"px",O.height=I+"px"),this.refresh(F,w)},setZoom:function(A){return this.zoom=A,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(A,R){return A===void 0&&(A=0),R===void 0&&(R=A),this.displaySize.setSnap(A,R),this.refresh()},refresh:function(A,R){A===void 0&&(A=this.width),R===void 0&&(R=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var P=this.game.domContainer;if(P){this.baseSize.setCSS(P);var L=this.canvas.style,F=P.style;F.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",F.marginLeft=L.marginLeft,F.marginTop=L.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,A,R),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var A=f(this.width,this.height);A!==this.orientation&&(this.orientation=A,this.emit(r.ORIENTATION_CHANGE,A))}},updateScale:function(){var A=this.canvas.style,R=this.gameSize.width,P=this.gameSize.height,L,F,w=this.zoom,O=this.autoRound;if(this.scaleMode===e.SCALE_MODE.NONE)this.displaySize.setSize(R*w,P*w),L=this.displaySize.width,F=this.displaySize.height,O&&(L=Math.floor(L),F=Math.floor(F)),this._resetZoom&&(A.width=L+"px",A.height=F+"px",this._resetZoom=!1);else if(this.scaleMode===e.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),L=this.displaySize.width,F=this.displaySize.height,O&&(L=Math.floor(L),F=Math.floor(F)),this.canvas.width=L,this.canvas.height=F;else if(this.scaleMode===e.SCALE_MODE.EXPAND){var B=this.game.config.width,I=this.game.config.height,D=this.parentSize.width,N=this.parentSize.height,z=D/B,V=N/I,U,G;z<V?(U=B,G=z!==0?N/z:I):(U=V!==0?D/V:B,G=I);var b=i(U,this.displaySize.minWidth,this.displaySize.maxWidth),Y=i(G,this.displaySize.minHeight,this.displaySize.maxHeight);this.baseSize.setSize(b,Y),this.gameSize.setSize(b,Y),O&&(b=Math.floor(b),Y=Math.floor(Y)),this.canvas.width=b,this.canvas.height=Y;var W=D*(b/U),H=N*(Y/G);this.displaySize.setSize(W,H),L=this.displaySize.width,F=this.displaySize.height,O&&(L=Math.floor(L),F=Math.floor(F)),A.width=L+"px",A.height=F+"px"}else this.displaySize.setSize(this.parentSize.width,this.parentSize.height),L=this.displaySize.width,F=this.displaySize.height,O&&(L=Math.floor(L),F=Math.floor(F)),A.width=L+"px",A.height=F+"px";this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var A=p(this.parentSize.width,this.gameSize.width,0,!0),R=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(A,R),1)},updateCenter:function(){var A=this.autoCenter;if(A!==e.CENTER.NO_CENTER){var R=this.canvas,P=R.style,L=R.getBoundingClientRect(),F=L.width,w=L.height,O=Math.floor((this.parentSize.width-F)/2),B=Math.floor((this.parentSize.height-w)/2);A===e.CENTER.CENTER_HORIZONTALLY?B=0:A===e.CENTER.CENTER_VERTICALLY&&(O=0),P.marginLeft=O+"px",P.marginTop=B+"px"}},updateBounds:function(){var A=this.canvasBounds,R=this.canvas.getBoundingClientRect();A.x=R.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),A.y=R.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),A.width=R.width,A.height=R.height},transformX:function(A){return(A-this.canvasBounds.left)*this.displayScale.x},transformY:function(A){return(A-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(A){A===void 0&&(A={navigationUI:"hide"});var R=this.fullscreen;if(!R.available){this.emit(r.FULLSCREEN_UNSUPPORTED);return}if(!R.active){var P=this.getFullscreenTarget();R.keyboard?P[R.request](Element.ALLOW_KEYBOARD_INPUT):P[R.request](A)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(r.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(A){this.removeFullscreenTarget(),this.emit(r.FULLSCREEN_FAILED,A)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var A=document.createElement("div");A.style.margin="0",A.style.padding="0",A.style.width="100%",A.style.height="100%",this.fullscreenTarget=A,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var R=this.canvas.parentNode;R.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var A=this.fullscreenTarget;if(A&&A.parentNode){var R=A.parentNode;R.insertBefore(this.canvas,A),R.removeChild(A)}}},stopFullscreen:function(){var A=this.fullscreen;if(!A.available)return this.emit(r.FULLSCREEN_UNSUPPORTED),!1;A.active&&document[A.cancel](),this.removeFullscreenTarget()},leaveFullScreenSuccessHandler:function(){this.getParentBounds(),this.emit(r.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(A){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(A)},startListeners:function(){var A=this,R=this.domlisteners;if(R.orientationChange=function(){A.updateBounds(),A._checkOrientation=!0,A.dirty=!0,A.refresh()},R.windowResize=function(){A.updateBounds(),A.dirty=!0},screen.orientation&&screen.orientation.addEventListener?screen.orientation.addEventListener("change",R.orientationChange,!1):window.addEventListener("orientationchange",R.orientationChange,!1),window.addEventListener("resize",R.windowResize,!1),this.fullscreen.available){R.fullScreenChange=function(L){return A.onFullScreenChange(L)},R.fullScreenError=function(L){return A.onFullScreenError(L)};var P=["webkit","moz",""];P.forEach(function(L){document.addEventListener(L+"fullscreenchange",R.fullScreenChange,!1),document.addEventListener(L+"fullscreenerror",R.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",R.fullScreenChange,!1),document.addEventListener("MSFullscreenError",R.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():(this.stopFullscreen(),this.leaveFullScreenSuccessHandler())},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(A,R){A instanceof C||(R=A,A=void 0),R===void 0&&(R=new c);var P=this.baseSize,L=this.parentSize,F=this.canvasBounds,w=this.displayScale,O=F.x>=0?0:-(F.x*w.x),B=F.y>=0?0:-(F.y*w.y),I;L.width>=F.width?I=P.width:I=P.width-(F.width-L.width)*w.x;var D;return L.height>=F.height?D=P.height:D=P.height-(F.height-L.height)*w.y,R.setTo(O,B,I,D),A&&(R.width/=A.zoomX,R.height/=A.zoomY,R.centerX=A.centerX+A.scrollX,R.centerY=A.centerY+A.scrollY),R},step:function(A,R){this.parent&&(this._lastCheck+=R,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var A=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",A.orientationChange,!1):window.removeEventListener("orientationchange",A.orientationChange,!1),window.removeEventListener("resize",A.windowResize,!1);var R=["webkit","moz",""];R.forEach(function(P){document.removeEventListener(P+"fullscreenchange",A.fullScreenChange,!1),document.removeEventListener(P+"fullscreenerror",A.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",A.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",A.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===e.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===e.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});h.exports=M},64743:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};h.exports=e},56139:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="enterfullscreen"},2336:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="fullscreenfailed"},47412:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="fullscreenunsupported"},51452:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="leavefullscreen"},20666:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="orientationchange"},47945:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resize"},97480:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(79291),l=t(13560),i={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};i=e(!1,i,l.CENTER),i=e(!1,i,l.ORIENTATION),i=e(!1,i,l.SCALE_MODE),i=e(!1,i,l.ZOOM),h.exports=i},27397:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l=t(35355),i=function(s){var r=s.game.config.defaultPhysicsSystem,o=e(s.settings,"physics",!1);if(!(!r&&!o)){var a=[];if(r&&a.push(l(r+"Physics")),o)for(var u in o)u=l(u.concat("Physics")),a.indexOf(u)===-1&&a.push(u);return a}};h.exports=i},52106:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l=function(i){var s=i.plugins.getDefaultScenePlugins(),r=e(i.settings,"plugins",!1);return Array.isArray(r)?r:s||[]};h.exports=l},87033:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",matterPhysics:"matter"};h.exports=d},97482:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(2368),i=new e({initialize:function(r){this.sys=new l(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(){}});h.exports=i},60903:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(89993),i=t(44594),s=t(8443),r=t(35154),o=t(54899),a=t(29747),u=t(97482),f=t(2368),v=new e({initialize:function(g,p){if(this.game=g,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,p){Array.isArray(p)||(p=[p]);for(var T=0;T<p.length;T++)this._pending.push({key:"default",scene:p[T],autoStart:T===0,data:{}})}g.events.once(s.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){this.systemScene=this.createSceneFromInstance("__SYSTEM",new u),this.game.events.emit(s.SYSTEM_READY,this.systemScene,this);var c,g,p,T;for(c=0;c<this._pending.length;c++){g=this._pending[c],p=g.key,T=g.scene;var C;T instanceof u?C=this.createSceneFromInstance(p,T):typeof T=="object"?C=this.createSceneFromObject(p,T):typeof T=="function"&&(C=this.createSceneFromFunction(p,T)),p=C.sys.settings.key,this.keys[p]=C,this.scenes.push(C),this._data[p]&&(C.sys.settings.data=this._data[p].data,this._data[p].autoStart&&(g.autoStart=!0)),(g.autoStart||C.sys.settings.active)&&this._start.push(p)}for(this._pending.length=0,this._data={},this.isBooted=!0,c=0;c<this._start.length;c++)g=this._start[c],this.start(g);this._start.length=0}},processQueue:function(){var c=this._pending.length,g=this._queue.length;if(!(c===0&&g===0)){var p,T;if(c){for(p=0;p<c;p++)T=this._pending[p],this.add(T.key,T.scene,T.autoStart,T.data);for(p=0;p<this._start.length;p++)T=this._start[p],this.start(T);this._start.length=0,this._pending.length=0}for(p=0;p<this._queue.length;p++)T=this._queue[p],this[T.op](T.keyA,T.keyB,T.data);this._queue.length=0}},add:function(c,g,p,T){if(p===void 0&&(p=!1),T===void 0&&(T={}),this.isProcessing||!this.isBooted)return this._pending.push({key:c,scene:g,autoStart:p,data:T}),this.isBooted||(this._data[c]={data:T}),null;c=this.getKey(c,g);var C;return g instanceof u?C=this.createSceneFromInstance(c,g):typeof g=="object"?(g.key=c,C=this.createSceneFromObject(c,g)):typeof g=="function"&&(C=this.createSceneFromFunction(c,g)),C.sys.settings.data=T,c=C.sys.settings.key,this.keys[c]=C,this.scenes.push(C),(p||C.sys.settings.active)&&(this._pending.length?this._start.push(c):this.start(c)),C},remove:function(c){if(this.isProcessing)return this.queueOp("remove",c);var g=this.getScene(c);if(!g||g.sys.isTransitioning())return this;var p=this.scenes.indexOf(g),T=g.sys.settings.key;return p>-1&&(delete this.keys[T],this.scenes.splice(p,1),this._start.indexOf(T)>-1&&(p=this._start.indexOf(T),this._start.splice(p,1)),g.sys.destroy()),this},bootScene:function(c){var g=c.sys,p=g.settings;g.sceneUpdate=a,c.init&&(c.init.call(c,p.data),p.status=l.INIT,p.isTransition&&g.events.emit(i.TRANSITION_INIT,p.transitionFrom,p.transitionDuration));var T;g.load&&(T=g.load,T.reset()),T&&c.preload?(c.preload.call(c),p.status=l.LOADING,T.once(o.COMPLETE,this.loadComplete,this),T.start()):this.create(c)},loadComplete:function(c){this.create(c.scene)},payloadComplete:function(c){this.bootScene(c.scene)},update:function(c,g){this.processQueue(),this.isProcessing=!0;for(var p=this.scenes.length-1;p>=0;p--){var T=this.scenes[p].sys;T.settings.status>l.START&&T.settings.status<=l.RUNNING&&T.step(c,g),T.scenePlugin&&T.scenePlugin._target&&T.scenePlugin.step(c,g)}},render:function(c){for(var g=0;g<this.scenes.length;g++){var p=this.scenes[g].sys;p.settings.visible&&p.settings.status>=l.LOADING&&p.settings.status<l.SLEEPING&&p.render(c)}this.isProcessing=!1},create:function(c){var g=c.sys,p=g.settings;c.create&&(p.status=l.CREATING,c.create.call(c,p.data),p.status===l.DESTROYED)||(p.isTransition&&g.events.emit(i.TRANSITION_START,p.transitionFrom,p.transitionDuration),c.update&&(g.sceneUpdate=c.update),p.status=l.RUNNING,g.events.emit(i.CREATE,c))},createSceneFromFunction:function(c,g){var p=new g;if(p instanceof u){var T=p.sys.settings.key;if(T!==""&&(c=T),this.keys.hasOwnProperty(c))throw new Error("Cannot add Scene with duplicate key: "+c);return this.createSceneFromInstance(c,p)}else return p.sys=new f(p),p.sys.settings.key=c,p.sys.init(this.game),p},createSceneFromInstance:function(c,g){var p=g.sys.settings.key;return p===""&&(g.sys.settings.key=c),g.sys.init(this.game),g},createSceneFromObject:function(c,g){var p=new u(g),T=p.sys.settings.key;T!==""?c=T:p.sys.settings.key=c,p.sys.init(this.game);for(var C=["init","preload","create","update","render"],M=0;M<C.length;M++){var A=r(g,C[M],null);A&&(p[C[M]]=A)}if(g.hasOwnProperty("extend")){for(var R in g.extend)if(g.extend.hasOwnProperty(R)){var P=g.extend[R];R==="data"&&p.hasOwnProperty("data")&&typeof P=="object"?p.data.merge(P):R!=="sys"&&(p[R]=P)}}return p},getKey:function(c,g){if(c||(c="default"),typeof g=="function")return c;if(g instanceof u?c=g.sys.settings.key:typeof g=="object"&&g.hasOwnProperty("key")&&(c=g.key),this.keys.hasOwnProperty(c))throw new Error("Cannot add Scene with duplicate key: "+c);return c},getScenes:function(c,g){c===void 0&&(c=!0),g===void 0&&(g=!1);for(var p=[],T=this.scenes,C=0;C<T.length;C++){var M=T[C];M&&(!c||c&&M.sys.isActive())&&p.push(M)}return g?p.reverse():p},getScene:function(c){if(typeof c=="string"){if(this.keys[c])return this.keys[c]}else for(var g=0;g<this.scenes.length;g++)if(c===this.scenes[g])return c;return null},isActive:function(c){var g=this.getScene(c);return g?g.sys.isActive():null},isPaused:function(c){var g=this.getScene(c);return g?g.sys.isPaused():null},isVisible:function(c){var g=this.getScene(c);return g?g.sys.isVisible():null},isSleeping:function(c){var g=this.getScene(c);return g?g.sys.isSleeping():null},pause:function(c,g){var p=this.getScene(c);return p&&p.sys.pause(g),this},resume:function(c,g){var p=this.getScene(c);return p&&p.sys.resume(g),this},sleep:function(c,g){var p=this.getScene(c);return p&&!p.sys.isTransitioning()&&p.sys.sleep(g),this},wake:function(c,g){var p=this.getScene(c);return p&&p.sys.wake(g),this},run:function(c,g){var p=this.getScene(c);if(!p){for(var T=0;T<this._pending.length;T++)if(this._pending[T].key===c){this.queueOp("start",c,g);break}return this}p.sys.isSleeping()?p.sys.wake(g):p.sys.isPaused()?p.sys.resume(g):this.start(c,g)},start:function(c,g){if(!this.isBooted)return this._data[c]={autoStart:!0,data:g},this;var p=this.getScene(c);if(!p)return console.warn("Scene key not found: "+c),this;var T=p.sys,C=T.settings.status;if(C>=l.START&&C<=l.CREATING)return this;if(C>=l.RUNNING&&C<=l.SLEEPING)T.shutdown(),T.sceneUpdate=a,T.start(g);else{T.sceneUpdate=a,T.start(g);var M;if(T.load&&(M=T.load),M&&T.settings.hasOwnProperty("pack")&&(M.reset(),M.addPack({payload:T.settings.pack})))return T.settings.status=l.LOADING,M.once(o.COMPLETE,this.payloadComplete,this),M.start(),this}return this.bootScene(p),this},stop:function(c,g){var p=this.getScene(c);if(p&&!p.sys.isTransitioning()&&p.sys.settings.status!==l.SHUTDOWN){var T=p.sys.load;T&&(T.off(o.COMPLETE,this.loadComplete,this),T.off(o.COMPLETE,this.payloadComplete,this)),p.sys.shutdown(g)}return this},switch:function(c,g,p){var T=this.getScene(c),C=this.getScene(g);return T&&C&&T!==C&&(this.sleep(c),this.isSleeping(g)?this.wake(g,p):this.start(g,p)),this},getAt:function(c){return this.scenes[c]},getIndex:function(c){var g=this.getScene(c);return this.scenes.indexOf(g)},bringToTop:function(c){if(this.isProcessing)return this.queueOp("bringToTop",c);var g=this.getIndex(c),p=this.scenes;if(g!==-1&&g<p.length){var T=this.getScene(c);p.splice(g,1),p.push(T)}return this},sendToBack:function(c){if(this.isProcessing)return this.queueOp("sendToBack",c);var g=this.getIndex(c);if(g!==-1&&g>0){var p=this.getScene(c);this.scenes.splice(g,1),this.scenes.unshift(p)}return this},moveDown:function(c){if(this.isProcessing)return this.queueOp("moveDown",c);var g=this.getIndex(c);if(g>0){var p=g-1,T=this.getScene(c),C=this.getAt(p);this.scenes[g]=C,this.scenes[p]=T}return this},moveUp:function(c){if(this.isProcessing)return this.queueOp("moveUp",c);var g=this.getIndex(c);if(g<this.scenes.length-1){var p=g+1,T=this.getScene(c),C=this.getAt(p);this.scenes[g]=C,this.scenes[p]=T}return this},moveAbove:function(c,g){if(c===g)return this;if(this.isProcessing)return this.queueOp("moveAbove",c,g);var p=this.getIndex(c),T=this.getIndex(g);if(p!==-1&&T!==-1&&T<p){var C=this.getAt(T);this.scenes.splice(T,1),this.scenes.splice(p+(T>p),0,C)}return this},moveBelow:function(c,g){if(c===g)return this;if(this.isProcessing)return this.queueOp("moveBelow",c,g);var p=this.getIndex(c),T=this.getIndex(g);if(p!==-1&&T!==-1&&T>p){var C=this.getAt(T);this.scenes.splice(T,1),p===0?this.scenes.unshift(C):this.scenes.splice(p-(T<p),0,C)}return this},queueOp:function(c,g,p,T){return this._queue.push({op:c,keyA:g,keyB:p,data:T}),this},swapPosition:function(c,g){if(c===g)return this;if(this.isProcessing)return this.queueOp("swapPosition",c,g);var p=this.getIndex(c),T=this.getIndex(g);if(p!==T&&p!==-1&&T!==-1){var C=this.getAt(p);this.scenes[p]=this.scenes[T],this.scenes[T]=C}return this},dump:function(){for(var c=[],g=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],p=0;p<this.scenes.length;p++){var T=this.scenes[p].sys,C=T.settings.visible&&(T.settings.status===l.RUNNING||T.settings.status===l.PAUSED)?"[*] ":"[-] ";C+=T.settings.key+" ("+g[T.settings.status]+")",c.push(C)}console.log(c.join(`
|
||
`))},destroy:function(){for(var c=0;c<this.scenes.length;c++){var g=this.scenes[c].sys;g.destroy()}this.systemScene.sys.destroy(),this.update=a,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});h.exports=v},52209:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(44594),s=t(95540),r=t(37277),o=new l({initialize:function(u){this.scene=u,this.systems=u.sys,this.settings=u.sys.settings,this.key=u.sys.settings.key,this.manager=u.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,u.sys.events.once(i.BOOT,this.boot,this),u.sys.events.on(i.START,this.pluginStart,this)},boot:function(){this.systems.events.once(i.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(i.SHUTDOWN,this.shutdown,this)},start:function(a,u){return a===void 0&&(a=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",a,u),this},restart:function(a){var u=this.key;return this.manager.queueOp("stop",u),this.manager.queueOp("start",u,a),this},transition:function(a){a===void 0&&(a={});var u=s(a,"target",!1),f=this.manager.getScene(u);if(!u||!this.checkValidTransition(f))return!1;var v=s(a,"duration",1e3);this._elapsed=0,this._target=f,this._duration=v,this._willSleep=s(a,"sleep",!1),this._willRemove=s(a,"remove",!1);var c=s(a,"onUpdate",null);c&&(this._onUpdate=c,this._onUpdateScope=s(a,"onUpdateScope",this.scene));var g=s(a,"allowInput",!1);this.settings.transitionAllowInput=g;var p=f.sys.settings;p.isTransition=!0,p.transitionFrom=this.scene,p.transitionDuration=v,p.transitionAllowInput=g,s(a,"moveAbove",!1)?this.manager.moveAbove(this.key,u):s(a,"moveBelow",!1)&&this.manager.moveBelow(this.key,u),f.sys.isSleeping()?f.sys.wake(s(a,"data")):this.manager.start(u,s(a,"data"));var T=s(a,"onStart",null),C=s(a,"onStartScope",this.scene);return T&&T.call(C,this.scene,f,v),this.systems.events.emit(i.TRANSITION_OUT,f,v),!0},checkValidTransition:function(a){return!(!a||a.sys.isActive()||a.sys.isTransitioning()||a===this.scene||this.systems.isTransitioning())},step:function(a,u){this._elapsed+=u,this.transitionProgress=e(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var a=this._target.sys,u=this._target.sys.settings;a.events.emit(i.TRANSITION_COMPLETE,this.scene),u.isTransition=!1,u.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(a,u,f,v){return this.manager.add(a,u,f,v)},launch:function(a,u){return a&&a!==this.key&&this.manager.queueOp("start",a,u),this},run:function(a,u){return a&&a!==this.key&&this.manager.queueOp("run",a,u),this},pause:function(a,u){return a===void 0&&(a=this.key),this.manager.queueOp("pause",a,u),this},resume:function(a,u){return a===void 0&&(a=this.key),this.manager.queueOp("resume",a,u),this},sleep:function(a,u){return a===void 0&&(a=this.key),this.manager.queueOp("sleep",a,u),this},wake:function(a,u){return a===void 0&&(a=this.key),this.manager.queueOp("wake",a,u),this},switch:function(a,u){return a!==this.key&&this.manager.queueOp("switch",this.key,a,u),this},stop:function(a,u){return a===void 0&&(a=this.key),this.manager.queueOp("stop",a,u),this},setActive:function(a,u,f){u===void 0&&(u=this.key);var v=this.manager.getScene(u);return v&&v.sys.setActive(a,f),this},setVisible:function(a,u){u===void 0&&(u=this.key);var f=this.manager.getScene(u);return f&&f.sys.setVisible(a),this},isSleeping:function(a){return a===void 0&&(a=this.key),this.manager.isSleeping(a)},isActive:function(a){return a===void 0&&(a=this.key),this.manager.isActive(a)},isPaused:function(a){return a===void 0&&(a=this.key),this.manager.isPaused(a)},isVisible:function(a){return a===void 0&&(a=this.key),this.manager.isVisible(a)},swapPosition:function(a,u){return u===void 0&&(u=this.key),a!==u&&this.manager.swapPosition(a,u),this},moveAbove:function(a,u){return u===void 0&&(u=this.key),a!==u&&this.manager.moveAbove(a,u),this},moveBelow:function(a,u){return u===void 0&&(u=this.key),a!==u&&this.manager.moveBelow(a,u),this},remove:function(a){return a===void 0&&(a=this.key),this.manager.remove(a),this},moveUp:function(a){return a===void 0&&(a=this.key),this.manager.moveUp(a),this},moveDown:function(a){return a===void 0&&(a=this.key),this.manager.moveDown(a),this},bringToTop:function(a){return a===void 0&&(a=this.key),this.manager.bringToTop(a),this},sendToBack:function(a){return a===void 0&&(a=this.key),this.manager.sendToBack(a),this},get:function(a){return this.manager.getScene(a)},getStatus:function(a){var u=this.manager.getScene(a);if(u)return u.sys.getStatus()},getIndex:function(a){return a===void 0&&(a=this.key),this.manager.getIndex(a)},shutdown:function(){var a=this.systems.events;a.off(i.SHUTDOWN,this.shutdown,this),a.off(i.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(i.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),h.exports=o},55681:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(89993),l=t(35154),i=t(46975),s=t(87033),r={create:function(o){return typeof o=="string"?o={key:o}:o===void 0&&(o={}),{status:e.PENDING,key:l(o,"key",""),active:l(o,"active",!1),visible:l(o,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:l(o,"pack",!1),cameras:l(o,"cameras",null),map:l(o,"map",i(s,l(o,"mapAdd",{}))),physics:l(o,"physics",{}),loader:l(o,"loader",{}),plugins:l(o,"plugins",!1),input:l(o,"input",{})}}};h.exports=r},2368:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(89993),i=t(42363),s=t(44594),r=t(27397),o=t(52106),a=t(29747),u=t(55681),f=new e({initialize:function(c,g){this.scene=c,this.game,this.renderer,this.config=g,this.settings=u.create(g),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=a},init:function(v){this.settings.status=l.INIT,this.sceneUpdate=a,this.game=v,this.renderer=v.renderer,this.canvas=v.canvas,this.context=v.context;var c=v.plugins;this.plugins=c,c.addToScene(this,i.Global,[i.CoreScene,o(this),r(this)]),this.events.emit(s.BOOT,this),this.settings.isBooted=!0},step:function(v,c){var g=this.events;g.emit(s.PRE_UPDATE,v,c),g.emit(s.UPDATE,v,c),this.sceneUpdate.call(this.scene,v,c),g.emit(s.POST_UPDATE,v,c)},render:function(v){var c=this.displayList;c.depthSort(),this.events.emit(s.PRE_RENDER,v),this.cameras.render(v,c),this.events.emit(s.RENDER,v)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(v){var c=this.settings,g=this.getStatus();return g!==l.CREATING&&g!==l.RUNNING?console.warn("Cannot pause non-running Scene",c.key):this.settings.active&&(c.status=l.PAUSED,c.active=!1,this.events.emit(s.PAUSE,this,v)),this},resume:function(v){var c=this.events,g=this.settings;return this.settings.active||(g.status=l.RUNNING,g.active=!0,c.emit(s.RESUME,this,v)),this},sleep:function(v){var c=this.settings,g=this.getStatus();return g!==l.CREATING&&g!==l.RUNNING?console.warn("Cannot sleep non-running Scene",c.key):(c.status=l.SLEEPING,c.active=!1,c.visible=!1,this.events.emit(s.SLEEP,this,v)),this},wake:function(v){var c=this.events,g=this.settings;return g.status=l.RUNNING,g.active=!0,g.visible=!0,c.emit(s.WAKE,this,v),g.isTransition&&c.emit(s.TRANSITION_WAKE,g.transitionFrom,g.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var v=this.settings.status;return v>l.PENDING&&v<=l.RUNNING},isSleeping:function(){return this.settings.status===l.SLEEPING},isActive:function(){return this.settings.status===l.RUNNING},isPaused:function(){return this.settings.status===l.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(v){return this.settings.visible=v,this},setActive:function(v,c){return v?this.resume(c):this.pause(c)},start:function(v){var c=this.events,g=this.settings;v&&(g.data=v),g.status=l.START,g.active=!0,g.visible=!0,c.emit(s.START,this),c.emit(s.READY,this,v)},shutdown:function(v){var c=this.events,g=this.settings;c.off(s.TRANSITION_INIT),c.off(s.TRANSITION_START),c.off(s.TRANSITION_COMPLETE),c.off(s.TRANSITION_OUT),g.status=l.SHUTDOWN,g.active=!1,g.visible=!1,c.emit(s.SHUTDOWN,this,v)},destroy:function(){var v=this.events,c=this.settings;c.status=l.DESTROYED,c.active=!1,c.visible=!1,v.emit(s.DESTROY,this),v.removeAllListeners();for(var g=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],p=0;p<g.length;p++)this[g[p]]=null}});h.exports=f},89993:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};h.exports=d},69830:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="addedtoscene"},7919:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="boot"},46763:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="create"},11763:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="destroy"},71555:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pause"},36735:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="postupdate"},3809:h=>{/**
|
||
* @author samme
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="prerender"},90716:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="preupdate"},58262:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="ready"},91633:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="removedfromscene"},10319:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="render"},87132:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resume"},81961:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="shutdown"},90194:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="sleep"},6265:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="start"},33178:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="transitioncomplete"},43063:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="transitioninit"},11259:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="transitionout"},61611:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="transitionstart"},45209:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="transitionwake"},22966:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="update"},21747:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="wake"},44594:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(89993),l=t(79291),i={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};i=l(!1,i,e),h.exports=i},30341:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50792),i=t(14463),s=t(79291),r=t(29747),o=new e({Extends:l,initialize:function(u,f,v){l.call(this),this.manager=u,this.key=f,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=s(this.config,v),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(a){return!a||!a.name||typeof a.name!="string"?!1:this.markers[a.name]?(console.error("addMarker "+a.name+" already exists in Sound"),!1):(a=s(!0,{name:"",start:0,duration:this.totalDuration-(a.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},a),this.markers[a.name]=a,!0)},updateMarker:function(a){return!a||!a.name||typeof a.name!="string"?!1:this.markers[a.name]?(this.markers[a.name]=s(!0,this.markers[a.name],a),!0):(console.warn("Audio Marker: "+a.name+" missing in Sound: "+this.key),!1)},removeMarker:function(a){var u=this.markers[a];return u?(this.markers[a]=null,u):null},play:function(a,u){if(a===void 0&&(a=""),typeof a=="object"&&(u=a,a=""),typeof a!="string")return!1;if(!a)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[a])return console.warn("Marker: "+a+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[a],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=s(this.currentConfig,u),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 a=1.0005777895065548,u=this.currentConfig.detune+this.manager.detune,f=Math.pow(a,u);this.totalRate=this.currentConfig.rate*this.manager.rate*f},destroy:function(){this.pendingRemove||(this.stop(),this.emit(i.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});h.exports=o},85034:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(41786),i=t(50792),s=t(14463),r=t(8443),o=t(46710),a=t(58731),u=t(29747),f=t(26099),v=new e({Extends:i,initialize:function(g){i.call(this),this.game=g,this.jsonCache=g.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 f;var p=g.events;p.on(r.BLUR,this.onGameBlur,this),p.on(r.FOCUS,this.onGameFocus,this),p.on(r.PRE_STEP,this.update,this),p.once(r.DESTROY,this.destroy,this)},add:u,addAudioSprite:function(c,g){g===void 0&&(g={});var p=this.add(c,g);p.spritemap=this.jsonCache.get(c).spritemap;for(var T in p.spritemap)if(p.spritemap.hasOwnProperty(T)){var C=l(g),M=p.spritemap[T];C.loop=M.hasOwnProperty("loop")?M.loop:!1,p.addMarker({name:T,start:M.start,duration:M.end-M.start,config:C})}return p},get:function(c){return a(this.sounds,"key",c)},getAll:function(c){return c?o(this.sounds,"key",c):o(this.sounds)},getAllPlaying:function(){return o(this.sounds,"isPlaying",!0)},play:function(c,g){var p=this.add(c);return p.once(s.COMPLETE,p.destroy,p),g?g.name?(p.addMarker(g),p.play(g.name)):p.play(g):p.play()},playAudioSprite:function(c,g,p){var T=this.addAudioSprite(c);return T.once(s.COMPLETE,T.destroy,T),T.play(g,p)},remove:function(c){var g=this.sounds.indexOf(c);return g!==-1?(c.destroy(),this.sounds.splice(g,1),!0):!1},removeAll:function(){this.sounds.forEach(function(c){c.destroy()}),this.sounds.length=0},removeByKey:function(c){for(var g=0,p=this.sounds.length-1;p>=0;p--){var T=this.sounds[p];T.key===c&&(T.destroy(),this.sounds.splice(p,1),g++)}return g},pauseAll:function(){this.forEachActiveSound(function(c){c.pause()}),this.emit(s.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(c){c.resume()}),this.emit(s.RESUME_ALL,this)},setListenerPosition:u,stopAll:function(){this.forEachActiveSound(function(c){c.stop()}),this.emit(s.STOP_ALL,this)},stopByKey:function(c){var g=0;return this.getAll(c).forEach(function(p){p.stop()&&g++}),g},isPlaying:function(c){var g=this.sounds,p=g.length-1,T;if(c===void 0){for(;p>=0;p--)if(T=this.sounds[p],T.isPlaying)return!0}else for(;p>=0;p--)if(T=this.sounds[p],T.key===c&&T.isPlaying)return!0;return!1},unlock:u,onBlur:u,onFocus:u,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(c,g){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(s.UNLOCKED,this));for(var p=this.sounds.length-1;p>=0;p--)this.sounds[p].pendingRemove&&this.sounds.splice(p,1);this.sounds.forEach(function(T){T.update(c,g)})},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(c,g){var p=this;this.sounds.forEach(function(T,C){T&&!T.pendingRemove&&c.call(g||p,T,C,p.sounds)})},setRate:function(c){return this.rate=c,this},rate:{get:function(){return this._rate},set:function(c){this._rate=c,this.forEachActiveSound(function(g){g.calculateRate()}),this.emit(s.GLOBAL_RATE,this,c)}},setDetune:function(c){return this.detune=c,this},detune:{get:function(){return this._detune},set:function(c){this._detune=c,this.forEachActiveSound(function(g){g.calculateRate()}),this.emit(s.GLOBAL_DETUNE,this,c)}}});h.exports=v},14747:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(33684),l=t(25960),i=t(57490),s={create:function(r){var o=r.config.audio,a=r.device.audio;return o.noAudio||!a.webAudio&&!a.audioData?new l(r):a.webAudio&&!o.disableWebAudio?new i(r):new e(r)}};h.exports=s},19723:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="complete"},98882:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="decodedall"},57506:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="decoded"},73146:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="destroy"},11305:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="detune"},40577:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="detune"},30333:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="mute"},20394:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="rate"},21802:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="volume"},1299:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="looped"},99190:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="loop"},97125:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="mute"},89259:h=>{/**
|
||
* @author pi-kei
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pan"},79986:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pauseall"},17586:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pause"},19618:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="play"},42306:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="rate"},10387:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resumeall"},48959:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resume"},9960:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="seek"},19180:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="stopall"},98328:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="stop"},50401:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="unlocked"},52498:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="volume"},14463:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(30341),l=t(83419),i=t(14463),s=t(45319),r=new l({Extends:e,initialize:function(a,u,f){if(f===void 0&&(f={}),this.tags=a.game.cache.audio.get(u),!this.tags)throw new Error('No cached audio asset with key "'+u);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,e.call(this,a,u,f)},play:function(o,a){return this.manager.isLocked(this,"play",[o,a])||!e.prototype.play.call(this,o,a)||!this.pickAndPlayAudioTag()?!1:(this.emit(i.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!e.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(i.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!e.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(i.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!e.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(i.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var o=this.currentConfig.seek,a=this.currentConfig.delay,u=(this.currentMarker?this.currentMarker.start:0)+o;return this.previousTime=u,this.audio.currentTime=u,this.applyConfig(),a===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+a*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var o=0;o<this.tags.length;o++){var a=this.tags[o];if(a.dataset.used==="false")return a.dataset.used="true",this.audio=a,!0}if(!this.manager.override)return!1;var u=[];this.manager.forEachActiveSound(function(v){v.key===this.key&&v.audio&&u.push(v)},this),u.sort(function(v,c){return v.loop===c.loop?c.seek/c.duration-v.seek/v.duration:v.loop?1:-1});var f=u[0];return this.audio=f.audio,f.reset(),f.audio=null,f.startTime=0,f.previousTime=0,!0},playCatchPromise:function(){var o=this.audio.play();o&&o.catch(function(a){console.warn(a)})},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){e.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(o){if(this.isPlaying){if(this.startTime>0){this.startTime<o-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,o-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());return}var a=this.currentMarker?this.currentMarker.start:0,u=a+this.duration,f=this.audio.currentTime;if(this.currentConfig.loop)f>=u-this.manager.loopEndOffset?(this.audio.currentTime=a+Math.max(0,f-u),f=this.audio.currentTime):f<a&&(this.audio.currentTime+=a,f=this.audio.currentTime),f<this.previousTime&&this.emit(i.LOOPED,this);else if(f>=u){this.reset(),this.stopAndReleaseAudioTag(),this.emit(i.COMPLETE,this);return}this.previousTime=f}},destroy:function(){e.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=s(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){e.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(o){this.currentConfig.mute=o,!this.manager.isLocked(this,"mute",o)&&(this.updateMute(),this.emit(i.MUTE,this,o))}},setMute:function(o){return this.mute=o,this},volume:{get:function(){return this.currentConfig.volume},set:function(o){this.currentConfig.volume=o,!this.manager.isLocked(this,"volume",o)&&(this.updateVolume(),this.emit(i.VOLUME,this,o))}},setVolume:function(o){return this.volume=o,this},rate:{get:function(){return this.currentConfig.rate},set:function(o){this.currentConfig.rate=o,!this.manager.isLocked(this,i.RATE,o)&&(this.calculateRate(),this.emit(i.RATE,this,o))}},setRate:function(o){return this.rate=o,this},detune:{get:function(){return this.currentConfig.detune},set:function(o){this.currentConfig.detune=o,!this.manager.isLocked(this,i.DETUNE,o)&&(this.calculateRate(),this.emit(i.DETUNE,this,o))}},setDetune:function(o){return this.detune=o,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(o){this.manager.isLocked(this,"seek",o)||this.startTime>0||(this.isPlaying||this.isPaused)&&(o=Math.min(Math.max(0,o),this.duration),this.isPlaying?(this.previousTime=o,this.audio.currentTime=o):this.isPaused&&(this.currentConfig.seek=o),this.emit(i.SEEK,this,o))}},setSeek:function(o){return this.seek=o,this},loop:{get:function(){return this.currentConfig.loop},set:function(o){this.currentConfig.loop=o,!this.manager.isLocked(this,"loop",o)&&(this.audio&&(this.audio.loop=o),this.emit(i.LOOP,this,o))}},setLoop:function(o){return this.loop=o,this},pan:{get:function(){return this.currentConfig.pan},set:function(o){this.currentConfig.pan=o,this.emit(i.PAN,this,o)}},setPan:function(o){return this.pan=o,this}});h.exports=r},33684:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(85034),l=t(83419),i=t(14463),s=t(64895),r=new l({Extends:e,initialize:function(a){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,e.call(this,a)},add:function(o,a){var u=new s(this,o,a);return this.sounds.push(u),u},unlock:function(){this.locked=!1;var o=this;if(this.game.cache.audio.entries.each(function(v,c){for(var g=0;g<c.length;g++)if(c[g].dataset.locked==="true")return o.locked=!0,!1;return!0}),!!this.locked){var a=!1,u=function(){a=!0},f=function(){if(a){a=!1;return}document.body.removeEventListener("touchmove",u),document.body.removeEventListener("touchend",f);var v=[];if(o.game.cache.audio.entries.each(function(g,p){for(var T=0;T<p.length;T++){var C=p[T];C.dataset.locked==="true"&&v.push(C)}return!0}),v.length!==0){var c=v[v.length-1];c.oncanplaythrough=function(){c.oncanplaythrough=null,v.forEach(function(g){g.dataset.locked="false"}),o.unlocked=!0},v.forEach(function(g){g.load()})}};this.once(i.UNLOCKED,function(){for(this.forEachActiveSound(function(c){c.currentMarker===null&&c.duration===0&&(c.duration=c.tags[0].duration),c.totalDuration=c.tags[0].duration});this.lockedActionsQueue.length;){var v=this.lockedActionsQueue.shift();v.sound[v.prop].apply?v.sound[v.prop].apply(v.sound,v.value||[]):v.sound[v.prop]=v.value}},this),document.body.addEventListener("touchmove",u,!1),document.body.addEventListener("touchend",f,!1)}},onBlur:function(){this.forEachActiveSound(function(o){o.isPlaying&&(this.onBlurPausedSounds.push(o),o.onBlur())})},onFocus:function(){this.onBlurPausedSounds.forEach(function(o){o.onFocus()}),this.onBlurPausedSounds.length=0},destroy:function(){e.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(o,a,u){return o.tags[0].dataset.locked==="true"?(this.lockedActionsQueue.push({sound:o,prop:a,value:u}),!0):!1},setMute:function(o){return this.mute=o,this},mute:{get:function(){return this._mute},set:function(o){this._mute=o,this.forEachActiveSound(function(a){a.updateMute()}),this.emit(i.GLOBAL_MUTE,this,o)}},setVolume:function(o){return this.volume=o,this},volume:{get:function(){return this._volume},set:function(o){this._volume=o,this.forEachActiveSound(function(a){a.updateVolume()}),this.emit(i.GLOBAL_VOLUME,this,o)}}});h.exports=r},23717:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(30341),l=t(83419),i=t(50792),s=t(79291),r=t(29747),o=function(){return!1},a=function(){return null},u=function(){return this},f=new l({Extends:i,initialize:function(c,g,p){p===void 0&&(p={}),i.call(this),this.manager=c,this.key=g,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=s({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},p),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:o,updateMarker:o,removeMarker:a,play:o,pause:o,resume:o,stop:o,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:a,resetConfig:a,update:r,calculateRate:a,destroy:function(){e.prototype.destroy.call(this)}});h.exports=f},25960:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(85034),l=t(83419),i=t(50792),s=t(4603),r=t(29747),o=new l({Extends:i,initialize:function(u){i.call(this),this.game=u,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(a,u){var f=new s(this,a,u);return this.sounds.push(f),f},addAudioSprite:function(a,u){var f=this.add(a,u);return f.spritemap={},f},get:function(a){return e.prototype.get.call(this,a)},getAll:function(a){return e.prototype.getAll.call(this,a)},play:function(a,u){return!1},playAudioSprite:function(a,u,f){return!1},remove:function(a){return e.prototype.remove.call(this,a)},removeAll:function(){return e.prototype.removeAll.call(this)},removeByKey:function(a){return e.prototype.removeByKey.call(this,a)},stopByKey:function(a){return e.prototype.stopByKey.call(this,a)},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(a,u){e.prototype.forEachActiveSound.call(this,a,u)},destroy:function(){e.prototype.destroy.call(this)}});h.exports=o},71741:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(30341),l=t(83419),i=t(14463),s=t(95540),r=new l({Extends:e,initialize:function(a,u,f){if(f===void 0&&(f={}),this.audioBuffer=a.game.cache.audio.get(u),!this.audioBuffer)throw new Error('Audio key "'+u+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=a.context.createGain(),this.volumeNode=a.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),a.context.createPanner&&(this.spatialNode=a.context.createPanner(),this.volumeNode.connect(this.spatialNode)),a.context.createStereoPanner?(this.pannerNode=a.context.createStereoPanner(),a.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(a.destination)):a.context.createPanner?this.spatialNode.connect(a.destination):this.volumeNode.connect(a.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,e.call(this,a,u,f)},play:function(o,a){return e.prototype.play.call(this,o,a)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(i.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime<this.startTime||!e.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(i.PAUSE,this),!0)},resume:function(){return this.manager.context.currentTime<this.startTime||!e.prototype.resume.call(this)?!1:(this.createAndStartBufferSource(),this.emit(i.RESUME,this),!0)},stop:function(){return e.prototype.stop.call(this)?(this.stopAndRemoveBufferSource(),this.emit(i.STOP,this),!0):!1},createAndStartBufferSource:function(){var o=this.currentConfig.seek,a=this.currentConfig.delay,u=this.manager.context.currentTime+a,f=(this.currentMarker?this.currentMarker.start:0)+o,v=this.duration-o;this.playTime=u-o,this.startTime=u,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,u),Math.max(0,f),Math.max(0,v)),this.resetConfig()},createAndStartLoopBufferSource:function(){var o=this.getLoopTime(),a=this.currentMarker?this.currentMarker.start:0,u=this.duration;this.loopTime=o,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,o),Math.max(0,a),Math.max(0,u))},createBufferSource:function(){var o=this,a=this.manager.context.createBufferSource();return a.buffer=this.audioBuffer,a.connect(this.muteNode),a.onended=function(u){var f=u.target;(f===o.source||f===o.loopSource)&&(o.currentConfig.loop?o.hasLooped=!0:o.hasEnded=!0)},a},stopAndRemoveBufferSource:function(){if(this.source){var o=this.source;this.source=null,o.stop(),o.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 o=this.currentConfig.source;if(o&&this.manager.context.createPanner){var a=this.spatialNode;a.panningModel=s(o,"panningModel","equalpower"),a.distanceModel=s(o,"distanceModel","inverse"),a.orientationX.value=s(o,"orientationX",0),a.orientationY.value=s(o,"orientationY",0),a.orientationZ.value=s(o,"orientationZ",-1),a.refDistance=s(o,"refDistance",1),a.maxDistance=s(o,"maxDistance",1e4),a.rolloffFactor=s(o,"rolloffFactor",1),a.coneInnerAngle=s(o,"coneInnerAngle",360),a.coneOuterAngle=s(o,"coneOuterAngle",0),a.coneOuterGain=s(o,"coneOuterGain",0),this.spatialSource=s(o,"follow",null),this.spatialSource||(a.positionX.value=s(o,"x",0),a.positionY.value=s(o,"y",0),a.positionZ.value=s(o,"z",0))}e.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(o){this.spatialNode&&(this.spatialNode.positionX.value=o)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(o){this.spatialNode&&(this.spatialNode.positionY.value=o)}},update:function(){if(this.isPlaying&&this.spatialSource){var o=s(this.spatialSource,"x",null),a=s(this.spatialSource,"y",null);o&&o!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=o),a&&a!==this._spatialy&&(this._spatialy=this.spatialNode.positionY.value=a)}this.hasEnded?(e.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(i.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(i.LOOPED,this))},destroy:function(){this.pendingRemove||(e.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(){e.prototype.calculateRate.call(this);var o=this.manager.context.currentTime;this.source&&typeof this.totalRate=="number"&&this.source.playbackRate.setValueAtTime(this.totalRate,o),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,o)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var o=0,a=0;a<this.rateUpdates.length;a++){var u=0;a<this.rateUpdates.length-1?u=this.rateUpdates[a+1].time:u=this.manager.context.currentTime-this.playTime,o+=(u-this.rateUpdates[a].time)*this.rateUpdates[a].rate}return o},getLoopTime:function(){for(var o=0,a=0;a<this.rateUpdates.length-1;a++)o+=(this.rateUpdates[a+1].time-this.rateUpdates[a].time)*this.rateUpdates[a].rate;var u=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+u.time+(this.duration-o)/u.rate},rate:{get:function(){return this.currentConfig.rate},set:function(o){this.currentConfig.rate=o,this.calculateRate(),this.emit(i.RATE,this,o)}},setRate:function(o){return this.rate=o,this},detune:{get:function(){return this.currentConfig.detune},set:function(o){this.currentConfig.detune=o,this.calculateRate(),this.emit(i.DETUNE,this,o)}},setDetune:function(o){return this.detune=o,this},mute:{get:function(){return this.muteNode.gain.value===0},set:function(o){this.currentConfig.mute=o,this.muteNode.gain.setValueAtTime(o?0:1,0),this.emit(i.MUTE,this,o)}},setMute:function(o){return this.mute=o,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(o){this.currentConfig.volume=o,this.volumeNode.gain.setValueAtTime(o,0),this.emit(i.VOLUME,this,o)}},setVolume:function(o){return this.volume=o,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(o){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(o=Math.min(Math.max(0,o),this.duration),this.currentConfig.seek=o,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(i.SEEK,this,o))}},setSeek:function(o){return this.seek=o,this},loop:{get:function(){return this.currentConfig.loop},set:function(o){this.currentConfig.loop=o,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),o&&this.createAndStartLoopBufferSource()),this.emit(i.LOOP,this,o)}},setLoop:function(o){return this.loop=o,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(o){this.currentConfig.pan=o,this.pannerNode&&this.pannerNode.pan.setValueAtTime(o,this.manager.context.currentTime),this.emit(i.PAN,this,o)}},setPan:function(o){return this.pan=o,this}});h.exports=r},57490:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(53134),l=t(85034),i=t(83419),s=t(14463),r=t(8443),o=t(71741),a=t(95540),u=new i({Extends:l,initialize:function(v){this.context=this.createAudioContext(v),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",l.call(this,v),this.locked&&(v.isBooted?this.unlock():v.events.once(r.BOOT,this.unlock,this)),v.events.on(r.VISIBLE,this.onGameVisible,this)},onGameVisible:function(){var f=this.context;window.setTimeout(function(){f&&(f.suspend(),f.resume())},100)},createAudioContext:function(f){var v=f.config.audio;if(v.context)return v.context.resume(),v.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(f){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=f,this.masterMuteNode=f.createGain(),this.masterVolumeNode=f.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(f.destination),this.destination=this.masterMuteNode,this},add:function(f,v){var c=new o(this,f,v);return this.sounds.push(c),c},decodeAudio:function(f,v){var c;Array.isArray(f)?c=f:c=[{key:f,data:v}];for(var g=this.game.cache.audio,p=c.length,T=0;T<c.length;T++){var C=c[T],M=C.key,A=C.data;typeof A=="string"&&(A=e(A));var R=function(L,F){g.add(L,F),this.emit(s.DECODED,L),p--,p===0&&this.emit(s.DECODED_ALL)}.bind(this,M),P=function(L,F){console.error("Error decoding audio: "+L+" - ",F?F.message:""),p--,p===0&&this.emit(s.DECODED_ALL)}.bind(this,M);this.context.decodeAudioData(A,R,P)}},setListenerPosition:function(f,v){return f===void 0&&(f=this.game.scale.width/2),v===void 0&&(v=this.game.scale.height/2),this.listenerPosition.set(f,v),this},unlock:function(){var f=this,v=document.body,c=function g(){if(f.context&&v){var p=v.removeEventListener.bind(v);f.context.resume().then(function(){p("touchstart",g),p("touchend",g),p("mousedown",g),p("mouseup",g),p("keydown",g),f.unlocked=!0},function(){p("touchstart",g),p("touchend",g),p("mousedown",g),p("mouseup",g),p("keydown",g)})}};v&&(v.addEventListener("touchstart",c,!1),v.addEventListener("touchend",c,!1),v.addEventListener("mousedown",c,!1),v.addEventListener("mouseup",c,!1),v.addEventListener("keydown",c,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var f=this.context;f&&!this.locked&&(f.state==="suspended"||f.state==="interrupted")&&f.resume()},update:function(f,v){var c=this.context.listener;if(c&&c.positionX!==void 0){var g=a(this.listenerPosition,"x",null),p=a(this.listenerPosition,"y",null);g&&g!==this._spatialx&&(this._spatialx=c.positionX.value=g),p&&p!==this._spatialy&&(this._spatialy=c.positionY.value=p)}l.prototype.update.call(this,f,v),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 f=this;this.context.close().then(function(){f.context=null})}this.game.events.off(r.VISIBLE,this.onGameVisible,this),l.prototype.destroy.call(this)},setMute:function(f){return this.mute=f,this},mute:{get:function(){return this.masterMuteNode.gain.value===0},set:function(f){this.masterMuteNode.gain.setValueAtTime(f?0:1,0),this.emit(s.GLOBAL_MUTE,this,f)}},setVolume:function(f){return this.volume=f,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(f){this.masterVolumeNode.gain.setValueAtTime(f,0),this.emit(s.GLOBAL_VOLUME,this,f)}}});h.exports=u},73162:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37105),l=t(83419),i=t(29747),s=t(19186),r=new l({initialize:function(a){this.parent=a,this.list=[],this.position=0,this.addCallback=i,this.removeCallback=i,this._sortKey=""},add:function(o,a){return a?e.Add(this.list,o):e.Add(this.list,o,0,this.addCallback,this)},addAt:function(o,a,u){return u?e.AddAt(this.list,o,a):e.AddAt(this.list,o,a,0,this.addCallback,this)},getAt:function(o){return this.list[o]},getIndex:function(o){return this.list.indexOf(o)},sort:function(o,a){return o?(a===void 0&&(a=function(u,f){return u[o]-f[o]}),s(this.list,a),this):this},getByName:function(o){return e.GetFirst(this.list,"name",o)},getRandom:function(o,a){return e.GetRandom(this.list,o,a)},getFirst:function(o,a,u,f){return e.GetFirst(this.list,o,a,u,f)},getAll:function(o,a,u,f){return e.GetAll(this.list,o,a,u,f)},count:function(o,a){return e.CountAllMatching(this.list,o,a)},swap:function(o,a){e.Swap(this.list,o,a)},moveTo:function(o,a){return e.MoveTo(this.list,o,a)},moveAbove:function(o,a){return e.MoveAbove(this.list,o,a)},moveBelow:function(o,a){return e.MoveBelow(this.list,o,a)},remove:function(o,a){return a?e.Remove(this.list,o):e.Remove(this.list,o,this.removeCallback,this)},removeAt:function(o,a){return a?e.RemoveAt(this.list,o):e.RemoveAt(this.list,o,this.removeCallback,this)},removeBetween:function(o,a,u){return u?e.RemoveBetween(this.list,o,a):e.RemoveBetween(this.list,o,a,this.removeCallback,this)},removeAll:function(o){for(var a=this.list.length;a--;)this.remove(this.list[a],o);return this},bringToTop:function(o){return e.BringToTop(this.list,o)},sendToBack:function(o){return e.SendToBack(this.list,o)},moveUp:function(o){return e.MoveUp(this.list,o),o},moveDown:function(o){return e.MoveDown(this.list,o),o},reverse:function(){return this.list.reverse(),this},shuffle:function(){return e.Shuffle(this.list),this},replace:function(o,a){return e.Replace(this.list,o,a)},exists:function(o){return this.list.indexOf(o)>-1},setAll:function(o,a,u,f){return e.SetAll(this.list,o,a,u,f),this},each:function(o,a){for(var u=[null],f=2;f<arguments.length;f++)u.push(arguments[f]);for(f=0;f<this.list.length;f++)u[0]=this.list[f],o.apply(a,u)},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}}});h.exports=r},90330:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s){this.entries={},this.size=0,this.setAll(s)},setAll:function(i){if(Array.isArray(i))for(var s=0;s<i.length;s++)this.set(i[s][0],i[s][1]);return this},set:function(i,s){return this.has(i)||this.size++,this.entries[i]=s,this},get:function(i){if(this.has(i))return this.entries[i]},getArray:function(){var i=[],s=this.entries;for(var r in s)i.push(s[r]);return i},has:function(i){return this.entries.hasOwnProperty(i)},delete:function(i){return this.has(i)&&(delete this.entries[i],this.size--),this},clear:function(){return Object.keys(this.entries).forEach(function(i){delete this.entries[i]},this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var i=[],s=this.entries;for(var r in s)i.push(s[r]);return i},dump:function(){var i=this.entries;console.group("Map");for(var s in i)console.log(s,i[s]);console.groupEnd()},each:function(i){var s=this.entries;for(var r in s)if(i(r,s[r])===!1)break;return this},contains:function(i){var s=this.entries;for(var r in s)if(s[r]===i)return!0;return!1},merge:function(i,s){s===void 0&&(s=!1);var r=this.entries,o=i.entries;for(var a in o)r.hasOwnProperty(a)&&s?r[a]=o[a]:this.set(a,o[a]);return this}});h.exports=l},25774:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50792),i=t(82348),s=new e({Extends:l,initialize:function(){l.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},remove:function(r){if(this.isPending(r)){var o=this._pending,a=o.indexOf(r);a!==-1&&o.splice(a,1)}else this.isActive(r)&&(this._destroy.push(r),this._toProcess++);return r},removeAll:function(){for(var r=this._active,o=this._destroy,a=r.length;a--;)o.push(r[a]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var r=this._destroy,o=this._active,a,u;for(a=0;a<r.length;a++){u=r[a];var f=o.indexOf(u);f!==-1&&(o.splice(f,1),this.emit(i.PROCESS_QUEUE_REMOVE,u))}for(r.length=0,r=this._pending,a=0;a<r.length;a++)u=r[a],(!this.checkQueue||this.checkQueue&&o.indexOf(u)===-1)&&(o.push(u),this.emit(i.PROCESS_QUEUE_ADD,u));return r.length=0,this._toProcess=0,o},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});h.exports=s},59542:(h,d,t)=>{/**
|
||
* @author Vladimir Agafonkin
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(43886);function l(A){if(!(this instanceof l))return new l(A);this._maxEntries=Math.max(4,A||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}l.prototype={all:function(){return this._all(this.data,[])},search:function(A){var R=this.data,P=[],L=this.toBBox;if(!T(A,R))return P;for(var F=[],w,O,B,I;R;){for(w=0,O=R.children.length;w<O;w++)B=R.children[w],I=R.leaf?L(B):B,T(A,I)&&(R.leaf?P.push(B):p(A,I)?this._all(B,P):F.push(B));R=F.pop()}return P},collides:function(A){var R=this.data,P=this.toBBox;if(!T(A,R))return!1;for(var L=[],F,w,O,B;R;){for(F=0,w=R.children.length;F<w;F++)if(O=R.children[F],B=R.leaf?P(O):O,T(A,B)){if(R.leaf||p(A,B))return!0;L.push(O)}R=L.pop()}return!1},load:function(A){if(!(A&&A.length))return this;if(A.length<this._minEntries){for(var R=0,P=A.length;R<P;R++)this.insert(A[R]);return this}var L=this._build(A.slice(),0,A.length-1,0);if(!this.data.children.length)this.data=L;else if(this.data.height===L.height)this._splitRoot(this.data,L);else{if(this.data.height<L.height){var F=this.data;this.data=L,L=F}this._insert(L,this.data.height-L.height-1,!0)}return this},insert:function(A){return A&&this._insert(A,this.data.height-1),this},clear:function(){return this.data=C([]),this},remove:function(A,R){if(!A)return this;for(var P=this.data,L=this.toBBox(A),F=[],w=[],O,B,I,D;P||F.length;){if(P||(P=F.pop(),B=F[F.length-1],O=w.pop(),D=!0),P.leaf&&(I=i(A,P.children,R),I!==-1))return P.children.splice(I,1),F.push(P),this._condense(F),this;!D&&!P.leaf&&p(P,L)?(F.push(P),w.push(O),O=0,B=P,P=P.children[0]):B?(O++,P=B.children[O],D=!1):P=null}return this},toBBox:function(A){return A},compareMinX:a,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(A){return this.data=A,this},_all:function(A,R){for(var P=[];A;)A.leaf?R.push.apply(R,A.children):P.push.apply(P,A.children),A=P.pop();return R},_build:function(A,R,P,L){var F=P-R+1,w=this._maxEntries,O;if(F<=w)return O=C(A.slice(R,P+1)),s(O,this.toBBox),O;L||(L=Math.ceil(Math.log(F)/Math.log(w)),w=Math.ceil(F/Math.pow(w,L-1))),O=C([]),O.leaf=!1,O.height=L;var B=Math.ceil(F/w),I=B*Math.ceil(Math.sqrt(w)),D,N,z,V;for(M(A,R,P,I,this.compareMinX),D=R;D<=P;D+=I)for(z=Math.min(D+I-1,P),M(A,D,z,B,this.compareMinY),N=D;N<=z;N+=B)V=Math.min(N+B-1,z),O.children.push(this._build(A,N,V,L-1));return s(O,this.toBBox),O},_chooseSubtree:function(A,R,P,L){for(var F,w,O,B,I,D,N,z;L.push(R),!(R.leaf||L.length-1===P);){for(N=z=1/0,F=0,w=R.children.length;F<w;F++)O=R.children[F],I=f(O),D=c(A,O)-I,D<z?(z=D,N=I<N?I:N,B=O):D===z&&I<N&&(N=I,B=O);R=B||R.children[0]}return R},_insert:function(A,R,P){var L=this.toBBox,F=P?A:L(A),w=[],O=this._chooseSubtree(F,this.data,R,w);for(O.children.push(A),o(O,F);R>=0&&w[R].children.length>this._maxEntries;)this._split(w,R),R--;this._adjustParentBBoxes(F,w,R)},_split:function(A,R){var P=A[R],L=P.children.length,F=this._minEntries;this._chooseSplitAxis(P,F,L);var w=this._chooseSplitIndex(P,F,L),O=C(P.children.splice(w,P.children.length-w));O.height=P.height,O.leaf=P.leaf,s(P,this.toBBox),s(O,this.toBBox),R?A[R-1].children.push(O):this._splitRoot(P,O)},_splitRoot:function(A,R){this.data=C([A,R]),this.data.height=A.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(A,R,P){var L,F,w,O,B,I,D,N;for(I=D=1/0,L=R;L<=P-R;L++)F=r(A,0,L,this.toBBox),w=r(A,L,P,this.toBBox),O=g(F,w),B=f(F)+f(w),O<I?(I=O,N=L,D=B<D?B:D):O===I&&B<D&&(D=B,N=L);return N},_chooseSplitAxis:function(A,R,P){var L=A.leaf?this.compareMinX:a,F=A.leaf?this.compareMinY:u,w=this._allDistMargin(A,R,P,L),O=this._allDistMargin(A,R,P,F);w<O&&A.children.sort(L)},_allDistMargin:function(A,R,P,L){A.children.sort(L);var F=this.toBBox,w=r(A,0,R,F),O=r(A,P-R,P,F),B=v(w)+v(O),I,D;for(I=R;I<P-R;I++)D=A.children[I],o(w,A.leaf?F(D):D),B+=v(w);for(I=P-R-1;I>=R;I--)D=A.children[I],o(O,A.leaf?F(D):D),B+=v(O);return B},_adjustParentBBoxes:function(A,R,P){for(var L=P;L>=0;L--)o(R[L],A)},_condense:function(A){for(var R=A.length-1,P;R>=0;R--)A[R].children.length===0?R>0?(P=A[R-1].children,P.splice(P.indexOf(A[R]),1)):this.clear():s(A[R],this.toBBox)},compareMinX:function(A,R){return A.left-R.left},compareMinY:function(A,R){return A.top-R.top},toBBox:function(A){return{minX:A.left,minY:A.top,maxX:A.right,maxY:A.bottom}}};function i(A,R,P){if(!P)return R.indexOf(A);for(var L=0;L<R.length;L++)if(P(A,R[L]))return L;return-1}function s(A,R){r(A,0,A.children.length,R,A)}function r(A,R,P,L,F){F||(F=C(null)),F.minX=1/0,F.minY=1/0,F.maxX=-1/0,F.maxY=-1/0;for(var w=R,O;w<P;w++)O=A.children[w],o(F,A.leaf?L(O):O);return F}function o(A,R){return A.minX=Math.min(A.minX,R.minX),A.minY=Math.min(A.minY,R.minY),A.maxX=Math.max(A.maxX,R.maxX),A.maxY=Math.max(A.maxY,R.maxY),A}function a(A,R){return A.minX-R.minX}function u(A,R){return A.minY-R.minY}function f(A){return(A.maxX-A.minX)*(A.maxY-A.minY)}function v(A){return A.maxX-A.minX+(A.maxY-A.minY)}function c(A,R){return(Math.max(R.maxX,A.maxX)-Math.min(R.minX,A.minX))*(Math.max(R.maxY,A.maxY)-Math.min(R.minY,A.minY))}function g(A,R){var P=Math.max(A.minX,R.minX),L=Math.max(A.minY,R.minY),F=Math.min(A.maxX,R.maxX),w=Math.min(A.maxY,R.maxY);return Math.max(0,F-P)*Math.max(0,w-L)}function p(A,R){return A.minX<=R.minX&&A.minY<=R.minY&&R.maxX<=A.maxX&&R.maxY<=A.maxY}function T(A,R){return R.minX<=A.maxX&&R.minY<=A.maxY&&R.maxX>=A.minX&&R.maxY>=A.minY}function C(A){return{children:A,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function M(A,R,P,L,F){for(var w=[R,P],O;w.length;)P=w.pop(),R=w.pop(),!(P-R<=L)&&(O=R+Math.ceil((P-R)/L/2)*L,e(A,O,R,P,F),w.push(R,O,O,P))}h.exports=l},86555:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45319),l=t(83419),i=t(56583),s=t(26099),r=new l({initialize:function(a,u,f,v){a===void 0&&(a=0),u===void 0&&(u=a),f===void 0&&(f=0),v===void 0&&(v=null),this._width=a,this._height=u,this._parent=v,this.aspectMode=f,this.aspectRatio=u===0?1:a/u,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new s},setAspectMode:function(o){return o===void 0&&(o=0),this.aspectMode=o,this.setSize(this._width,this._height)},setSnap:function(o,a){return o===void 0&&(o=0),a===void 0&&(a=o),this.snapTo.set(o,a),this.setSize(this._width,this._height)},setParent:function(o){return this._parent=o,this.setSize(this._width,this._height)},setMin:function(o,a){return o===void 0&&(o=0),a===void 0&&(a=o),this.minWidth=e(o,0,this.maxWidth),this.minHeight=e(a,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(o,a){return o===void 0&&(o=Number.MAX_VALUE),a===void 0&&(a=o),this.maxWidth=e(o,this.minWidth,Number.MAX_VALUE),this.maxHeight=e(a,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(o,a){switch(o===void 0&&(o=0),a===void 0&&(a=o),this.aspectMode){case r.NONE:this._width=this.getNewWidth(i(o,this.snapTo.x)),this._height=this.getNewHeight(i(a,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case r.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(i(o,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case r.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(i(a,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case r.FIT:this.constrain(o,a,!0);break;case r.ENVELOP:this.constrain(o,a,!1);break}return this},setAspectRatio:function(o){return this.aspectRatio=o,this.setSize(this._width,this._height)},resize:function(o,a){return this._width=this.getNewWidth(i(o,this.snapTo.x)),this._height=this.getNewHeight(i(a,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(o,a){return a===void 0&&(a=!0),o=e(o,this.minWidth,this.maxWidth),a&&this._parent&&o>this._parent.width&&(o=Math.max(this.minWidth,this._parent.width)),o},getNewHeight:function(o,a){return a===void 0&&(a=!0),o=e(o,this.minHeight,this.maxHeight),a&&this._parent&&o>this._parent.height&&(o=Math.max(this.minHeight,this._parent.height)),o},constrain:function(o,a,u){o===void 0&&(o=0),a===void 0&&(a=o),u===void 0&&(u=!0),o=this.getNewWidth(o),a=this.getNewHeight(a);var f=this.snapTo,v=a===0?1:o/a;return u&&this.aspectRatio>v||!u&&this.aspectRatio<v?(o=i(o,f.x),a=o/this.aspectRatio,f.y>0&&(a=i(a,f.y),o=a*this.aspectRatio)):(u&&this.aspectRatio<v||!u&&this.aspectRatio>v)&&(a=i(a,f.y),o=a*this.aspectRatio,f.x>0&&(o=i(o,f.x),a=o*(1/this.aspectRatio))),this._width=o,this._height=a,this},fitTo:function(o,a){return this.constrain(o,a,!0)},envelop:function(o,a){return this.constrain(o,a,!1)},setWidth:function(o){return this.setSize(o,this._height)},setHeight:function(o){return this.setSize(this._width,o)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(o){o&&o.style&&(o.style.width=this._width+"px",o.style.height=this._height+"px")},copy:function(o){return o.setAspectMode(this.aspectMode),o.aspectRatio=this.aspectRatio,o.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(o){this.setSize(o,this._height)}},height:{get:function(){return this._height},set:function(o){this.setSize(this._width,o)}}});r.NONE=0,r.WIDTH_CONTROLS_HEIGHT=1,r.HEIGHT_CONTROLS_WIDTH=2,r.FIT=3,r.ENVELOP=4,h.exports=r},15238:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="add"},56187:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="remove"},82348:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}},41392:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Size:t(86555)}},57382:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(45319),i=t(40987),s=t(8054),r=t(50030),o=t(79237),a=new e({Extends:o,initialize:function(f,v,c,g,p){o.call(this,f,v,c,g,p),this.add("__BASE",0,0,0,g,p),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=g,this.height=p,this.imageData=this.context.getImageData(0,0,g,p),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===s.WEBGL&&this.refresh(),this},draw:function(u,f,v,c){return c===void 0&&(c=!0),this.context.drawImage(v,u,f),c&&this.update(),this},drawFrame:function(u,f,v,c,g){v===void 0&&(v=0),c===void 0&&(c=0),g===void 0&&(g=!0);var p=this.manager.getFrame(u,f);if(p){var T=p.canvasData,C=p.cutWidth,M=p.cutHeight,A=p.source.resolution;this.context.drawImage(p.source.image,T.x,T.y,C,M,v,c,C/A,M/A),g&&this.update()}return this},setPixel:function(u,f,v,c,g,p){p===void 0&&(p=255),u=Math.abs(Math.floor(u)),f=Math.abs(Math.floor(f));var T=this.getIndex(u,f);if(T>-1){var C=this.context.getImageData(u,f,1,1);C.data[0]=v,C.data[1]=c,C.data[2]=g,C.data[3]=p,this.context.putImageData(C,u,f)}return this},putData:function(u,f,v,c,g,p,T){return c===void 0&&(c=0),g===void 0&&(g=0),p===void 0&&(p=u.width),T===void 0&&(T=u.height),this.context.putImageData(u,f,v,c,g,p,T),this},getData:function(u,f,v,c){u=l(Math.floor(u),0,this.width-1),f=l(Math.floor(f),0,this.height-1),v=l(v,1,this.width-u),c=l(c,1,this.height-f);var g=this.context.getImageData(u,f,v,c);return g},getPixel:function(u,f,v){v||(v=new i);var c=this.getIndex(u,f);if(c>-1){var g=this.data,p=g[c+0],T=g[c+1],C=g[c+2],M=g[c+3];v.setTo(p,T,C,M)}return v},getPixels:function(u,f,v,c){u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=this.width),c===void 0&&(c=v),u=Math.abs(Math.round(u)),f=Math.abs(Math.round(f));for(var g=l(u,0,this.width),p=l(u+v,0,this.width),T=l(f,0,this.height),C=l(f+c,0,this.height),M=new i,A=[],R=T;R<C;R++){for(var P=[],L=g;L<p;L++)M=this.getPixel(L,R,M),P.push({x:L,y:R,color:M.color,alpha:M.alphaGL});A.push(P)}return A},getIndex:function(u,f){return u=Math.abs(Math.round(u)),f=Math.abs(Math.round(f)),u<this.width&&f<this.height?(u+f*this.width)*4:-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(u,f,v,c,g){return u===void 0&&(u=0),f===void 0&&(f=0),v===void 0&&(v=this.width),c===void 0&&(c=this.height),g===void 0&&(g=!0),this.context.clearRect(u,f,v,c),g&&this.update(),this},setSize:function(u,f){return f===void 0&&(f=u),(u!==this.width||f!==this.height)&&(this.canvas.width=u,this.canvas.height=f,this._source.width=u,this._source.height=f,this._source.isPowerOf2=r(u,f),this.frames.__BASE.setSize(u,f,0,0),this.width=u,this.height=f,this.refresh()),this},destroy:function(){o.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}});h.exports=a},81320:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(10312),l=t(38058),i=t(27919),s=t(83419),r=t(8054),o=t(87774),a=t(4327),u=t(95540),f=t(79237),v=t(70554),c=t(42538),g=t(61340),p=new s({Extends:f,initialize:function(C,M,A,R,P){A===void 0&&(A=256),R===void 0&&(R=256),P===void 0&&(P=!0),this.type="DynamicTexture";var L=C.game.renderer,F=L&&L.type===r.CANVAS,w=F?i.create2D(this,A,R):[this];if(f.call(this,C,M,w,A,R),this.add("__BASE",0,0,0,A,R),this.renderer=L,this.width=-1,this.height=-1,this.commandBuffer=[],this.canvas=F?w:null,this.context=F?w.getContext("2d",{willReadFrequently:!0}):null,this.camera=new l(0,0,A,R).setScene(C.game.scene.systemScene,!1),this.drawingContext=F?null:new o(L,{width:A,height:R,camera:this.camera,autoClear:!1}),!F){var O=this.get();O.source.glTexture=this.drawingContext.texture}this.setSize(A,R,P)},setSize:function(T,C,M){C===void 0&&(C=T),M===void 0&&(M=!0),M&&(T=Math.floor(T),C=Math.floor(C),T%2!==0&&T++,C%2!==0&&C++);var A=this.get(),R=A.source;if(T!==this.width||C!==this.height){this.canvas&&(this.canvas.width=T,this.canvas.height=C);var P=this.drawingContext;P&&(P.width!==T||P.height!==C)&&P.resize(T,C),this.camera.setSize(T,C),R.width=T,R.height=C,A.setSize(T,C),this.width=T,this.height=C}else{var L=this.getSourceImage();A.cutX+T>L.width&&(T=L.width-A.cutX),A.cutY+C>L.height&&(C=L.height-A.cutY),A.setSize(T,C,A.cutX,A.cutY)}return this},render:function(){if(this.commandBuffer.length!==0)return this.camera.preRender(),this.renderer.type===r.WEBGL&&this._renderWebGL(),this.renderer.type===r.CANVAS&&this._renderCanvas(),this},_renderWebGL:function(){this.renderer.renderNodes.getNode("DynamicTextureHandler").run(this)},_renderCanvas:function(){var T=this.camera,C=this.context,M=this.renderer,A=this.manager;M.setContext(C);for(var R,P,L,F,w,O,B,I,D,N,z,V,U,G,b,Y=this.commandBuffer,W=Y.length,H=!1,X=!1,K=0;K<W;K++){var Z=Y[K];switch(Z){case c.CLEAR:{G=Y[++K],b=Y[++K],U=Y[++K],w=Y[++K],G!==void 0&&b!==void 0&&U!==void 0&&w!==void 0?C.clearRect(G,b,U,w):(C.save(),C.setTransform(1,0,0,1,0,0),C.clearRect(0,0,this.width,this.height),C.restore());break}case c.FILL:{var Q=Y[++K];G=Y[++K],b=Y[++K],U=Y[++K],w=Y[++K],R=(Q>>24&255)/255;var j=Q>>16&255,J=Q>>8&255,tt=Q&255;C.save(),C.globalCompositeOperation="source-over",C.fillStyle="rgba("+j+","+J+","+tt+","+R+")",C.fillRect(G,b,U,w),C.restore();break}case c.STAMP:{O=Y[++K],F=Y[++K],G=Y[++K],b=Y[++K],R=Y[++K],V=Y[++K],D=Y[++K],N=Y[++K],z=Y[++K],B=Y[++K],I=Y[++K],P=Y[++K],X&&(P=e.ERASE);var k=A.resetStamp(R,V);k.setPosition(G,b).setRotation(D).setScale(N,z).setTexture(O,F).setOrigin(B,I).setBlendMode(P),k.renderCanvas(M,k,T,null);break}case c.REPEAT:{O=Y[++K],F=Y[++K],G=Y[++K],b=Y[++K],R=Y[++K],V=Y[++K],D=Y[++K],N=Y[++K],z=Y[++K],B=Y[++K],I=Y[++K],P=Y[++K],U=Y[++K],w=Y[++K];var q=Y[++K],_=Y[++K],rt=Y[++K],at=Y[++K],ht=Y[++K];X&&(P=e.ERASE);var ot=A.resetTileSprite(R,V);ot.setPosition(G,b).setRotation(D).setScale(N,z).setTexture(O,F).setSize(U,w).setOrigin(B,I).setBlendMode(P).setTilePosition(q,_).setTileRotation(rt).setTileScale(at,ht),ot.renderCanvas(M,ot,T,null);break}case c.DRAW:{var nt=Y[++K];if(G=Y[++K],b=Y[++K],G!==void 0){var it=nt.x;nt.x=G}if(b!==void 0){var lt=nt.y;nt.y=b}X&&(L=nt.blendMode,nt.blendMode=e.ERASE),nt.renderCanvas(M,nt,T,null),G!==void 0&&(nt.x=it),b!==void 0&&(nt.y=lt),X&&(nt.blendMode=L);break}case c.SET_ERASE:{X=!!Y[++K];break}case c.PRESERVE:{H=Y[++K];break}case c.CALLBACK:{var dt=Y[++K];dt();break}case c.CAPTURE:{nt=Y[++K];var ct=Y[++K],Bt=this.startCapture(nt,ct);nt.renderCanvas(M,nt,ct.camera||T,Bt.transform),this.finishCapture(nt,Bt);break}}}H||(Y.length=0),M.setContext()},fill:function(T,C,M,A,R,P){C===void 0&&(C=1),M===void 0&&(M=0),A===void 0&&(A=0),R===void 0&&(R=this.width),P===void 0&&(P=this.height);var L=T>>16&255,F=T>>8&255,w=T&255,O=v.getTintFromFloats(L/255,F/255,w/255,C);return this.commandBuffer.push(c.FILL,O,M,A,R,P),this},clear:function(T,C,M,A){return T===void 0&&(T=0),C===void 0&&(C=0),M===void 0&&(M=this.width),A===void 0&&(A=this.height),this.commandBuffer.push(c.CLEAR,T,C,M,A),this},stamp:function(T,C,M,A,R){M===void 0&&(M=0),A===void 0&&(A=0);var P=u(R,"alpha",1),L=u(R,"tint",16777215),F=u(R,"angle",0),w=u(R,"rotation",0),O=u(R,"scale",1),B=u(R,"scaleX",O),I=u(R,"scaleY",O),D=u(R,"originX",.5),N=u(R,"originY",.5),z=u(R,"blendMode",0);return F!==0&&(w=F*Math.PI/180),this.commandBuffer.push(c.STAMP,T,C,M,A,P,L,w,B,I,D,N,z),this},erase:function(T,C,M,A,R){var P=this.commandBuffer,L=P.length;return P[L-2]===c.SET_ERASE&&!P[L-1]?P.length-=2:P.push(c.SET_ERASE,!0),this.draw(T,C,M,A,R),P.push(c.SET_ERASE,!1),this},draw:function(T,C,M,A,R){Array.isArray(T)||(T=[T]);for(var P=T.length,L=0;L<P;L++){var F=T[L];if(!(!F||F===this))if(F.renderWebGL||F.renderCanvas)this.commandBuffer.push(c.DRAW,F,C,M);else if(F.isParent||F.list)for(var w=F.getChildren(),O=0;O<w.length;O++){var B=w[O];B.willRender(this.camera)&&this.draw(B,C,M)}else typeof F=="string"?this.stamp(F,null,C,M,{alpha:A,tint:R}):F instanceof a?this.stamp(F.texture.key,F,C,M,{alpha:A,tint:R}):Array.isArray(F)&&this.draw(F,C,M,A,R)}return this},capture:function(T,C){return C||(C={}),this.commandBuffer.push(c.CAPTURE,T,C),this},startCapture:function(T,C){var M={},A=void 0;return C.transform instanceof g?A=C.transform:C.transform==="world"&&T.parentContainer&&(A=T.parentContainer.getWorldTransformMatrix()),A&&(M.transform=A),C.camera&&(A||(A=new g),C.camera.matrixExternal.multiply(A,A)),C.x!==void 0&&(M.x=T.x,T.x=C.x),C.y!==void 0&&(M.y=T.y,T.y=C.y),C.rotation!==void 0?(M.rotation=T.rotation,T.rotation=C.rotation):C.angle!==void 0&&(M.rotation=T.rotation,T.angle=C.angle),C.scaleX!==void 0&&(M.scaleX=T.scaleX,T.scaleX=C.scaleX),C.scaleY!==void 0&&(M.scaleY=T.scaleY,T.scaleY=C.scaleY),C.originX!==void 0&&(M.originX=T.originX,T.originX=C.originX),C.originY!==void 0&&(M.originY=T.originY,T.originY=C.originY),C.alpha!==void 0&&(M.alpha=T.alpha,T.alpha=C.alpha),C.tint!==void 0&&(M.tint=T.tint,T.tint=C.tint),C.blendMode!==void 0&&(M.blendMode=T.blendMode,T.blendMode=C.blendMode),M},finishCapture:function(T,C){C.x!==void 0&&(T.x=C.x),C.y!==void 0&&(T.y=C.y),C.rotation!==void 0&&(T.rotation=C.rotation),C.scaleX!==void 0&&(T.scaleX=C.scaleX),C.scaleY!==void 0&&(T.scaleY=C.scaleY),C.originX!==void 0&&(T.originX=C.originX),C.originY!==void 0&&(T.originY=C.originY),C.alpha!==void 0&&(T.alpha=C.alpha),C.tint!==void 0&&(T.tint=C.tint),C.blendMode!==void 0&&(T.blendMode=C.blendMode)},repeat:function(T,C,M,A,R,P,L){M===void 0&&(M=0),A===void 0&&(A=0),R===void 0&&(R=this.width),P===void 0&&(P=this.height);var F=u(L,"alpha",1),w=u(L,"tint",16777215),O=u(L,"angle",0),B=u(L,"rotation",0),I=u(L,"scale",1),D=u(L,"scaleX",I),N=u(L,"scaleY",I),z=u(L,"originX",0),V=u(L,"originY",0),U=u(L,"blendMode",0);O!==0&&(B=O*Math.PI/180);var G=u(L,"tilePositionX",0),b=u(L,"tilePositionY",0),Y=u(L,"tileRotation",0),W=u(L,"tileScaleX",1),H=u(L,"tileScaleY",1);return this.commandBuffer.push(c.REPEAT,T,C,M,A,F,w,B,D,N,z,V,U,R,P,G,b,Y,W,H),this},preserve:function(T){return this.commandBuffer.push(c.PRESERVE,T),this},callback:function(T){return this.commandBuffer.push(c.CALLBACK,T),this},snapshotArea:function(T,C,M,A,R,P,L){return this.drawingContext?this.renderer.snapshotFramebuffer(this.drawingContext.framebuffer,this.width,this.height,R,!1,T,C,M,A,P,L):this.renderer.snapshotCanvas(this.canvas,R,!1,T,C,M,A,P,L),this},snapshot:function(T,C,M){return this.snapshotArea(0,0,this.width,this.height,T,C,M)},snapshotPixel:function(T,C,M){return this.snapshotArea(T,C,1,1,M,"pixel")},getWebGLTexture:function(){if(this.drawingContext)return this.drawingContext.texture},renderWebGL:function(T,C,M,A){var R=this.manager.resetStamp();R.setTexture(this),R.setOrigin(0),R.renderWebGLStep(T,R,M,A)},renderCanvas:function(){},destroy:function(){var T=this.manager.stamp;T&&T.texture===this&&this.manager.resetStamp(),f.prototype.destroy.call(this),i.remove(this.canvas),this.drawingContext&&this.drawingContext.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});h.exports=p},42538:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={CLEAR:0,FILL:1,STAMP:2,REPEAT:3,DRAW:4,SET_ERASE:5,PRESERVE:6,CALLBACK:7,CAPTURE:8}},4327:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(45319),i=t(79291),s=new e({initialize:function(o,a,u,f,v,c,g){this.texture=o,this.name=a,this.source=o.source[u],this.sourceIndex=u,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(c,g,f,v)},setCutPosition:function(r,o){return r===void 0&&(r=0),o===void 0&&(o=0),this.cutX=r,this.cutY=o,this.updateUVs()},setCutSize:function(r,o){return this.cutWidth=r,this.cutHeight=o,this.updateUVs()},setSize:function(r,o,a,u){a===void 0&&(a=0),u===void 0&&(u=0),this.setCutPosition(a,u),this.setCutSize(r,o),this.width=r,this.height=o,this.halfWidth=Math.floor(r*.5),this.halfHeight=Math.floor(o*.5),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2);var f=this.data,v=f.cut;v.x=a,v.y=u,v.w=r,v.h=o,v.r=a+r,v.b=u+o,f.sourceSize.w=r,f.sourceSize.h=o,f.spriteSourceSize.w=r,f.spriteSourceSize.h=o,f.radius=.5*Math.sqrt(r*r+o*o);var c=f.drawImage;return c.x=a,c.y=u,c.width=r,c.height=o,this.updateUVs()},setTrim:function(r,o,a,u,f,v){var c=this.data,g=c.spriteSourceSize;return c.trim=!0,c.sourceSize.w=r,c.sourceSize.h=o,g.x=a,g.y=u,g.w=f,g.h=v,g.r=a+f,g.b=u+v,this.x=a,this.y=u,this.width=f,this.height=v,this.halfWidth=f*.5,this.halfHeight=v*.5,this.centerX=Math.floor(f/2),this.centerY=Math.floor(v/2),this.updateUVs()},setScale9:function(r,o,a,u){var f=this.data;return f.scale9=!0,f.is3Slice=o===0&&u===this.height,f.scale9Borders.x=r,f.scale9Borders.y=o,f.scale9Borders.w=a,f.scale9Borders.h=u,this},setCropUVs:function(r,o,a,u,f,v,c){var g=this.cutX,p=this.cutY,T=this.cutWidth,C=this.cutHeight,M=this.realWidth,A=this.realHeight;o=l(o,0,M),a=l(a,0,A),u=l(u,0,M-o),f=l(f,0,A-a);var R=g+o,P=p+a,L=u,F=f,w=this.data;if(w.trim){var O=w.spriteSourceSize;u=l(u,0,O.x+T-o),f=l(f,0,O.y+C-a);var B=o+u,I=a+f,D=!(O.r<o||O.b<a||O.x>B||O.y>I);if(D){var N=Math.max(O.x,o),z=Math.max(O.y,a),V=Math.min(O.r,B)-N,U=Math.min(O.b,I)-z;L=V,F=U,v?R=g+(T-(N-O.x)-V):R=g+(N-O.x),c?P=p+(C-(z-O.y)-U):P=p+(z-O.y),o=N,a=z,u=V,f=U}else R=0,P=0,L=0,F=0}else v&&(R=g+(T-o-u)),c&&(P=p+(C-a-f));var G=this.source.width,b=this.source.height;return r.u0=Math.max(0,R/G),r.v0=1-Math.max(0,P/b),r.u1=Math.min(1,(R+L)/G),r.v1=1-Math.min(1,(P+F)/b),r.x=o,r.y=a,r.cx=R,r.cy=P,r.cw=L,r.ch=F,r.width=u,r.height=f,r.flipX=v,r.flipY=c,r},updateCropUVs:function(r,o,a){return this.setCropUVs(r,r.x,r.y,r.width,r.height,o,a)},setUVs:function(r,o,a,u,f,v){var c=this.data.drawImage;return c.width=r,c.height=o,this.u0=a,this.v0=u,this.u1=f,this.v1=v,this},updateUVs:function(){var r=this.cutX,o=this.cutY,a=this.cutWidth,u=this.cutHeight,f=this.data.drawImage;f.width=a,f.height=u;var v=this.source.width,c=this.source.height;return this.u0=r/v,this.v0=1-o/c,this.u1=(r+a)/v,this.v1=1-(o+u)/c,this},updateUVsInverted:function(){var r=this.source.width,o=this.source.height;return this.u0=(this.cutX+this.cutHeight)/r,this.v0=1-this.cutY/o,this.u1=this.cutX/r,this.v1=1-(this.cutY+this.cutWidth)/o,this},clone:function(){var r=new s(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=i(!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}}});h.exports=s},79237:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(4327),i=t(11876),s='Texture "%s" has no frame "%s"',r=new e({initialize:function(a,u,f,v,c){Array.isArray(f)||(f=[f]),this.manager=a,this.key=u,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0,this.smoothPixelArt=null;for(var g=0;g<f.length;g++)this.source.push(new i(this,f[g],v,c))},add:function(o,a,u,f,v,c){if(this.has(o))return null;var g=new l(this,o,a,u,f,v,c);return this.frames[o]=g,this.firstFrame==="__BASE"&&(this.firstFrame=o),this.frameTotal++,g},remove:function(o){if(this.has(o)){var a=this.get(o);return a.destroy(),delete this.frames[o],!0}return!1},has:function(o){return this.frames.hasOwnProperty(o)},get:function(o){o||(o=this.firstFrame);var a=this.frames[o];return a||(console.warn(s,this.key,o),a=this.frames[this.firstFrame]),a},getTextureSourceIndex:function(o){for(var a=0;a<this.source.length;a++)if(this.source[a]===o)return a;return-1},getFramesFromTextureSource:function(o,a){a===void 0&&(a=!1);var u=[];for(var f in this.frames)if(!(f==="__BASE"&&!a)){var v=this.frames[f];v.sourceIndex===o&&u.push(v)}return u},getFrameBounds:function(o){o===void 0&&(o=0);for(var a=this.getFramesFromTextureSource(o,!0),u=a[0],f=u.cutX,v=u.cutY,c=u.cutX+u.cutWidth,g=u.cutY+u.cutHeight,p=1;p<a.length;p++){var T=a[p];T.cutX<f&&(f=T.cutX),T.cutY<v&&(v=T.cutY),T.cutX+T.cutWidth>c&&(c=T.cutX+T.cutWidth),T.cutY+T.cutHeight>g&&(g=T.cutY+T.cutHeight)}return{x:f,y:v,width:c-f,height:g-v}},getFrameNames:function(o){o===void 0&&(o=!1);var a=Object.keys(this.frames);if(!o){var u=a.indexOf("__BASE");u!==-1&&a.splice(u,1)}return a},getSourceImage:function(o){(o==null||this.frameTotal===1)&&(o="__BASE");var a=this.frames[o];return a?a.source.image:(console.warn(s,this.key,o),this.frames.__BASE.source.image)},getDataSourceImage:function(o){(o==null||this.frameTotal===1)&&(o="__BASE");var a=this.frames[o],u;return a?u=a.sourceIndex:(console.warn(s,this.key,o),u=this.frames.__BASE.sourceIndex),this.dataSource[u].image},setDataSource:function(o){Array.isArray(o)||(o=[o]);for(var a=0;a<o.length;a++){var u=this.source[a];this.dataSource.push(new i(this,o[a],u.width,u.height))}},setFilter:function(o){var a;for(a=0;a<this.source.length;a++)this.source[a].setFilter(o);for(a=0;a<this.dataSource.length;a++)this.dataSource[a].setFilter(o)},setSmoothPixelArt:function(o){this.smoothPixelArt=o,o&&this.setFilter(Phaser.Textures.FilterMode.LINEAR)},setWrap:function(o,a){a===void 0&&(a=o);for(var u=0;u<this.source.length;u++)this.source[u].setWrap(o,a);for(u=0;u<this.dataSource.length;u++)this.dataSource[u].setWrap(o,a)},destroy:function(){var o,a=this.source,u=this.dataSource;for(o=0;o<a.length;o++)a[o]&&a[o].destroy();for(o=0;o<u.length;o++)u[o]&&u[o].destroy();for(var f in this.frames){var v=this.frames[f];v&&v.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}});h.exports=r},17130:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(27919),l=t(57382),i=t(83419),s=t(40987),r=t(8054),o=t(81320),a=t(50792),u=t(69442),f=t(4327),v=t(8443),c=t(35154),g=t(88571),p=t(41212),T=t(61309),C=t(87841),M=t(79237),A=t(20839),R=new i({Extends:a,initialize:function(L){a.call(this),this.game=L,this.name="TextureManager",this.list={},this._tempCanvas=e.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new C,this.tileSprite,this.silentWarnings=!1,L.events.once(v.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var P=this.game.config;P.defaultImage!==null&&this.addBase64("__DEFAULT",P.defaultImage),P.missingImage!==null&&this.addBase64("__MISSING",P.missingImage),P.whiteImage!==null&&this.addBase64("__WHITE",P.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(v.DESTROY,this.destroy,this),this.game.events.once(v.SYSTEM_READY,function(L){this.stamp=new g(L).setOrigin(0),this.tileSprite=new A(L,0,0,256,256,"__WHITE").setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY))},checkKey:function(P){return!P||typeof P!="string"||this.exists(P)?(this.silentWarnings||console.error("Texture key already in use: "+P),!1):!0},remove:function(P){if(typeof P=="string")if(this.exists(P))P=this.get(P);else return this.silentWarnings||console.warn("No texture found matching key: "+P),this;var L=P.key;return this.list.hasOwnProperty(L)&&(P.destroy(),this.emit(u.REMOVE,L),this.emit(u.REMOVE_KEY+L)),this},removeKey:function(P){return this.list.hasOwnProperty(P)&&delete this.list[P],this},addBase64:function(P,L){if(this.checkKey(P)){var F=this,w=new Image;w.onerror=function(){F.emit(u.ERROR,P)},w.onload=function(){var O=F.create(P,w);O&&(T.Image(O,0),F.emit(u.ADD,P,O),F.emit(u.ADD_KEY+P,O),F.emit(u.LOAD,P,O))},w.src=L}return this},getBase64:function(P,L,F,w){F===void 0&&(F="image/png"),w===void 0&&(w=.92);var O="",B=this.getFrame(P,L);if(B&&(B.source.isRenderTexture||B.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(B){var I=B.canvasData,D=e.create2D(this,I.width,I.height),N=D.getContext("2d",{willReadFrequently:!0});I.width>0&&I.height>0&&N.drawImage(B.source.image,I.x,I.y,I.width,I.height,0,0,I.width,I.height),O=D.toDataURL(F,w),e.remove(D)}return O},addImage:function(P,L,F){var w=null;return this.checkKey(P)&&(w=this.create(P,L),T.Image(w,0),F&&w.setDataSource(F),this.emit(u.ADD,P,w),this.emit(u.ADD_KEY+P,w)),w},addGLTexture:function(P,L){var F=null;if(this.checkKey(P)){var w=L.width,O=L.height;F=this.create(P,L,w,O),F.add("__BASE",0,0,0,w,O),this.emit(u.ADD,P,F),this.emit(u.ADD_KEY+P,F)}return F},addCompressedTexture:function(P,L,F){var w=null;if(this.checkKey(P)){if(w=this.create(P,L),w.add("__BASE",0,0,0,L.width,L.height),F){var O=function(I,D,N){Array.isArray(N.textures)||Array.isArray(N.frames)?T.JSONArray(I,D,N):T.JSONHash(I,D,N)};if(Array.isArray(F))for(var B=0;B<F.length;B++)O(w,B,F[B]);else O(w,0,F)}this.emit(u.ADD,P,w),this.emit(u.ADD_KEY+P,w)}return w},addRenderTexture:function(P,L){var F=null;return this.checkKey(P)&&(F=this.create(P,L),F.add("__BASE",0,0,0,L.width,L.height),this.emit(u.ADD,P,F),this.emit(u.ADD_KEY+P,F)),F},createCanvas:function(P,L,F){if(L===void 0&&(L=256),F===void 0&&(F=256),this.checkKey(P)){var w=e.create(this,L,F,r.CANVAS,!0);return this.addCanvas(P,w)}return null},addCanvas:function(P,L,F){F===void 0&&(F=!1);var w=null;return F?w=new l(this,P,L,L.width,L.height):this.checkKey(P)&&(w=new l(this,P,L,L.width,L.height),this.list[P]=w,this.emit(u.ADD,P,w),this.emit(u.ADD_KEY+P,w)),w},addDynamicTexture:function(P,L,F,w){var O=null;return typeof P=="string"&&!this.exists(P)?(w===void 0&&(w=!0),O=new o(this,P,L,F,w)):(O=P,P=O.key),this.checkKey(P)?(this.list[P]=O,this.emit(u.ADD,P,O),this.emit(u.ADD_KEY+P,O)):O=null,O},addAtlas:function(P,L,F,w){return Array.isArray(F.textures)||Array.isArray(F.frames)?this.addAtlasJSONArray(P,L,F,w):this.addAtlasJSONHash(P,L,F,w)},addAtlasJSONArray:function(P,L,F,w){var O=null;if(L instanceof M?(P=L.key,O=L):this.checkKey(P)&&(O=this.create(P,L)),O){if(Array.isArray(F))for(var B=F.length===1,I=0;I<O.source.length;I++){var D=B?F[0]:F[I];T.JSONArray(O,I,D)}else T.JSONArray(O,0,F);w&&O.setDataSource(w),this.emit(u.ADD,P,O),this.emit(u.ADD_KEY+P,O)}return O},addAtlasJSONHash:function(P,L,F,w){var O=null;if(L instanceof M?(P=L.key,O=L):this.checkKey(P)&&(O=this.create(P,L)),O){if(Array.isArray(F))for(var B=0;B<F.length;B++)T.JSONHash(O,B,F[B]);else T.JSONHash(O,0,F);w&&O.setDataSource(w),this.emit(u.ADD,P,O),this.emit(u.ADD_KEY+P,O)}return O},addAtlasXML:function(P,L,F,w){var O=null;return L instanceof M?(P=L.key,O=L):this.checkKey(P)&&(O=this.create(P,L)),O&&(T.AtlasXML(O,0,F),w&&O.setDataSource(w),this.emit(u.ADD,P,O),this.emit(u.ADD_KEY+P,O)),O},addUnityAtlas:function(P,L,F,w){var O=null;return L instanceof M?(P=L.key,O=L):this.checkKey(P)&&(O=this.create(P,L)),O&&(T.UnityYAML(O,0,F),w&&O.setDataSource(w),this.emit(u.ADD,P,O),this.emit(u.ADD_KEY+P,O)),O},addSpriteSheet:function(P,L,F,w){var O=null;if(L instanceof M?(P=L.key,O=L):this.checkKey(P)&&(O=this.create(P,L)),O){var B=O.source[0].width,I=O.source[0].height;T.SpriteSheet(O,0,0,0,B,I,F),w&&O.setDataSource(w),this.emit(u.ADD,P,O),this.emit(u.ADD_KEY+P,O)}return O},addSpriteSheetFromAtlas:function(P,L){if(!this.checkKey(P))return null;var F=c(L,"atlas",null),w=c(L,"frame",null);if(!(!F||!w)){var O=this.get(F),B=O.get(w);if(B){var I=B.source.image;I||(I=B.source.glTexture);var D=this.create(P,I);return B.trimmed?T.SpriteSheetFromAtlas(D,B,L):T.SpriteSheet(D,0,B.cutX,B.cutY,B.cutWidth,B.cutHeight,L),this.emit(u.ADD,P,D),this.emit(u.ADD_KEY+P,D),D}}},addUint8Array:function(P,L,F,w){if(!this.checkKey(P)||L.length/4!==F*w)return null;var O=this.create(P,L,F,w);return O.add("__BASE",0,0,0,F,w),this.emit(u.ADD,P,O),this.emit(u.ADD_KEY+P,O),O},create:function(P,L,F,w){var O=null;return this.checkKey(P)&&(O=new M(this,P,L,F,w),this.list[P]=O),O},exists:function(P){return this.list.hasOwnProperty(P)},get:function(P){return P===void 0&&(P="__DEFAULT"),this.list[P]?this.list[P]:P instanceof M?P:P instanceof f?P.texture:this.list.__MISSING},cloneFrame:function(P,L){if(this.list[P])return this.list[P].get(L).clone()},getFrame:function(P,L){if(this.list[P])return this.list[P].get(L)},parseFrame:function(P){if(P){if(typeof P=="string")return this.getFrame(P);if(Array.isArray(P)&&P.length===2)return this.getFrame(P[0],P[1]);if(p(P))return this.getFrame(P.key,P.frame);if(P instanceof M)return P.get();if(P instanceof f)return P}else return},getTextureKeys:function(){var P=[];for(var L in this.list)L!=="__DEFAULT"&&L!=="__MISSING"&&L!=="__WHITE"&&L!=="__NORMAL"&&P.push(L);return P},getPixel:function(P,L,F,w){var O=this.getFrame(F,w);if(O){var B=O.source,I=B.image;if(!(B.isCanvas||B.isVideo||I instanceof HTMLImageElement))return console.warn("TextureManager.getPixelAlpha: The texture source must be Image, Canvas, or Video"),null;P-=O.x,L-=O.y;var D=O.data.cut;if(P+=D.x,L+=D.y,P>=D.x&&P<D.r&&L>=D.y&&L<D.b){var N=this._tempContext;N.clearRect(0,0,1,1),N.drawImage(I,P,L,1,1,0,0,1,1);var z=N.getImageData(0,0,1,1);return new s(z.data[0],z.data[1],z.data[2],z.data[3])}}return null},getPixelAlpha:function(P,L,F,w){var O=this.getFrame(F,w);if(O){var B=O.source,I=B.image;if(!(B.isCanvas||B.isVideo||I instanceof HTMLImageElement))return console.warn("TextureManager.getPixelAlpha: The texture source must be Image, Canvas, or Video"),null;P-=O.x,L-=O.y;var D=O.data.cut;if(P+=D.x,L+=D.y,P>=D.x&&P<D.r&&L>=D.y&&L<D.b){var N=this._tempContext;N.clearRect(0,0,1,1),N.drawImage(I,P,L,1,1,0,0,1,1);var z=N.getImageData(0,0,1,1);return z.data[3]}}return null},setTexture:function(P,L,F){return this.list[L]&&(P.texture=this.list[L],P.frame=P.texture.get(F)),P},renameTexture:function(P,L){var F=this.get(P);return F&&P!==L?(F.key=L,this.list[L]=F,delete this.list[P],!0):!1},each:function(P,L){for(var F=[null],w=1;w<arguments.length;w++)F.push(arguments[w]);for(var O in this.list)F[0]=this.list[O],P.apply(L,F)},resetStamp:function(P,L){P===void 0&&(P=1),L===void 0&&(L=16777215);var F=this.stamp;return F.setCrop(),F.setPosition(0),F.setAngle(0),F.setScale(1),F.setAlpha(P),F.setTint(L),F.setTexture("__WHITE"),F},resetTileSprite:function(P,L){P===void 0&&(P=1),L===void 0&&(L=16777215);var F=this.tileSprite;return F.setPosition(0),F.setAngle(0),F.setScale(1),F.setAlpha(P),F.setTint(L),F.setTexture("__WHITE"),F},destroy:function(){for(var P in this.list)this.list[P].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,e.remove(this._tempCanvas)}});h.exports=R},11876:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(27919),l=t(83419),i=t(50030),s=t(29795),r=t(82751),o=new l({initialize:function(u,f,v,c,g){g===void 0&&(g=!0);var p=u.manager.game;this.renderer=p.renderer,this.texture=u,this.source=f,this.image=f.compressed?null:f,this.compressionAlgorithm=f.compressed?f.format:null,this.resolution=1,this.width=v||f.naturalWidth||f.videoWidth||f.width||0,this.height=c||f.naturalHeight||f.videoHeight||f.height||0,this.scaleMode=s.DEFAULT,this.isCanvas=f instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&f instanceof HTMLVideoElement,this.isRenderTexture=f.type==="RenderTexture"||f.type==="DynamicTexture",this.isGLTexture=f instanceof r,this.isPowerOf2=i(this.width,this.height),this.glTexture=null,this.flipY=g,this.init(p)},init:function(a){var u=this.renderer;if(u){var f=this.source;if(u.gl){var v=this.image,c=this.flipY,g=this.width,p=this.height,T=this.scaleMode;this.isCanvas?this.glTexture=u.createCanvasTexture(v,!1,c):this.isVideo?this.glTexture=u.createVideoTexture(v,!1,c):this.isRenderTexture?this.glTexture=u.createTextureFromSource(null,g,p,T,void 0,c):this.isGLTexture?this.glTexture=f:this.compressionAlgorithm?this.glTexture=u.createTextureFromSource(f,void 0,void 0,T,void 0,c):f instanceof Uint8Array?this.glTexture=u.createUint8ArrayTexture(f,g,p,T,void 0,c):this.glTexture=u.createTextureFromSource(v,g,p,T,void 0,c)}else this.isRenderTexture&&(this.image=f.canvas)}a.config.antialias||this.setFilter(1)},setFilter:function(a){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,a),this.scaleMode=a},setFlipY:function(a){return a===void 0&&(a=!0),a===this.flipY?this:(this.flipY=a,this.update(),this)},setWrap:function(a,u){return this.renderer&&this.renderer.gl&&this.renderer.setTextureWrap(this.glTexture,a,u),this},update:function(){var a=this.renderer,u=this.image,f=this.flipY,v=a.gl;if(v){var c=this.glTexture;this.isCanvas?a.updateCanvasTexture(u,c,f):this.isVideo?a.updateVideoTexture(u,c,f):c.update(u,this.width,this.height,f,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format)}},updateSize:function(a,u){this.width===a&&this.height===u||(this.width=a,this.height=u,this.isPowerOf2=i(a,u))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&e.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});h.exports=o},43378:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={CLAMP_TO_EDGE:33071,REPEAT:10497,MIRRORED_REPEAT:33648};h.exports=d},19673:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={LINEAR:0,NEAREST:1};h.exports=d},44538:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="addtexture"},63486:h=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="addtexture-"},94851:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="onerror"},29099:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="onload"},8678:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="ready"},86415:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="removetexture"},30879:h=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="removetexture-"},69442:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(79291),l=t(19673),i=t(43378),s={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:l,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876),WrapMode:i};s=e(!1,s,l),s=e(!1,s,i),h.exports=s},89905:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(!l.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var i=t.source[e];t.add("__BASE",e,0,0,i.width,i.height);for(var s=l.getElementsByTagName("SubTexture"),r,o=0;o<s.length;o++){var a=s[o].attributes,u=a.name.value,f=parseInt(a.x.value,10),v=parseInt(a.y.value,10),c=parseInt(a.width.value,10),g=parseInt(a.height.value,10);if(r=t.add(u,e,f,v,c,g),a.frameX){var p=Math.abs(parseInt(a.frameX.value,10)),T=Math.abs(parseInt(a.frameY.value,10)),C=parseInt(a.frameWidth.value,10),M=parseInt(a.frameHeight.value,10);r.setTrim(c,g,p,T,C,M)}}return t};h.exports=d},72893:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.source[e];return t.add("__BASE",e,0,0,l.width,l.height),t};h.exports=d},4832:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.source[e];return t.add("__BASE",e,0,0,l.width,l.height),t};h.exports=d},78566:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(41786),l=function(i,s,r){if(!r.frames&&!r.textures){console.warn("Invalid Texture Atlas JSON Array");return}var o=i.source[s];i.add("__BASE",s,0,0,o.width,o.height);for(var a=Array.isArray(r.textures)?r.textures[s].frames:r.frames,u,f=0;f<a.length;f++){var v=a[f];if(u=i.add(v.filename,s,v.frame.x,v.frame.y,v.frame.w,v.frame.h),!u){console.warn("Invalid atlas json, frame already exists: "+v.filename);continue}v.trimmed&&u.setTrim(v.sourceSize.w,v.sourceSize.h,v.spriteSourceSize.x,v.spriteSourceSize.y,v.spriteSourceSize.w,v.spriteSourceSize.h),v.rotated&&(u.rotated=!0,u.updateUVsInverted());var c=v.anchor||v.pivot;c&&(u.customPivot=!0,u.pivotX=c.x,u.pivotY=c.y),v.scale9Borders&&u.setScale9(v.scale9Borders.x,v.scale9Borders.y,v.scale9Borders.w,v.scale9Borders.h),u.customData=e(v)}for(var g in r)g!=="frames"&&(Array.isArray(r[g])?i.customData[g]=r[g].slice(0):i.customData[g]=r[g]);return i};h.exports=l},39711:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(41786),l=function(i,s,r){if(!r.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var o=i.source[s];i.add("__BASE",s,0,0,o.width,o.height);var a=r.frames,u;for(var f in a)if(a.hasOwnProperty(f)){var v=a[f];if(u=i.add(f,s,v.frame.x,v.frame.y,v.frame.w,v.frame.h),!u){console.warn("Invalid atlas json, frame already exists: "+f);continue}v.trimmed&&u.setTrim(v.sourceSize.w,v.sourceSize.h,v.spriteSourceSize.x,v.spriteSourceSize.y,v.spriteSourceSize.w,v.spriteSourceSize.h),v.rotated&&(u.rotated=!0,u.updateUVsInverted());var c=v.anchor||v.pivot;c&&(u.customPivot=!0,u.pivotX=c.x,u.pivotY=c.y),v.scale9Borders&&u.setScale9(v.scale9Borders.x,v.scale9Borders.y,v.scale9Borders.w,v.scale9Borders.h),u.customData=e(v)}for(var g in r)g!=="frames"&&(Array.isArray(r[g])?i.customData[g]=r[g].slice(0):i.customData[g]=r[g]);return i};h.exports=l},31403:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=[171,75,84,88,32,49,49,187,13,10,26,10],l,i=new Uint8Array(t,0,12);for(l=0;l<i.length;l++)if(i[l]!==e[l]){console.warn("KTXParser - Invalid file format");return}var s=Uint32Array.BYTES_PER_ELEMENT,r=new DataView(t,12,13*s),o=r.getUint32(0,!0)===67305985,a=r.getUint32(1*s,o);if(a!==0){console.warn("KTXParser - Only compressed formats supported");return}var u=r.getUint32(4*s,o),f=r.getUint32(6*s,o),v=r.getUint32(7*s,o),c=Math.max(1,r.getUint32(11*s,o)),g=r.getUint32(12*s,o),p=new Array(c),T=12+13*4+g,C=f,M=v;for(l=0;l<c;l++){var A=new Int32Array(t,T,1)[0];T+=4,p[l]={data:new Uint8Array(t,T,A),width:C,height:M},C=Math.max(1,C>>1),M=Math.max(1,M>>1),T+=A}return{mipmaps:p,width:f,height:v,internalFormat:u,compressed:!0,generateMipmap:!1}};h.exports=d},82038:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function d(L,F,w,O,B,I,D){return D===void 0&&(D=16),Math.floor((L+w)/B)*Math.floor((F+O)/I)*D}function t(L,F){return L=Math.max(L,16),F=Math.max(F,8),L*F/4}function e(L,F){return L=Math.max(L,8),F=Math.max(F,8),L*F/2}function l(L,F){return Math.ceil(L/4)*Math.ceil(F/4)*16}function i(L,F){return d(L,F,3,3,4,4,8)}function s(L,F){return d(L,F,3,3,4,4)}function r(L,F){return d(L,F,4,3,5,4)}function o(L,F){return d(L,F,4,4,5,5)}function a(L,F){return d(L,F,5,4,6,5)}function u(L,F){return d(L,F,5,5,6,6)}function f(L,F){return d(L,F,7,4,8,5)}function v(L,F){return d(L,F,7,5,8,6)}function c(L,F){return d(L,F,7,7,8,8)}function g(L,F){return d(L,F,9,4,10,5)}function p(L,F){return d(L,F,9,5,10,6)}function T(L,F){return d(L,F,9,7,10,8)}function C(L,F){return d(L,F,9,9,10,10)}function M(L,F){return d(L,F,11,9,12,10)}function A(L,F){return d(L,F,11,11,12,12)}var R={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:e,glFormat:[35840]},3:{sizeFunc:e,glFormat:[35842]},6:{sizeFunc:i,glFormat:[36196]},7:{sizeFunc:i,glFormat:[33776,35916]},8:{sizeFunc:s,glFormat:[33777,35917]},9:{sizeFunc:s,glFormat:[33778,35918]},11:{sizeFunc:s,glFormat:[33779,35919]},14:{sizeFunc:l,glFormat:[36494,36495]},15:{sizeFunc:l,glFormat:[36492,36493]},22:{sizeFunc:i,glFormat:[37492,37493]},23:{sizeFunc:s,glFormat:[37496,37497]},24:{sizeFunc:i,glFormat:[37494,37495]},25:{sizeFunc:i,glFormat:[37488]},26:{sizeFunc:s,glFormat:[37490]},27:{sizeFunc:s,glFormat:[37808,37840]},28:{sizeFunc:r,glFormat:[37809,37841]},29:{sizeFunc:o,glFormat:[37810,37842]},30:{sizeFunc:a,glFormat:[37811,37843]},31:{sizeFunc:u,glFormat:[37812,37844]},32:{sizeFunc:f,glFormat:[37813,37845]},33:{sizeFunc:v,glFormat:[37814,37846]},34:{sizeFunc:c,glFormat:[37815,37847]},35:{sizeFunc:g,glFormat:[37816,37848]},36:{sizeFunc:p,glFormat:[37817,37849]},37:{sizeFunc:T,glFormat:[37818,37850]},38:{sizeFunc:C,glFormat:[37819,37851]},39:{sizeFunc:M,glFormat:[37820,37852]},40:{sizeFunc:A,glFormat:[37821,37853]}},P=function(L){for(var F=new Uint32Array(L,0,13),w=F[0],O=w===55727696,B=O?F[2]:F[3],I=F[4],D=R[B].glFormat[I],N=R[B].sizeFunc,z=F[11],V=F[7],U=F[6],G=52+F[12],b=new Uint8Array(L,G),Y=new Array(z),W=0,H=V,X=U,K=0;K<z;K++){var Z=N(H,X);Y[K]={data:new Uint8Array(b.buffer,b.byteOffset+W,Z),width:H,height:X},H=Math.max(1,H>>1),X=Math.max(1,X>>1),W+=Z}return{mipmaps:Y,width:V,height:U,internalFormat:D,compressed:!0,generateMipmap:!1}};h.exports=P},75549:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l=function(i,s,r,o,a,u,f){var v=e(f,"frameWidth",null),c=e(f,"frameHeight",v);if(v===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var g=i.source[s];i.add("__BASE",s,0,0,g.width,g.height);var p=e(f,"startFrame",0),T=e(f,"endFrame",-1),C=e(f,"margin",0),M=e(f,"spacing",0),A=Math.floor((a-C+M)/(v+M)),R=Math.floor((u-C+M)/(c+M)),P=A*R;P===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",i.key),(p>P||p<-P)&&(p=0),p<0&&(p=P+p),(T===-1||T>P||T<p)&&(T=P);for(var L=C,F=C,w=0,O=0,B=0,I=0;I<P;I++){w=0,O=0;var D=L+v,N=F+c;D>a&&(w=D-a),N>u&&(O=N-u),I>=p&&I<=T&&(i.add(B,s,r+L,o+F,v-w,c-O),B++),L+=v+M,L+v>a&&(L=C,F+=c+M)}return i};h.exports=l},47534:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l=function(i,s,r){var o=e(r,"frameWidth",null),a=e(r,"frameHeight",o);if(!o)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var u=i.source[0];i.add("__BASE",0,0,0,u.width,u.height),e(r,"startFrame",0),e(r,"endFrame",-1);for(var f=e(r,"margin",0),v=e(r,"spacing",0),c=s.cutX,g=s.cutY,p=s.cutWidth,T=s.cutHeight,C=s.realWidth,M=s.realHeight,A=Math.floor((C-f+v)/(o+v)),R=Math.floor((M-f+v)/(a+v)),P=s.x,L=o-P,F=o-(C-p-P),w=s.y,O=a-w,B=a-(M-T-w),I,D=f,N=f,z=0,V=0,U=0;U<R;U++){for(var G=U===0,b=U===R-1,Y=0;Y<A;Y++){var W=Y===0,H=Y===A-1;if(I=i.add(z,V,c+D,g+N,o,a),W||G||H||b){var X=W?P:0,K=G?w:0,Z=0,Q=0;W&&(Z+=o-L),H&&(Z+=o-F),G&&(Q+=a-O),b&&(Q+=a-B);var j=o-Z,J=a-Q;I.cutWidth=j,I.cutHeight=J,I.setTrim(o,a,X,K,j,J)}D+=v,W?D+=L:H?D+=F:D+=o,z++}D=f,N+=v,G?N+=O:b?N+=B:N+=a}return i};h.exports=l},86147:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=0,t=function(l,i,s,r){var o=d-r.y-r.height;l.add(s,i,r.x,o,r.width,r.height)},e=function(l,i,s){var r=l.source[i];l.add("__BASE",i,0,0,r.width,r.height),d=r.height;for(var o=s.split(`
|
||
`),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,u="",f="",v={x:0,y:0,width:0,height:0},c=0;c<o.length;c++){var g=o[c].match(a);if(g){var p=g[1]==="- ",T=g[2],C=g[3];if(p&&(f!==u&&(t(l,i,f,v),u=f),v={x:0,y:0,width:0,height:0}),T==="name"){f=C;continue}switch(T){case"x":case"y":case"width":case"height":v[T]=parseInt(C,10);break}}}return f!==u&&t(l,i,f,v),l};h.exports=e},55222:(h,d,t)=>{/**
|
||
* @author Ben Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2024 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(50030),l=function(u){for(var f=u.mipmaps,v=1;v<f.length;v++){var c=f[v].width,g=f[v].height;if(!e(c,g))return console.warn("Mip level "+v+" is not a power-of-two size: "+c+"x"+g),!1}var p=a[u.internalFormat];return p?p(u):(console.warn("No format checker found for internal format "+u.internalFormat+". Assuming valid."),!0)};function i(u){for(var f=u.mipmaps,v=0;v<f.length;v++){var c=f[v].width,g=f[v].height;if((c<<v)%4!==0||(g<<v)%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 "+v+" is "+c+"x"+g),!1}return!0}function s(){return!0}function r(u){var f=u.mipmaps,v=f[0];return e(v.width,v.height)?!0:(console.warn("PVRTC base dimensions must be power of two. Base level is "+v.width+"x"+v.height),!1)}function o(u){var f=u.mipmaps,v=f[0];return v.width%4!==0||v.height%4!==0?(console.warn("S3TC SRGB base dimensions must be a multiple of 4 pixels. Base level is "+v.width+"x"+v.height+" pixels"),!1):!0}var a={37488:s,37489:s,37490:s,37491:s,37492:s,37493:s,37494:s,37495:s,37496:s,37497:s,36196:s,37808:s,37809:s,37810:s,37811:s,37812:s,37813:s,37814:s,37815:s,37816:s,37817:s,37818:s,37819:s,37820:s,37821:s,37840:s,37841:s,37842:s,37843:s,37844:s,37845:s,37846:s,37847:s,37848:s,37849:s,37850:s,37851:s,37852:s,37853:s,36492:i,36493:i,36494:i,36495:i,36283:i,36284:i,36285:i,36286:i,35840:r,35841:r,35842:r,35843:r,33776:i,33777:i,33778:i,33779:i,35916:o,35917:o,35918:o,35919:o};h.exports=l},61309:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s,r,o,a,u,f,v){(o===void 0||o<=0)&&(o=32),(a===void 0||a<=0)&&(a=32),u===void 0&&(u=0),f===void 0&&(f=0),this.name=s,this.firstgid=r|0,this.imageWidth=o|0,this.imageHeight=a|0,this.imageMargin=u|0,this.imageSpacing=f|0,this.properties=v||{},this.images=[],this.total=0},containsImageIndex:function(i){return i>=this.firstgid&&i<this.firstgid+this.total},addImage:function(i,s,r,o){return this.images.push({gid:i,image:s,width:r,height:o}),this.total++,this}});h.exports=l},27462:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2021 Photon Storm Ltd.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=new e({initialize:function(s){if(this.gids=[],s!==void 0)for(var r=0;r<s.length;++r)for(var o=s[r],a=0;a<o.total;++a)this.gids[o.firstgid+a]=o;this._gids=this.gids},enabled:{get:function(){return!!this.gids},set:function(i){this.gids=i?this._gids:void 0}},getTypeIncludingTile:function(i){if(i.type!==void 0&&i.type!=="")return i.type;if(!(!this.gids||i.gid===void 0)){var s=this.gids[i.gid];if(s){var r=s.getTileData(i.gid);if(r)return r.type}}},setTextureAndFrame:function(i,s,r,o){if(s===null&&this.gids&&o.gid!==void 0){var a=this.gids[o.gid];a&&(s===null&&a.image!==void 0&&(s=a.image.key),r===null&&(r=o.gid-a.firstgid),i.scene.textures.getFrame(s,r)||(s=null,r=null))}i.setTexture(s,r)},setPropertiesFromTiledObject:function(i,s){if(this.gids!==void 0&&s.gid!==void 0){var r=this.gids[s.gid];r!==void 0&&this.setFromJSON(i,r.getTileProperties(s.gid))}this.setFromJSON(i,s.properties)},setFromJSON:function(i,s){if(s){if(Array.isArray(s)){for(var r=0;r<s.length;r++){var o=s[r];i[o.name]!==void 0?i[o.name]=o.value:i.setData(o.name,o.value)}return}for(var a in s)i[a]!==void 0?i[a]=s[a]:i.setData(a,s[a])}}});h.exports=l},31989:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(80341),l=t(87010),i=t(46177),s=t(49075),r=function(o,a,u,f,v,c,g,p){u===void 0&&(u=32),f===void 0&&(f=32),v===void 0&&(v=10),c===void 0&&(c=10),p===void 0&&(p=!1);var T=null;if(Array.isArray(g)){var C=a!==void 0?a:"map";T=i(C,e.ARRAY_2D,g,u,f,p)}else if(a!==void 0){var M=o.cache.tilemap.get(a);M?T=i(a,M.format,M.data,u,f,p):console.warn("No map data found for key "+a)}return T===null&&(T=new l({tileWidth:u,tileHeight:f,width:v,height:c})),new s(o,T)};h.exports=r},23029:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(31401),i=t(91907),s=t(62644),r=t(93232),o=new e({Mixins:[l.AlphaSingle,l.Flip,l.Visible],initialize:function(u,f,v,c,g,p,T,C){this.layer=u,this.index=f,this.x=v,this.y=c,this.width=g,this.height=p,this.right,this.bottom,this.baseWidth=T!==void 0?T:g,this.baseHeight=C!==void 0?C:p,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(a,u){return!(a<this.pixelX||u<this.pixelY||a>this.right||u>this.bottom)},copy:function(a){return this.index=a.index,this.alpha=a.alpha,this.properties=s(a.properties),this.visible=a.visible,this.setFlip(a.flipX,a.flipY),this.tint=a.tint,this.rotation=a.rotation,this.collideUp=a.collideUp,this.collideDown=a.collideDown,this.collideLeft=a.collideLeft,this.collideRight=a.collideRight,this.collisionCallback=a.collisionCallback,this.collisionCallbackContext=a.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(a){var u=this.tilemapLayer;if(u){var f=u.tileToWorldXY(this.x,this.y,void 0,a);return f.x}return this.x*this.baseWidth},getRight:function(a){var u=this.tilemapLayer;return u?this.getLeft(a)+this.width*u.scaleX:this.getLeft(a)+this.width},getTop:function(a){var u=this.tilemapLayer;if(u){var f=u.tileToWorldXY(this.x,this.y,void 0,a);return f.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(a){var u=this.tilemapLayer;return u?this.getTop(a)+this.height*u.scaleY:this.getTop(a)+this.height},getBounds:function(a,u){return u===void 0&&(u=new r),u.x=this.getLeft(a),u.y=this.getTop(a),u.width=this.getRight(a)-u.x,u.height=this.getBottom(a)-u.y,u},getCenterX:function(a){return(this.getLeft(a)+this.getRight(a))/2},getCenterY:function(a){return(this.getTop(a)+this.getBottom(a))/2},intersects:function(a,u,f,v){return!(f<=this.pixelX||v<=this.pixelY||a>=this.right||u>=this.bottom)},isInteresting:function(a,u){return a&&u?this.canCollide||this.hasInterestingFace:a?this.collides:u?this.hasInterestingFace:!1},resetCollision:function(a){if(a===void 0&&(a=!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,a){var u=this.tilemapLayer;u&&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(a,u,f,v,c){if(u===void 0&&(u=a),f===void 0&&(f=a),v===void 0&&(v=a),c===void 0&&(c=!0),this.collideLeft=a,this.collideRight=u,this.collideUp=f,this.collideDown=v,this.faceLeft=a,this.faceRight=u,this.faceTop=f,this.faceBottom=v,c){var g=this.tilemapLayer;g&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(a,u){return a===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=a,this.collisionCallbackContext=u),this},setSize:function(a,u,f,v){return a!==void 0&&(this.width=a),u!==void 0&&(this.height=u),f!==void 0&&(this.baseWidth=f),v!==void 0&&(this.baseHeight=v),this.updatePixelXY(),this},updatePixelXY:function(){var a=this.layer.orientation;if(a===i.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(a===i.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(a===i.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(a===i.HEXAGONAL){var u=this.layer.staggerAxis,f=this.layer.staggerIndex,v=this.layer.hexSideLength,c,g;u==="y"?(g=(this.baseHeight-v)/2+v,f==="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*g):u==="x"&&(c=(this.baseWidth-v)/2+v,this.pixelX=this.x*c,f==="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 a=this.layer.tilemapLayer;if(a){var u=a.gidMap[this.index];if(u)return u}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var a=this.tilemapLayer;return a?a.tilemap:null}}});h.exports=o},49075:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(84101),l=t(83419),i=t(39506),s=t(80341),r=t(95540),o=t(14977),a=t(27462),u=t(91907),f=t(36305),v=t(19133),c=t(68287),g=t(23029),p=t(81086),T=t(44731),C=t(53180),M=t(20442),A=t(33629),R=new l({initialize:function(L,F){this.scene=L,this.tileWidth=F.tileWidth,this.tileHeight=F.tileHeight,this.width=F.width,this.height=F.height,this.orientation=F.orientation,this.renderOrder=F.renderOrder,this.format=F.format,this.version=F.version,this.properties=F.properties,this.widthInPixels=F.widthInPixels,this.heightInPixels=F.heightInPixels,this.imageCollections=F.imageCollections,this.images=F.images,this.layers=F.layers,this.tiles=F.tiles,this.tilesets=F.tilesets,this.objects=F.objects,this.currentLayerIndex=0,this.hexSideLength=F.hexSideLength;var w=this.orientation;this._convert={WorldToTileXY:p.GetWorldToTileXYFunction(w),WorldToTileX:p.GetWorldToTileXFunction(w),WorldToTileY:p.GetWorldToTileYFunction(w),TileToWorldXY:p.GetTileToWorldXYFunction(w),TileToWorldX:p.GetTileToWorldXFunction(w),TileToWorldY:p.GetTileToWorldYFunction(w),GetTileCorners:p.GetTileCornersFunction(w)}},setRenderOrder:function(P){var L=["right-down","left-down","right-up","left-up"];return typeof P=="number"&&(P=L[P]),L.indexOf(P)>-1&&(this.renderOrder=P),this},addTilesetImage:function(P,L,F,w,O,B,I,D){if(P===void 0)return null;L==null&&(L=P);var N=this.scene.sys.textures;if(!N.exists(L))return console.warn('Texture key "%s" not found',L),null;var z=N.get(L),V=this.getTilesetIndex(P);if(V===null&&this.format===s.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',P,this.tilesets),null;var U=this.tilesets[V];return U?((F||w)&&U.setTileSize(F,w),(O||B)&&U.setSpacing(O,B),U.setImage(z),U):(F===void 0&&(F=this.tileWidth),w===void 0&&(w=this.tileHeight),O===void 0&&(O=0),B===void 0&&(B=0),I===void 0&&(I=0),D===void 0&&(D={x:0,y:0}),U=new A(P,I,F,w,O,B,void 0,void 0,D),U.setImage(z),this.tilesets.push(U),this.tiles=e(this),U)},copy:function(P,L,F,w,O,B,I,D){return D=this.getLayer(D),D!==null?(p.Copy(P,L,F,w,O,B,I,D),this):null},createBlankLayer:function(P,L,F,w,O,B,I,D){F===void 0&&(F=0),w===void 0&&(w=0),O===void 0&&(O=this.width),B===void 0&&(B=this.height),I===void 0&&(I=this.tileWidth),D===void 0&&(D=this.tileHeight);var N=this.getLayerIndex(P);if(N!==null)return console.warn("Invalid Tilemap Layer ID: "+P),null;for(var z=new o({name:P,tileWidth:I,tileHeight:D,width:O,height:B,orientation:this.orientation,hexSideLength:this.hexSideLength}),V,U=0;U<B;U++){V=[];for(var G=0;G<O;G++)V.push(new g(z,-1,G,U,I,D,this.tileWidth,this.tileHeight));z.data.push(V)}this.layers.push(z),this.currentLayerIndex=this.layers.length-1;var b=new M(this.scene,this,this.currentLayerIndex,L,F,w);return b.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(b),b},createLayer:function(P,L,F,w,O){var B=this.getLayerIndex(P);if(B===null)return console.warn("Invalid Tilemap Layer ID: "+P),typeof P=="string"&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var I=this.layers[B];if(I.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+P),null;this.currentLayerIndex=B,F===void 0&&(F=I.x),w===void 0&&(w=I.y);var D;return O?(Array.isArray(L)&&(L.length>1&&console.warn("TilemapGPULayer can only use one tileset. Using the first item given."),L=L[0]),D=new C(this.scene,this,B,L,F,w)):(D=new M(this.scene,this,B,L,F,w),D.setRenderOrder(this.renderOrder)),this.scene.sys.displayList.add(D),D},createFromObjects:function(P,L,F){F===void 0&&(F=!0);var w=[],O=this.getObjectLayer(P);if(!O)return console.warn("createFromObjects: Invalid objectLayerName given: "+P),w;var B=new a(F?this.tilesets:void 0);Array.isArray(L)||(L=[L]);var I=O.objects;L.sortByY&&I.sort(function(rt,at){return rt.y>at.y?1:-1});for(var D=0;D<L.length;D++){var N=L[D],z=r(N,"id",null),V=r(N,"gid",null),U=r(N,"name",null),G=r(N,"type",null);B.enabled=!r(N,"ignoreTileset",null);for(var b,Y=[],W=0;W<I.length;W++)b=I[W],(z===null&&V===null&&U===null&&G===null||z!==null&&b.id===z||V!==null&&b.gid===V||U!==null&&b.name===U||G!==null&&B.getTypeIncludingTile(b)===G)&&Y.push(b);for(var H=r(N,"classType",c),X=r(N,"scene",this.scene),K=r(N,"container",null),Z=r(N,"key",null),Q=r(N,"frame",null),j=0;j<Y.length;j++){b=Y[j];var J=new H(X);if(J.setName(b.name),J.setPosition(b.x,b.y),B.setTextureAndFrame(J,Z,Q,b),b.width&&(J.displayWidth=b.width),b.height&&(J.displayHeight=b.height),this.orientation===u.ISOMETRIC){var tt=this.tileWidth/this.tileHeight,k={x:J.x-J.y,y:(J.x+J.y)/tt};J.x=k.x,J.y=k.y}var q={x:J.originX*b.width,y:(J.originY-(b.gid?1:0))*b.height};if(b.rotation){var _=i(b.rotation);f(q,_),J.rotation=_}J.x+=q.x,J.y+=q.y,(b.flippedHorizontal!==void 0||b.flippedVertical!==void 0)&&J.setFlip(b.flippedHorizontal,b.flippedVertical),b.visible||(J.visible=!1),B.setPropertiesFromTiledObject(J,b),K?K.add(J):X.add.existing(J),w.push(J)}}return w},createFromTiles:function(P,L,F,w,O,B){return B=this.getLayer(B),B===null?null:p.CreateFromTiles(P,L,F,w,O,B)},fill:function(P,L,F,w,O,B,I){return B===void 0&&(B=!0),I=this.getLayer(I),I===null?null:(p.Fill(P,L,F,w,O,B,I),this)},filterObjects:function(P,L,F){if(typeof P=="string"){var w=P;if(P=this.getObjectLayer(P),!P)return console.warn("No object layer found with the name: "+w),null}return P.objects.filter(L,F)},filterTiles:function(P,L,F,w,O,B,I,D){return D=this.getLayer(D),D===null?null:p.FilterTiles(P,L,F,w,O,B,I,D)},findByIndex:function(P,L,F,w){return w=this.getLayer(w),w===null?null:p.FindByIndex(P,L,F,w)},findObject:function(P,L,F){if(typeof P=="string"){var w=P;if(P=this.getObjectLayer(P),!P)return console.warn("No object layer found with the name: "+w),null}return P.objects.find(L,F)||null},findTile:function(P,L,F,w,O,B,I,D){return D=this.getLayer(D),D===null?null:p.FindTile(P,L,F,w,O,B,I,D)},forEachTile:function(P,L,F,w,O,B,I,D){return D=this.getLayer(D),D===null?null:(p.ForEachTile(P,L,F,w,O,B,I,D),this)},getImageIndex:function(P){return this.getIndex(this.images,P)},getImageLayerNames:function(){return!this.images||!Array.isArray(this.images)?[]:this.images.map(function(P){return P.name})},getIndex:function(P,L){for(var F=0;F<P.length;F++)if(P[F].name===L)return F;return null},getLayer:function(P){var L=this.getLayerIndex(P);return L!==null?this.layers[L]:null},getObjectLayer:function(P){var L=this.getIndex(this.objects,P);return L!==null?this.objects[L]:null},getObjectLayerNames:function(){return!this.objects||!Array.isArray(this.objects)?[]:this.objects.map(function(P){return P.name})},getLayerIndex:function(P){return P===void 0?this.currentLayerIndex:typeof P=="string"?this.getLayerIndexByName(P):typeof P=="number"&&P<this.layers.length?P:P instanceof T&&P.tilemap===this?P.layerIndex:null},getLayerIndexByName:function(P){return this.getIndex(this.layers,P)},getTileAt:function(P,L,F,w){return w=this.getLayer(w),w===null?null:p.GetTileAt(P,L,F,w)},getTileAtWorldXY:function(P,L,F,w,O){return O=this.getLayer(O),O===null?null:p.GetTileAtWorldXY(P,L,F,w,O)},getTileLayerNames:function(){return!this.layers||!Array.isArray(this.layers)?[]:this.layers.map(function(P){return P.name})},getTilesWithin:function(P,L,F,w,O,B){return B=this.getLayer(B),B===null?null:p.GetTilesWithin(P,L,F,w,O,B)},getTilesWithinShape:function(P,L,F,w){return w=this.getLayer(w),w===null?null:p.GetTilesWithinShape(P,L,F,w)},getTilesWithinWorldXY:function(P,L,F,w,O,B,I){return I=this.getLayer(I),I===null?null:p.GetTilesWithinWorldXY(P,L,F,w,O,B,I)},getTileset:function(P){var L=this.getIndex(this.tilesets,P);return L!==null?this.tilesets[L]:null},getTilesetIndex:function(P){return this.getIndex(this.tilesets,P)},hasTileAt:function(P,L,F){return F=this.getLayer(F),F===null?null:p.HasTileAt(P,L,F)},hasTileAtWorldXY:function(P,L,F,w){return w=this.getLayer(w),w===null?null:p.HasTileAtWorldXY(P,L,F,w)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(P){this.setLayer(P)}},putTileAt:function(P,L,F,w,O){return w===void 0&&(w=!0),O=this.getLayer(O),O===null?null:p.PutTileAt(P,L,F,w,O)},putTileAtWorldXY:function(P,L,F,w,O,B){return w===void 0&&(w=!0),B=this.getLayer(B),B===null?null:p.PutTileAtWorldXY(P,L,F,w,O,B)},putTilesAt:function(P,L,F,w,O){return w===void 0&&(w=!0),O=this.getLayer(O),O===null?null:(p.PutTilesAt(P,L,F,w,O),this)},randomize:function(P,L,F,w,O,B){return B=this.getLayer(B),B===null?null:(p.Randomize(P,L,F,w,O,B),this)},calculateFacesAt:function(P,L,F){return F=this.getLayer(F),F===null?null:(p.CalculateFacesAt(P,L,F),this)},calculateFacesWithin:function(P,L,F,w,O){return O=this.getLayer(O),O===null?null:(p.CalculateFacesWithin(P,L,F,w,O),this)},removeLayer:function(P){var L=this.getLayerIndex(P);if(L!==null){v(this.layers,L);for(var F=L;F<this.layers.length;F++)this.layers[F].tilemapLayer&&this.layers[F].tilemapLayer.layerIndex--;return this.currentLayerIndex===L&&(this.currentLayerIndex=0),this}else return null},destroyLayer:function(P){var L=this.getLayerIndex(P);return L!==null?(P=this.layers[L],P.tilemapLayer.destroy(),v(this.layers,L),this.currentLayerIndex===L&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var P=this.layers,L=0;L<P.length;L++)P[L].tilemapLayer&&P[L].tilemapLayer.destroy(!1);return P.length=0,this.currentLayerIndex=0,this},removeTile:function(P,L,F){L===void 0&&(L=-1),F===void 0&&(F=!0);var w=[];Array.isArray(P)||(P=[P]);for(var O=0;O<P.length;O++){var B=P[O];w.push(this.removeTileAt(B.x,B.y,!0,F,B.tilemapLayer)),L>-1&&this.putTileAt(L,B.x,B.y,F,B.tilemapLayer)}return w},removeTileAt:function(P,L,F,w,O){return F===void 0&&(F=!0),w===void 0&&(w=!0),O=this.getLayer(O),O===null?null:p.RemoveTileAt(P,L,F,w,O)},removeTileAtWorldXY:function(P,L,F,w,O,B){return F===void 0&&(F=!0),w===void 0&&(w=!0),B=this.getLayer(B),B===null?null:p.RemoveTileAtWorldXY(P,L,F,w,O,B)},renderDebug:function(P,L,F){return F=this.getLayer(F),F===null?null:(this.orientation===u.ORTHOGONAL&&p.RenderDebug(P,L,F),this)},renderDebugFull:function(P,L){for(var F=this.layers,w=0;w<F.length;w++)p.RenderDebug(P,L,F[w]);return this},replaceByIndex:function(P,L,F,w,O,B,I){return I=this.getLayer(I),I===null?null:(p.ReplaceByIndex(P,L,F,w,O,B,I),this)},setCollision:function(P,L,F,w,O){return L===void 0&&(L=!0),F===void 0&&(F=!0),O===void 0&&(O=!0),w=this.getLayer(w),w===null?null:(p.SetCollision(P,L,F,w,O),this)},setCollisionBetween:function(P,L,F,w,O){return F===void 0&&(F=!0),w===void 0&&(w=!0),O=this.getLayer(O),O===null?null:(p.SetCollisionBetween(P,L,F,w,O),this)},setCollisionByProperty:function(P,L,F,w){return L===void 0&&(L=!0),F===void 0&&(F=!0),w=this.getLayer(w),w===null?null:(p.SetCollisionByProperty(P,L,F,w),this)},setCollisionByExclusion:function(P,L,F,w){return L===void 0&&(L=!0),F===void 0&&(F=!0),w=this.getLayer(w),w===null?null:(p.SetCollisionByExclusion(P,L,F,w),this)},setCollisionFromCollisionGroup:function(P,L,F){return P===void 0&&(P=!0),L===void 0&&(L=!0),F=this.getLayer(F),F===null?null:(p.SetCollisionFromCollisionGroup(P,L,F),this)},setTileIndexCallback:function(P,L,F,w){return w=this.getLayer(w),w===null?null:(p.SetTileIndexCallback(P,L,F,w),this)},setTileLocationCallback:function(P,L,F,w,O,B,I){return I=this.getLayer(I),I===null?null:(p.SetTileLocationCallback(P,L,F,w,O,B,I),this)},setLayer:function(P){var L=this.getLayerIndex(P);return L!==null&&(this.currentLayerIndex=L),this},setBaseTileSize:function(P,L){this.tileWidth=P,this.tileHeight=L,this.widthInPixels=this.width*P,this.heightInPixels=this.height*L;for(var F=0;F<this.layers.length;F++){this.layers[F].baseTileWidth=P,this.layers[F].baseTileHeight=L;for(var w=this.layers[F].data,O=this.layers[F].width,B=this.layers[F].height,I=0;I<B;I++)for(var D=0;D<O;D++){var N=w[I][D];N!==null&&N.setSize(void 0,void 0,P,L)}}return this},setLayerTileSize:function(P,L,F){if(F=this.getLayer(F),F===null)return this;F.tileWidth=P,F.tileHeight=L;for(var w=F.data,O=F.width,B=F.height,I=0;I<B;I++)for(var D=0;D<O;D++){var N=w[I][D];N!==null&&N.setSize(P,L)}return this},shuffle:function(P,L,F,w,O){return O=this.getLayer(O),O===null?null:(p.Shuffle(P,L,F,w,O),this)},swapByIndex:function(P,L,F,w,O,B,I){return I=this.getLayer(I),I===null?null:(p.SwapByIndex(P,L,F,w,O,B,I),this)},tileToWorldX:function(P,L,F){return F=this.getLayer(F),F===null?null:this._convert.TileToWorldX(P,L,F)},tileToWorldY:function(P,L,F){return F=this.getLayer(F),F===null?null:this._convert.TileToWorldY(P,L,F)},tileToWorldXY:function(P,L,F,w,O){return O=this.getLayer(O),O===null?null:this._convert.TileToWorldXY(P,L,F,w,O)},getTileCorners:function(P,L,F,w){return w=this.getLayer(w),w===null?null:this._convert.GetTileCorners(P,L,F,w)},weightedRandomize:function(P,L,F,w,O,B){return B=this.getLayer(B),B===null?null:(p.WeightedRandomize(L,F,w,O,P,B),this)},worldToTileX:function(P,L,F,w){return w=this.getLayer(w),w===null?null:this._convert.WorldToTileX(P,L,F,w)},worldToTileY:function(P,L,F,w){return w=this.getLayer(w),w===null?null:this._convert.WorldToTileY(P,L,F,w)},worldToTileXY:function(P,L,F,w,O,B){return B=this.getLayer(B),B===null?null:this._convert.WorldToTileXY(P,L,F,w,O,B)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}});h.exports=R},45939:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(44603),l=t(31989);e.register("tilemap",function(i){var s=i!==void 0?i:{};return l(this.scene,s.key,s.tileWidth,s.tileHeight,s.width,s.height,s.data,s.insertNull)})},46029:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(39429),l=t(31989);e.register("tilemap",function(i,s,r,o,a,u,f){return i===null&&(i=void 0),s===null&&(s=void 0),r===null&&(r=void 0),o===null&&(o=void 0),a===null&&(a=void 0),l(this.scene,i,s,r,o,a,u,f)})},53180:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(67743),l=t(83419),i=t(44731),s=t(57912),r=new l({Extends:i,Mixins:[s],initialize:function(a,u,f,v,c,g){i.call(this,"TilemapGPULayer",a,u,f,c,g),this.tileset=null,this.layerDataTexture=null,this.setTileset(v),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return e}},setTileset:function(o){typeof o=="string"&&(o=this.tilemap.getTileset(o)),this.tileset=o,this.generateLayerDataTexture()},generateLayerDataTexture:function(){for(var o=this.layer,a=this.tileset,u=a.firstgid,f=this.scene.renderer,v=a.getAnimationDataIndexMap(f),c=new Uint32Array(o.width*o.height),g=0;g<o.height;g++)for(var p=0;p<o.width;p++){var T=o.data[g][p],C=T.index-u,M=T.flipX,A=T.flipY,R=!1;v.has(C)&&(C=v.get(C),R=!0),M&&(C|=2147483648),A&&(C|=1073741824),R&&(C|=536870912),T.index===-1&&(C=268435456),c[g*o.width+p]=C}this.layerDataTexture&&this.layerDataTexture.destroy();var P=new Uint8Array(c.buffer);this.layerDataTexture=f.createUint8ArrayTexture(P,o.width,o.height,!1,!0)}});h.exports=r},57912:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(6736),h.exports={renderWebGL:l,renderCanvas:i}},6736:h=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=e.customRenderNodes.Submitter||e.defaultRenderNodes.Submitter;s.run(l,e,i)};h.exports=d},20442:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(79317),l=t(83419),i=t(81086),s=t(19218),r=t(44731),o=new l({Extends:r,Mixins:[s],initialize:function(u,f,v,c,g,p){r.call(this,"TilemapLayer",u,f,v,g,p),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=i.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.setTilesets(c),this.initRenderNodes(this._defaultRenderNodesMap)},_defaultRenderNodesMap:{get:function(){return e}},setTilesets:function(a){var u=[],f=[],v=this.tilemap;Array.isArray(a)||(a=[a]);for(var c=0;c<a.length;c++){var g=a[c];if(typeof g=="string"&&(g=v.getTileset(g)),g){f.push(g);for(var p=g.firstgid,T=0;T<g.total;T++)u[p+T]=g}}this.gidMap=u,this.tileset=f},setRenderOrder:function(a){var u=["right-down","left-down","right-up","left-up"];return typeof a=="string"&&(a=u.indexOf(a)),a>=0&&a<4&&(this._renderOrder=a),this},cull:function(a){return this.cullCallback(this.layer,a,this.culledTiles,this._renderOrder)},setSkipCull:function(a){return a===void 0&&(a=!0),this.skipCull=a,this},setCullPadding:function(a,u){return a===void 0&&(a=1),u===void 0&&(u=1),this.cullPaddingX=a,this.cullPaddingY=u,this},setTint:function(a,u,f,v,c,g){a===void 0&&(a=16777215);var p=function(T){T.tint=a,T.tintFill=!1};return this.forEachTile(p,this,u,f,v,c,g)},setTintFill:function(a,u,f,v,c,g){a===void 0&&(a=16777215);var p=function(T){T.tint=a,T.tintFill=!0};return this.forEachTile(p,this,u,f,v,c,g)},destroy:function(a){this.culledTiles.length=0,this.cullCallback=null,r.prototype.destroy.call(this,a)}});h.exports=o},44731:(h,d,t)=>{/**
|
||
* @author Benjamin D. Richards <benjamindrichards@gmail.com>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(78389),i=t(31401),s=t(95643),r=t(81086),o=t(26099),a=new e({Extends:s,Mixins:[i.Alpha,i.BlendMode,i.ComputedSize,i.Depth,i.ElapseTimer,i.Flip,i.GetBounds,i.Lighting,i.Mask,i.Origin,i.RenderNodes,i.Transform,i.Visible,i.ScrollFactor,l],initialize:function(f,v,c,g,p,T){s.call(this,v,f),this.isTilemap=!0,this.tilemap=c,this.layerIndex=g,this.layer=c.layers[g],this.layer.tilemapLayer=this,this.gidMap=[],this.tempVec=new o,this.collisionCategory=1,this.collisionMask=1,this.setAlpha(this.layer.alpha),this.setPosition(p,T),this.setOrigin(0,0),this.setSize(c.tileWidth*this.layer.width,c.tileHeight*this.layer.height)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(u,f){this.updateTimer(u,f)},calculateFacesAt:function(u,f){return r.CalculateFacesAt(u,f,this.layer),this},calculateFacesWithin:function(u,f,v,c){return r.CalculateFacesWithin(u,f,v,c,this.layer),this},createFromTiles:function(u,f,v,c,g){return r.CreateFromTiles(u,f,v,c,g,this.layer)},copy:function(u,f,v,c,g,p,T){return r.Copy(u,f,v,c,g,p,T,this.layer),this},fill:function(u,f,v,c,g,p){return r.Fill(u,f,v,c,g,p,this.layer),this},filterTiles:function(u,f,v,c,g,p,T){return r.FilterTiles(u,f,v,c,g,p,T,this.layer)},findByIndex:function(u,f,v){return r.FindByIndex(u,f,v,this.layer)},findTile:function(u,f,v,c,g,p,T){return r.FindTile(u,f,v,c,g,p,T,this.layer)},forEachTile:function(u,f,v,c,g,p,T){return r.ForEachTile(u,f,v,c,g,p,T,this.layer),this},getTileAt:function(u,f,v){return r.GetTileAt(u,f,v,this.layer)},getTileAtWorldXY:function(u,f,v,c){return r.GetTileAtWorldXY(u,f,v,c,this.layer)},getIsoTileAtWorldXY:function(u,f,v,c,g){v===void 0&&(v=!0);var p=this.tempVec;return r.IsometricWorldToTileXY(u,f,!0,p,g,this.layer,v),this.getTileAt(p.x,p.y,c)},getTilesWithin:function(u,f,v,c,g){return r.GetTilesWithin(u,f,v,c,g,this.layer)},getTilesWithinShape:function(u,f,v){return r.GetTilesWithinShape(u,f,v,this.layer)},getTilesWithinWorldXY:function(u,f,v,c,g,p){return r.GetTilesWithinWorldXY(u,f,v,c,g,p,this.layer)},hasTileAt:function(u,f){return r.HasTileAt(u,f,this.layer)},hasTileAtWorldXY:function(u,f,v){return r.HasTileAtWorldXY(u,f,v,this.layer)},putTileAt:function(u,f,v,c){return r.PutTileAt(u,f,v,c,this.layer)},putTileAtWorldXY:function(u,f,v,c,g){return r.PutTileAtWorldXY(u,f,v,c,g,this.layer)},putTilesAt:function(u,f,v,c){return r.PutTilesAt(u,f,v,c,this.layer),this},randomize:function(u,f,v,c,g){return r.Randomize(u,f,v,c,g,this.layer),this},removeTileAt:function(u,f,v,c){return r.RemoveTileAt(u,f,v,c,this.layer)},removeTileAtWorldXY:function(u,f,v,c,g){return r.RemoveTileAtWorldXY(u,f,v,c,g,this.layer)},renderDebug:function(u,f){return r.RenderDebug(u,f,this.layer),this},replaceByIndex:function(u,f,v,c,g,p){return r.ReplaceByIndex(u,f,v,c,g,p,this.layer),this},setCollision:function(u,f,v,c){return r.SetCollision(u,f,v,this.layer,c),this},setCollisionBetween:function(u,f,v,c){return r.SetCollisionBetween(u,f,v,c,this.layer),this},setCollisionByProperty:function(u,f,v){return r.SetCollisionByProperty(u,f,v,this.layer),this},setCollisionByExclusion:function(u,f,v){return r.SetCollisionByExclusion(u,f,v,this.layer),this},setCollisionFromCollisionGroup:function(u,f){return r.SetCollisionFromCollisionGroup(u,f,this.layer),this},setTileIndexCallback:function(u,f,v){return r.SetTileIndexCallback(u,f,v,this.layer),this},setTileLocationCallback:function(u,f,v,c,g,p){return r.SetTileLocationCallback(u,f,v,c,g,p,this.layer),this},shuffle:function(u,f,v,c){return r.Shuffle(u,f,v,c,this.layer),this},swapByIndex:function(u,f,v,c,g,p){return r.SwapByIndex(u,f,v,c,g,p,this.layer),this},tileToWorldX:function(u,f){return this.tilemap.tileToWorldX(u,f,this)},tileToWorldY:function(u,f){return this.tilemap.tileToWorldY(u,f,this)},tileToWorldXY:function(u,f,v,c){return this.tilemap.tileToWorldXY(u,f,v,c,this)},getTileCorners:function(u,f,v){return this.tilemap.getTileCorners(u,f,v,this)},weightedRandomize:function(u,f,v,c,g){return r.WeightedRandomize(f,v,c,g,u,this.layer),this},worldToTileX:function(u,f,v){return this.tilemap.worldToTileX(u,f,v,this)},worldToTileY:function(u,f,v){return this.tilemap.worldToTileY(u,f,v,this)},worldToTileXY:function(u,f,v,c,g){return this.tilemap.worldToTileXY(u,f,v,c,g,this)},destroy:function(u){u===void 0&&(u=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),u&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.gidMap=[],this.tileset=[],s.prototype.destroy.call(this))}});h.exports=a},16153:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61340),l=new e,i=new e,s=new e,r=function(o,a,u,f){var v=a.cull(u),c=v.length,g=u.alpha*a.alpha;if(!(c===0||g<=0)){i.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var p=o.currentContext,T=a.gidMap;p.save(),l.copyWithScrollFactorFrom(u.matrixCombined,u.scrollX,u.scrollY,a.scrollFactorX,a.scrollFactorY),f&&l.multiply(f),l.multiply(i,s),s.setToContext(p),(!o.antialias||a.scaleX>1||a.scaleY>1)&&(p.imageSmoothingEnabled=!1);for(var C=0;C<c;C++){var M=v[C],A=T[M.index];if(A){var R=A.image.getSourceImage(),P=A.getTileTextureCoordinates(M.index),L=A.tileWidth,F=A.tileHeight;if(!(P===null||L===0||F===0)){var w=L*.5,O=F*.5;P.x+=A.tileOffset.x,P.y+=A.tileOffset.y,p.save(),p.translate(M.pixelX+w,M.pixelY+O),M.rotation!==0&&p.rotate(M.rotation),(M.flipX||M.flipY)&&p.scale(M.flipX?-1:1,M.flipY?-1:1),p.globalAlpha=g*M.alpha,p.drawImage(R,P.x,P.y,L,F,-w,-O,L,F),p.restore()}}}p.restore()}};h.exports=r},19218:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(29747),l=e,i=e;l=t(99558),i=t(16153),h.exports={renderWebGL:l,renderCanvas:i}},99558:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70554),l=e.getTintAppendFloatAlpha,i={frame:{source:{glTexture:null}},uvSource:{u0:0,v0:0,u1:1,v1:1},frameWidth:0,frameHeight:0},s={tintFill:0,tintTopLeft:0,tintTopRight:0,tintBottomLeft:0,tintBottomRight:0},r=function(o,a,u,f){var v=u.camera,c=a.cull(v),g=c.length,p=a.alpha;if(!(g===0||p<=0))for(var T=a.gidMap,C=a.customRenderNodes.Submitter||a.defaultRenderNodes.Submitter,M=a.customRenderNodes.Transformer||a.defaultRenderNodes.Transformer,A=a.timeElapsed,R=0;R<g;R++){var P=c[R],L=T[P.index];if(L){var F=L.getAnimatedTileId(P.index,A);if(F!==null){var w=L.getTileTextureCoordinates(F),O=L.tileWidth,B=L.tileHeight;if(!(!w||O===0||B===0)){var I=L.glTexture,D=O,N=B,z=w.x,V=w.y,U=l(P.tint,p*P.alpha);i.frame.source.glTexture=L.glTexture,i.frameWidth=D,i.frameHeight=N,i.uvSource.u0=z/I.width,i.uvSource.v0=1-(V+N)/I.height,i.uvSource.u1=(z+D)/I.width,i.uvSource.v1=1-V/I.height,s.tintFill=P.tintFill,s.tintTopLeft=U,s.tintTopRight=U,s.tintBottomLeft=U,s.tintBottomRight=U,C.run(u,a,f,P,i,M,s)}}}}};h.exports=r},33629:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(26099),i=new e({initialize:function(r,o,a,u,f,v,c,g,p){(a===void 0||a<=0)&&(a=32),(u===void 0||u<=0)&&(u=32),f===void 0&&(f=0),v===void 0&&(v=0),c===void 0&&(c={}),g===void 0&&(g={}),this.name=r,this.firstgid=o,this.tileWidth=a,this.tileHeight=u,this.tileMargin=f,this.tileSpacing=v,this.tileProperties=c,this.tileData=g,this.tileOffset=new l,p!==void 0&&this.tileOffset.set(p.x,p.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[],this.animationSearchThreshold=64,this.maxAnimationLength=0,this._animationDataTexture=null,this._animationDataIndexMap=null},getTileProperties:function(s){return this.containsTileIndex(s)?this.tileProperties[s-this.firstgid]:null},getTileData:function(s){return this.containsTileIndex(s)?this.tileData[s-this.firstgid]:null},getTileCollisionGroup:function(s){var r=this.getTileData(s);return r&&r.objectgroup?r.objectgroup:null},containsTileIndex:function(s){return s>=this.firstgid&&s<this.firstgid+this.total},getAnimatedTileId:function(s,r){if(!this.containsTileIndex(s))return null;var o=this.getTileData(s);if(!(o&&o.animation))return s;r=r%o.animationDuration;for(var a=o.animation,u=null,f=0,v=a.length-1,c=0,g=0;f<=v;){if(c=f+v>>>1,u=a[c],g=u.startTime,g<=r&&g+u.duration>r)return u.tileid+this.firstgid;g<r?f=c+1:v=c-1}return null},getTileTextureCoordinates:function(s){return this.containsTileIndex(s)?this.texCoordinates[s-this.firstgid]:null},setImage:function(s){this.image=s;var r=s.get(),o=s.getFrameBounds();return this.glTexture=r.source.glTexture,r.width>o.width||r.height>o.height?this.updateTileData(r.width,r.height):this.updateTileData(o.width,o.height,o.x,o.y),this},setTileSize:function(s,r){return s!==void 0&&(this.tileWidth=s),r!==void 0&&(this.tileHeight=r),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(s,r){return s!==void 0&&(this.tileMargin=s),r!==void 0&&(this.tileSpacing=r),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(s,r,o,a){o===void 0&&(o=0),a===void 0&&(a=0);var u=(r-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),f=(s-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(u%1!==0||f%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),u=Math.floor(u),f=Math.floor(f),this.rows=u,this.columns=f,this.total=u*f,this.texCoordinates.length=0;for(var v=this.tileMargin+o,c=this.tileMargin+a,g=0;g<this.rows;g++){for(var p=0;p<this.columns;p++)this.texCoordinates.push({x:v,y:c}),v+=this.tileWidth+this.tileSpacing;v=this.tileMargin+o,c+=this.tileHeight+this.tileSpacing}return this._animationDataTexture&&this.createAnimationDataTexture(),this},getAnimationDataTexture:function(s){return this._animationDataTexture||this.createAnimationDataTexture(s),this._animationDataTexture},getAnimationDataIndexMap:function(s){return this._animationDataIndexMap||this.createAnimationDataTexture(s),this._animationDataIndexMap},createAnimationDataTexture:function(s){for(var r=this.tileData,o=this.total,a=[],u=[],f=new Map,v=0,c=0;c<o;c++){var g=r[c];if(g&&g.animation){var p=g.animation,T=g.animationDuration;f.set(c,a.length),a.push([T,u.length]);for(var C=0;C<p.length;C++){var M=p[C];u.push([M.duration,M.tileid])}v=Math.max(v,p.length)}}var A=a.length+u.length;if(A>4096*4096/2)throw new Error("Tileset.animationDataTexture: too many animations - total number of animations plus animation frames is max 8388608, got "+A);var R=A*2,P=Math.min(R,4096),L=Math.ceil(R/4096),F=new Uint32Array(P*L),w=0,O=a.length;for(c=0;c<O;c++){p=a[c];var B=p[0],I=p[1];F[w++]=B,F[w++]=(I+O)*2}for(c=0;c<u.length;c++){M=u[c];var D=M[0],N=M[1];F[w++]=D,F[w++]=N}this.animationDataTexture&&this.animationDataTexture.destroy();var z=new Uint8Array(F.buffer);this._animationDataTexture=s.createUint8ArrayTexture(z,P,L,!1,!0),this._animationDataIndexMap=f,this.maxAnimationLength=v}});h.exports=i},72023:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7423),l=function(i,s,r){var o=e(i,s,!0,r),a=e(i,s-1,!0,r),u=e(i,s+1,!0,r),f=e(i-1,s,!0,r),v=e(i+1,s,!0,r),c=o&&o.collides;return c&&(o.faceTop=!0,o.faceBottom=!0,o.faceLeft=!0,o.faceRight=!0),a&&a.collides&&(c&&(o.faceTop=!1),a.faceBottom=!c),u&&u.collides&&(c&&(o.faceBottom=!1),u.faceTop=!c),f&&f.collides&&(c&&(o.faceLeft=!1),f.faceRight=!c),v&&v.collides&&(c&&(o.faceRight=!1),v.faceLeft=!c),o&&!o.collides&&o.resetFaces(),o};h.exports=l},42573:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7423),l=t(7386),i=function(s,r,o,a,u){for(var f=null,v=null,c=null,g=null,p=l(s,r,o,a,null,u),T=0;T<p.length;T++){var C=p[T];C&&(C.collides?(f=e(C.x,C.y-1,!0,u),v=e(C.x,C.y+1,!0,u),c=e(C.x-1,C.y,!0,u),g=e(C.x+1,C.y,!0,u),C.faceTop=!(f&&f.collides),C.faceBottom=!(v&&v.collides),C.faceLeft=!(c&&c.collides),C.faceRight=!(g&&g.collides)):C.resetFaces())}};h.exports=i},33528:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=new e,i=function(s,r,o,a){var u=o.tilemapLayer,f=u.cullPaddingX,v=u.cullPaddingY,c=u.tilemap.tileToWorldXY(s,r,l,a,u);return c.x>a.worldView.x+u.scaleX*o.tileWidth*(-f-.5)&&c.x<a.worldView.right+u.scaleX*o.tileWidth*(f-.5)&&c.y>a.worldView.y+u.scaleY*o.tileHeight*(-v-1)&&c.y<a.worldView.bottom+u.scaleY*o.tileHeight*(v-.5)};h.exports=i},1785:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(42573),l=t(7386),i=t(62991),s=t(23029),r=function(o,a,u,f,v,c,g,p){g===void 0&&(g=!0);var T=l(o,a,u,f,null,p),C=[];T.forEach(function(w){var O=new s(w.layer,w.index,w.x,w.y,w.width,w.height,w.baseWidth,w.baseHeight);O.copy(w),C.push(O)});for(var M=v-o,A=c-a,R=0;R<C.length;R++){var P=C[R],L=P.x+M,F=P.y+A;i(L,F,p)&&p.data[F][L]&&(P.x=L,P.y=F,P.updatePixelXY(),p.data[F][L]=P)}g&&e(v-1,c-1,u+2,f+2,p),T.length=0,C.length=0};h.exports=r},78419:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62644),l=t(7386),i=t(27987),s=function(r,o,a,u,f,v){a||(a={}),Array.isArray(r)||(r=[r]);var c=v.tilemapLayer;u||(u=c.scene),f||(f=u.cameras.main);var g=v.width,p=v.height,T=l(0,0,g,p,null,v),C=[],M,A=function(F,w,O){for(var B=0;B<O.length;B++){var I=O[B];F.hasOwnProperty(I)||(F[I]=w[I])}};for(M=0;M<T.length;M++){var R=T[M],P=e(a);if(r.indexOf(R.index)!==-1){var L=c.tileToWorldXY(R.x,R.y,void 0,f,v);P.x=L.x,P.y=L.y,A(P,R,["rotation","flipX","flipY","alpha","visible","tint"]),P.hasOwnProperty("origin")||(P.x+=R.width*.5,P.y+=R.height*.5),P.hasOwnProperty("useSpriteSheet")&&(P.key=R.tileset.image,P.frame=R.index-R.tileset.firstgid),C.push(u.make.sprite(P))}}if(Array.isArray(o))for(M=0;M<r.length;M++)i(r[M],o[M],0,0,g,p,v);else if(o!==null)for(M=0;M<r.length;M++)i(r[M],o,0,0,g,p,v);return C};h.exports=s},19545:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(87841),l=t(63448),i=t(56583),s=new e,r=function(o,a){var u=o.tilemapLayer.tilemap,f=o.tilemapLayer,v=Math.floor(u.tileWidth*f.scaleX),c=Math.floor(u.tileHeight*f.scaleY),g=i(a.worldView.x-f.x,v,0,!0)-f.cullPaddingX,p=l(a.worldView.right-f.x,v,0,!0)+f.cullPaddingX,T=i(a.worldView.y-f.y,c,0,!0)-f.cullPaddingY,C=l(a.worldView.bottom-f.y,c,0,!0)+f.cullPaddingY;return s.setTo(g,T,p-g,C-T)};h.exports=r},30003:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19545),l=t(32483),i=function(s,r,o,a){o===void 0&&(o=[]),a===void 0&&(a=0),o.length=0;var u=s.tilemapLayer,f=e(s,r);return(u.skipCull||u.scrollFactorX!==1||u.scrollFactorY!==1)&&(f.left=0,f.right=s.width,f.top=0,f.bottom=s.height),l(s,f,a,o),o};h.exports=i},35137:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=t(42573),i=t(20576),s=function(r,o,a,u,f,v,c){for(var g=c.collideIndexes.indexOf(r)!==-1,p=e(o,a,u,f,null,c),T=0;T<p.length;T++)p[T].index=r,i(p[T],g);v&&l(o-1,a-1,u+2,f+2,c)};h.exports=s},40253:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=function(i,s,r,o,a,u,f,v){var c=e(r,o,a,u,f,v);return c.filter(i,s)};h.exports=l},52692:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){e===void 0&&(e=0),l===void 0&&(l=!1);var s=0,r,o,a;if(l){for(o=i.height-1;o>=0;o--)for(r=i.width-1;r>=0;r--)if(a=i.data[o][r],a&&a.index===t){if(s===e)return a;s+=1}}else for(o=0;o<i.height;o++)for(r=0;r<i.width;r++)if(a=i.data[o][r],a&&a.index===t){if(s===e)return a;s+=1}return null};h.exports=d},66151:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=function(i,s,r,o,a,u,f,v){var c=e(r,o,a,u,f,v);return c.find(i,s)||null};h.exports=l},97560:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=function(i,s,r,o,a,u,f,v){var c=e(r,o,a,u,f,v);c.forEach(i,s)};h.exports=l},43305:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=t(30003),i=t(9474),s=t(14018),r=t(29747),o=t(54503),a=function(u){return u===e.ORTHOGONAL?l:u===e.HEXAGONAL?i:u===e.STAGGERED?o:u===e.ISOMETRIC?s:r};h.exports=a},7423:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62991),l=function(i,s,r,o){if(e(i,s,o)){var a=o.data[s][i]||null;return a?a.index===-1?r?a:null:a:null}else return null};h.exports=l},60540:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7423),l=t(26099),i=new l,s=function(r,o,a,u,f){return f.tilemapLayer.worldToTileXY(r,o,!0,i,u),e(i.x,i.y,a,f)};h.exports=s},55826:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o){var a=o.baseTileWidth,u=o.baseTileHeight,f=o.tilemapLayer,v=0,c=0;f&&(r||(r=f.scene.cameras.main),v=f.x+r.scrollX*(1-f.scrollFactorX),c=f.y+r.scrollY*(1-f.scrollFactorY),a*=f.scaleX,u*=f.scaleY);var g=v+i*a,p=c+s*u;return[new e(g,p),new e(g+a,p),new e(g+a,p+u),new e(g,p+u)]};h.exports=l},11758:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=t(27229),i=t(29747),s=t(55826),r=function(o){return o===e.ORTHOGONAL?s:o===e.ISOMETRIC?i:o===e.HEXAGONAL?l:(o===e.STAGGERED,i)};h.exports=r},39167:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=t(29747),i=t(97281),s=function(r){return r===e.ORTHOGONAL?i:l};h.exports=s},62e3:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=t(19951),i=t(14127),s=t(29747),r=t(97202),o=t(70326),a=function(u){return u===e.ORTHOGONAL?o:u===e.ISOMETRIC?i:u===e.HEXAGONAL?l:u===e.STAGGERED?r:s};h.exports=a},5984:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=t(29747),i=t(28054),s=t(29650),r=function(o){return o===e.ORTHOGONAL?s:o===e.STAGGERED?i:l};h.exports=r},7386:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l=function(i,s,r,o,a,u){i===void 0&&(i=0),s===void 0&&(s=0),r===void 0&&(r=u.width),o===void 0&&(o=u.height),a||(a={});var f=e(a,"isNotEmpty",!1),v=e(a,"isColliding",!1),c=e(a,"hasInterestingFace",!1);i<0&&(r+=i,i=0),s<0&&(o+=s,s=0),i+r>u.width&&(r=Math.max(u.width-i,0)),s+o>u.height&&(o=Math.max(u.height-s,0));for(var g=[],p=s;p<s+o;p++)for(var T=i;T<i+r;T++){var C=u.data[p][T];if(C!==null){if(f&&C.index===-1||v&&!C.collides||c&&!C.hasInterestingFace)continue;g.push(C)}}return g};h.exports=l},91141:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(55738),l=t(7386),i=t(91865),s=t(29747),r=t(26099),o=t(91907),a=function(g,p){return i.RectangleToTriangle(p,g)},u=new r,f=new r,v=new r,c=function(g,p,T,C){if(C.orientation!==o.ORTHOGONAL)return console.warn("GetTilesWithinShape only works with orthogonal tilemaps"),[];if(g===void 0)return[];var M=s;g instanceof e.Circle?M=i.CircleToRectangle:g instanceof e.Rectangle?M=i.RectangleToRectangle:g instanceof e.Triangle?M=a:g instanceof e.Line&&(M=i.LineToRectangle),C.tilemapLayer.worldToTileXY(g.left,g.top,!0,f,T);var A=f.x,R=f.y;C.tilemapLayer.worldToTileXY(g.right,g.bottom,!1,v,T);var P=Math.ceil(v.x),L=Math.ceil(v.y),F=Math.max(P-A,1),w=Math.max(L-R,1),O=l(A,R,F,w,p,C),B=C.tileWidth,I=C.tileHeight;C.tilemapLayer&&(B*=C.tilemapLayer.scaleX,I*=C.tilemapLayer.scaleY);for(var D=[],N=new e.Rectangle(0,0,B,I),z=0;z<O.length;z++){var V=O[z];C.tilemapLayer.tileToWorldXY(V.x,V.y,u,T),N.x=u.x,N.y=u.y,M(g,N)&&D.push(V)}return D};h.exports=c},96523:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=t(26099),i=new l,s=new l,r=function(o,a,u,f,v,c,g){var p=g.tilemapLayer.tilemap._convert.WorldToTileXY;p(o,a,!0,i,c,g);var T=i.x,C=i.y;p(o+u,a+f,!1,s,c,g);var M=Math.ceil(s.x),A=Math.ceil(s.y);return e(T,C,M-T,A-C,v,g)};h.exports=r},96113:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=t(20242),i=t(10095),s=function(r){return r===e.ORTHOGONAL?i:l};h.exports=s},16926:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=t(86625),i=t(96897),s=t(29747),r=t(15108),o=t(85896),a=function(u){return u===e.ORTHOGONAL?o:u===e.ISOMETRIC?i:u===e.HEXAGONAL?l:u===e.STAGGERED?r:s};h.exports=a},55762:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=t(20242),i=t(51900),s=t(63288),r=function(o){return o===e.ORTHOGONAL?s:o===e.STAGGERED?i:l};h.exports=r},45091:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62991),l=function(i,s,r){if(e(i,s,r)){var o=r.data[s][i];return o!==null&&o.index>-1}else return!1};h.exports=l},24152:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(45091),l=t(26099),i=new l,s=function(r,o,a,u){u.tilemapLayer.worldToTileXY(r,o,!0,i,a);var f=i.x,v=i.y;return e(f,v,u)};h.exports=s},90454:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(63448),l=t(56583),i=function(s,r){var o=s.tilemapLayer.tilemap,a=s.tilemapLayer,u=Math.floor(o.tileWidth*a.scaleX),f=Math.floor(o.tileHeight*a.scaleY),v=s.hexSideLength,c,g,p,T;if(s.staggerAxis==="y"){var C=(f-v)/2+v;c=l(r.worldView.x-a.x,u,0,!0)-a.cullPaddingX,g=e(r.worldView.right-a.x,u,0,!0)+a.cullPaddingX,p=l(r.worldView.y-a.y,C,0,!0)-a.cullPaddingY,T=e(r.worldView.bottom-a.y,C,0,!0)+a.cullPaddingY}else{var M=(u-v)/2+v;c=l(r.worldView.x-a.x,M,0,!0)-a.cullPaddingX,g=e(r.worldView.right-a.x,M,0,!0)+a.cullPaddingX,p=l(r.worldView.y-a.y,f,0,!0)-a.cullPaddingY,T=e(r.worldView.bottom-a.y,f,0,!0)+a.cullPaddingY}return{left:c,right:g,top:p,bottom:T}};h.exports=i},9474:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(90454),l=t(32483),i=function(s,r,o,a){o===void 0&&(o=[]),a===void 0&&(a=0),o.length=0;var u=s.tilemapLayer,f=e(s,r);return u.skipCull&&u.scrollFactorX===1&&u.scrollFactorY===1&&(f.left=0,f.right=s.width,f.top=0,f.bottom=s.height),l(s,f,a,o),o};h.exports=i},27229:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19951),l=t(26099),i=new l,s=function(r,o,a,u){var f=u.baseTileWidth,v=u.baseTileHeight,c=u.tilemapLayer;c&&(f*=c.scaleX,v*=c.scaleY);var g=e(r,o,i,a,u),p=[],T=.5773502691896257,C,M;u.staggerAxis==="y"?(C=T*f,M=v/2):(C=f/2,M=T*v);for(var A=0;A<6;A++){var R=2*Math.PI*(.5-A)/6;p.push(new l(g.x+C*Math.cos(R),g.y+M*Math.sin(R)))}return p};h.exports=s},19951:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a){r||(r=new e);var u=a.baseTileWidth,f=a.baseTileHeight,v=a.tilemapLayer,c=0,g=0;v&&(o||(o=v.scene.cameras.main),c=v.x+o.scrollX*(1-v.scrollFactorX),g=v.y+o.scrollY*(1-v.scrollFactorY),u*=v.scaleX,f*=v.scaleY);var p=u/2,T=f/2,C,M,A=a.staggerAxis,R=a.staggerIndex;return A==="y"?(C=c+u*i+u,M=g+1.5*s*T+T,s%2===0&&(R==="odd"?C-=p:C+=p)):A==="x"&&R==="odd"&&(C=c+1.5*i*p+p,M=g+f*i+f,i%2===0&&(R==="odd"?M-=T:M+=T)),r.set(C,M)};h.exports=l},86625:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a,u){o||(o=new e);var f=u.baseTileWidth,v=u.baseTileHeight,c=u.tilemapLayer;c&&(a||(a=c.scene.cameras.main),i=i-(c.x+a.scrollX*(1-c.scrollFactorX)),s=s-(c.y+a.scrollY*(1-c.scrollFactorY)),f*=c.scaleX,v*=c.scaleY);var g=.5773502691896257,p=-.3333333333333333,T=0,C=.6666666666666666,M=f/2,A=v/2,R,P,L,F,w;u.staggerAxis==="y"?(R=(i-M)/(g*f),P=(s-A)/A,L=g*R+p*P,F=T*R+C*P):(R=(i-M)/M,P=(s-A)/(g*v),L=p*R+g*P,F=C*R+T*P),w=-L-F;var O=Math.round(L),B=Math.round(F),I=Math.round(w),D=Math.abs(O-L),N=Math.abs(B-F),z=Math.abs(I-w);D>N&&D>z?O=-B-I:N>z&&(B=-O-I);var V,U=B;return u.staggerIndex==="odd"?V=U%2===0?B/2+O:B/2+O-.5:V=U%2===0?B/2+O:B/2+O+.5,o.set(V,U)};h.exports=l},62991:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t>=0&&t<l.width&&e>=0&&e<l.height};h.exports=d},14018:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(33528),l=function(i,s,r,o){r===void 0&&(r=[]),o===void 0&&(o=0),r.length=0;var a=i.tilemapLayer,u=i.data,f=i.width,v=i.height,c=a.skipCull,g=0,p=f,T=0,C=v,M,A,R;if(o===0)for(A=T;A<C;A++)for(M=g;M<p;M++)R=u[A][M],!(!R||R.index===-1||!R.visible||R.alpha===0)&&(!c&&!e(M,A,i,s)||r.push(R));else if(o===1)for(A=T;A<C;A++)for(M=p;M>=g;M--)R=u[A][M],!(!R||R.index===-1||!R.visible||R.alpha===0)&&(!c&&!e(M,A,i,s)||r.push(R));else if(o===2)for(A=C;A>=T;A--)for(M=g;M<p;M++)R=u[A][M],!(!R||R.index===-1||!R.visible||R.alpha===0)&&(!c&&!e(M,A,i,s)||r.push(R));else if(o===3)for(A=C;A>=T;A--)for(M=p;M>=g;M--)R=u[A][M],!(!R||R.index===-1||!R.visible||R.alpha===0)&&(!c&&!e(M,A,i,s)||r.push(R));return a.tilesDrawn=r.length,a.tilesTotal=f*v,r};h.exports=l},14127:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a){r||(r=new e);var u=a.baseTileWidth,f=a.baseTileHeight,v=a.tilemapLayer,c=0,g=0;v&&(o||(o=v.scene.cameras.main),c=v.x+o.scrollX*(1-v.scrollFactorX),u*=v.scaleX,g=v.y+o.scrollY*(1-v.scrollFactorY),f*=v.scaleY);var p=c+(i-s)*(u/2),T=g+(i+s)*(f/2);return r.set(p,T)};h.exports=l},96897:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a,u,f){o||(o=new e);var v=u.baseTileWidth,c=u.baseTileHeight,g=u.tilemapLayer;g&&(a||(a=g.scene.cameras.main),s=s-(g.y+a.scrollY*(1-g.scrollFactorY)),c*=g.scaleY,i=i-(g.x+a.scrollX*(1-g.scrollFactorX)),v*=g.scaleX);var p=v/2,T=c/2;i=i-p,f||(s=s-c);var C=.5*(i/p+s/T),M=.5*(-i/p+s/T);return r&&(C=Math.floor(C),M=Math.floor(M)),o.set(C,M)};h.exports=l},71558:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(23029),l=t(62991),i=t(72023),s=t(20576),r=function(o,a,u,f,v){if(f===void 0&&(f=!0),!l(a,u,v))return null;var c,g=v.data[u][a],p=g&&g.collides;o instanceof e?(v.data[u][a]===null&&(v.data[u][a]=new e(v,o.index,a,u,v.tileWidth,v.tileHeight)),v.data[u][a].copy(o)):(c=o,v.data[u][a]===null?v.data[u][a]=new e(v,c,a,u,v.tileWidth,v.tileHeight):v.data[u][a].index=c);var T=v.data[u][a],C=v.collideIndexes.indexOf(T.index)!==-1;if(c=o instanceof e?o.index:o,c===-1)T.width=v.tileWidth,T.height=v.tileHeight;else{var M=v.tilemapLayer.tilemap,A=M.tiles,R=A[c][2],P=M.tilesets[R];T.width=P.tileWidth,T.height=P.tileHeight}return s(T,C),f&&p!==T.collides&&i(a,u,v),T};h.exports=r},26303:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(71558),l=t(26099),i=new l,s=function(r,o,a,u,f,v){return v.tilemapLayer.worldToTileXY(o,a,!0,i,f,v),e(r,i.x,i.y,u,v)};h.exports=s},14051:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(42573),l=t(71558),i=function(s,r,o,a,u){if(a===void 0&&(a=!0),!Array.isArray(s))return null;Array.isArray(s[0])||(s=[s]);for(var f=s.length,v=s[0].length,c=0;c<f;c++)for(var g=0;g<v;g++){var p=s[c][g];l(p,r+g,o+c,!1,u)}a&&e(r-1,o-1,v+2,f+2,u)};h.exports=i},77389:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=t(26546),i=function(s,r,o,a,u,f){var v,c=e(s,r,o,a,{},f);if(!u)for(u=[],v=0;v<c.length;v++)u.indexOf(c[v].index)===-1&&u.push(c[v].index);for(v=0;v<c.length;v++)c[v].index=l(u)};h.exports=i},63557:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(23029),l=t(62991),i=t(72023),s=function(r,o,a,u,f){if(a===void 0&&(a=!0),u===void 0&&(u=!0),!l(r,o,f))return null;var v=f.data[o][r];if(v)f.data[o][r]=a?null:new e(f,-1,r,o,f.tileWidth,f.tileHeight);else return null;return u&&v&&v.collides&&i(r,o,f),v};h.exports=s},94178:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(63557),l=t(26099),i=new l,s=function(r,o,a,u,f,v){return v.tilemapLayer.worldToTileXY(r,o,!0,i,f,v),e(i.x,i.y,a,u,v)};h.exports=s},15533:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=t(3956),i=new l(105,210,231,150),s=new l(243,134,48,200),r=new l(40,39,37,150),o=function(a,u,f){u===void 0&&(u={});var v=u.tileColor!==void 0?u.tileColor:i,c=u.collidingTileColor!==void 0?u.collidingTileColor:s,g=u.faceColor!==void 0?u.faceColor:r,p=e(0,0,f.width,f.height,null,f);a.translateCanvas(f.tilemapLayer.x,f.tilemapLayer.y),a.scaleCanvas(f.tilemapLayer.scaleX,f.tilemapLayer.scaleY);for(var T=0;T<p.length;T++){var C=p[T],M=C.tileset?C.tileset.tileOffset:{x:0,y:0},A=C.width,R=C.height,P=C.pixelX-M.x,L=C.pixelY-M.y,F=C.collides?c:v;F!==null&&(a.fillStyle(F.color,F.alpha/255),a.fillRect(P,L,A,R)),P+=1,L+=1,A-=2,R-=2,g!==null&&(a.lineStyle(1,g.color,g.alpha/255),C.faceTop&&a.lineBetween(P,L,P+A,L),C.faceRight&&a.lineBetween(P+A,L,P+A,L+R),C.faceBottom&&a.lineBetween(P,L+R,P+A,L+R),C.faceLeft&&a.lineBetween(P,L,P,L+R))}};h.exports=o},27987:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=function(i,s,r,o,a,u,f){for(var v=e(r,o,a,u,null,f),c=0;c<v.length;c++)v[c]&&v[c].index===i&&(v[c].index=s)};h.exports=l},32483:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=t.data,r=t.width,o=t.height,a=t.tilemapLayer,u=Math.max(0,e.left),f=Math.min(r,e.right),v=Math.max(0,e.top),c=Math.min(o,e.bottom),g,p,T;if(l===0)for(p=v;p<c;p++)for(g=u;s[p]&&g<f;g++)T=s[p][g],!(!T||T.index===-1||!T.visible||T.alpha===0)&&i.push(T);else if(l===1)for(p=v;p<c;p++)for(g=f;s[p]&&g>=u;g--)T=s[p][g],!(!T||T.index===-1||!T.visible||T.alpha===0)&&i.push(T);else if(l===2)for(p=c;p>=v;p--)for(g=u;s[p]&&g<f;g++)T=s[p][g],!(!T||T.index===-1||!T.visible||T.alpha===0)&&i.push(T);else if(l===3)for(p=c;p>=v;p--)for(g=f;s[p]&&g>=u;g--)T=s[p][g],!(!T||T.index===-1||!T.visible||T.alpha===0)&&i.push(T);return a.tilesDrawn=i.length,a.tilesTotal=r*o,i};h.exports=d},57068:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20576),l=t(42573),i=t(9589),s=function(r,o,a,u,f){o===void 0&&(o=!0),a===void 0&&(a=!0),f===void 0&&(f=!0),Array.isArray(r)||(r=[r]);for(var v=0;v<r.length;v++)i(r[v],o,u);if(f)for(var c=0;c<u.height;c++)for(var g=0;g<u.width;g++){var p=u.data[c][g];p&&r.indexOf(p.index)!==-1&&e(p,o)}a&&l(0,0,u.width,u.height,u)};h.exports=s},37266:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20576),l=t(42573),i=t(9589),s=function(r,o,a,u,f,v){if(a===void 0&&(a=!0),u===void 0&&(u=!0),v===void 0&&(v=!0),!(r>o)){for(var c=r;c<=o;c++)i(c,a,f);if(v)for(var g=0;g<f.height;g++)for(var p=0;p<f.width;p++){var T=f.data[g][p];T&&T.index>=r&&T.index<=o&&e(T,a)}u&&l(0,0,f.width,f.height,f)}};h.exports=s},75661:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20576),l=t(42573),i=t(9589),s=function(r,o,a,u){o===void 0&&(o=!0),a===void 0&&(a=!0),Array.isArray(r)||(r=[r]);for(var f=0;f<u.height;f++)for(var v=0;v<u.width;v++){var c=u.data[f][v];c&&r.indexOf(c.index)===-1&&(e(c,o),i(c.index,o,u))}a&&l(0,0,u.width,u.height,u)};h.exports=s},64740:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20576),l=t(42573),i=t(97022),s=function(r,o,a,u){o===void 0&&(o=!0),a===void 0&&(a=!0);for(var f=0;f<u.height;f++)for(var v=0;v<u.width;v++){var c=u.data[f][v];if(c){for(var g in r)if(i(c.properties,g)){var p=r[g];Array.isArray(p)||(p=[p]);for(var T=0;T<p.length;T++)c.properties[g]===p[T]&&e(c,o)}}}a&&l(0,0,u.width,u.height,u)};h.exports=s},63307:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(20576),l=t(42573),i=function(s,r,o){s===void 0&&(s=!0),r===void 0&&(r=!0);for(var a=0;a<o.height;a++)for(var u=0;u<o.width;u++){var f=o.data[a][u];if(f){var v=f.getCollisionGroup();v&&v.objects&&v.objects.length>0&&e(f,s)}}r&&l(0,0,o.width,o.height,o)};h.exports=i},9589:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=l.collideIndexes.indexOf(t);e&&i===-1?l.collideIndexes.push(t):!e&&i!==-1&&l.collideIndexes.splice(i,1)};h.exports=d},20576:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};h.exports=d},79583:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){if(typeof t=="number")i.callbacks[t]=e!==null?{callback:e,callbackContext:l}:void 0;else for(var s=0,r=t.length;s<r;s++)i.callbacks[t[s]]=e!==null?{callback:e,callbackContext:l}:void 0};h.exports=d},93254:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=function(i,s,r,o,a,u,f){for(var v=e(i,s,r,o,null,f),c=0;c<v.length;c++)v[c].setCollisionCallback(a,u)};h.exports=l},32903:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=t(33680),i=function(s,r,o,a,u){var f=e(s,r,o,a,null,u),v=f.map(function(g){return g.index});l(v);for(var c=0;c<f.length;c++)f[c].index=v[c]};h.exports=i},61325:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(63448),l=t(56583),i=function(s,r){var o=s.tilemapLayer.tilemap,a=s.tilemapLayer,u=Math.floor(o.tileWidth*a.scaleX),f=Math.floor(o.tileHeight*a.scaleY),v=l(r.worldView.x-a.x,u,0,!0)-a.cullPaddingX,c=e(r.worldView.right-a.x,u,0,!0)+a.cullPaddingX,g=l(r.worldView.y-a.y,f/2,0,!0)-a.cullPaddingY,p=e(r.worldView.bottom-a.y,f/2,0,!0)+a.cullPaddingY;return{left:v,right:c,top:g,bottom:p}};h.exports=i},54503:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(61325),l=t(32483),i=function(s,r,o,a){o===void 0&&(o=[]),a===void 0&&(a=0),o.length=0;var u=s.tilemapLayer,f=e(s,r);return u.skipCull&&u.scrollFactorX===1&&u.scrollFactorY===1&&(f.left=0,f.right=s.width,f.top=0,f.bottom=s.height),l(s,f,a,o),o};h.exports=i},97202:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a){r||(r=new e);var u=a.baseTileWidth,f=a.baseTileHeight,v=a.tilemapLayer,c=0,g=0;v&&(o||(o=v.scene.cameras.main),c=v.x+o.scrollX*(1-v.scrollFactorX),u*=v.scaleX,g=v.y+o.scrollY*(1-v.scrollFactorY),f*=v.scaleY);var p=c+i*u+s%2*(u/2),T=g+s*(f/2);return r.set(p,T)};h.exports=l},28054:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=l.baseTileHeight,s=l.tilemapLayer,r=0;return s&&(e===void 0&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),i*=s.scaleY),r+t*(i/2)+i};h.exports=d},15108:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a,u){o||(o=new e);var f=u.baseTileWidth,v=u.baseTileHeight,c=u.tilemapLayer;c&&(a||(a=c.scene.cameras.main),s=s-(c.y+a.scrollY*(1-c.scrollFactorY)),v*=c.scaleY,i=i-(c.x+a.scrollX*(1-c.scrollFactorX)),f*=c.scaleX);var g=r?Math.floor(s/(v/2)):s/(v/2),p=r?Math.floor((i+g%2*.5*f)/f):(i+g%2*.5*f)/f;return o.set(p,g)};h.exports=l},51900:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=i.baseTileHeight,r=i.tilemapLayer;return r&&(l||(l=r.scene.cameras.main),t=t-(r.y+l.scrollY*(1-r.scrollFactorY)),s*=r.scaleY),e?Math.floor(t/(s/2)):t/(s/2)};h.exports=d},86560:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=function(i,s,r,o,a,u,f){for(var v=e(r,o,a,u,null,f),c=0;c<v.length;c++)v[c]&&(v[c].index===i?v[c].index=s:v[c].index===s&&(v[c].index=i))};h.exports=l},97281:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=l.baseTileWidth,s=l.tilemapLayer,r=0;return s&&(e||(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),i*=s.scaleX),r+t*i};h.exports=d},70326:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(97281),l=t(29650),i=t(26099),s=function(r,o,a,u,f){return a||(a=new i(0,0)),a.x=e(r,u,f),a.y=l(o,u,f),a};h.exports=s},29650:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=l.baseTileHeight,s=l.tilemapLayer,r=0;return s&&(e||(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),i*=s.scaleY),r+t*i};h.exports=d},77366:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(7386),l=t(75508),i=function(s,r,o,a,u,f){if(u){var v,c=e(s,r,o,a,null,f),g=0;for(v=0;v<u.length;v++)g+=u[v].weight;if(!(g<=0))for(v=0;v<c.length;v++){for(var p=l.RND.frac()*g,T=0,C=-1,M=0;M<u.length;M++)if(T+=u[M].weight,p<=T){var A=u[M].index;C=Array.isArray(A)?A[Math.floor(l.RND.frac()*A.length)]:A;break}c[v].index=C}}};h.exports=i},10095:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(85896),l=t(26099),i=new l,s=function(r,o,a,u){return e(r,0,o,i,a,u),i.x};h.exports=s},85896:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(26099),l=function(i,s,r,o,a,u){r===void 0&&(r=!0),o||(o=new e);var f=u.baseTileWidth,v=u.baseTileHeight,c=u.tilemapLayer;c&&(a||(a=c.scene.cameras.main),i=i-(c.x+a.scrollX*(1-c.scrollFactorX)),s=s-(c.y+a.scrollY*(1-c.scrollFactorY)),f*=c.scaleX,v*=c.scaleY);var g=i/f,p=s/v;return r&&(g=Math.floor(g),p=Math.floor(p)),o.set(g,p)};h.exports=l},63288:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(85896),l=t(26099),i=new l,s=function(r,o,a,u){return e(0,r,o,i,a,u),i.y};h.exports=s},81086:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={ORIENTATION:t(91907)};h.exports=e},62501:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(79291),l=t(21829),i={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),TilemapLayerBase:t(44731),TilemapLayer:t(20442),TilemapGPULayer:t(53180),Orientation:t(91907),LayerData:t(14977),MapData:t(87010),ObjectLayer:t(48700)};i=e(!1,i,l.ORIENTATION),h.exports=i},14977:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(91907),i=t(95540),s=new e({initialize:function(o){o===void 0&&(o={}),this.name=i(o,"name","layer"),this.id=i(o,"id",0),this.x=i(o,"x",0),this.y=i(o,"y",0),this.width=i(o,"width",0),this.height=i(o,"height",0),this.tileWidth=i(o,"tileWidth",0),this.tileHeight=i(o,"tileHeight",0),this.baseTileWidth=i(o,"baseTileWidth",this.tileWidth),this.baseTileHeight=i(o,"baseTileHeight",this.tileHeight),this.orientation=i(o,"orientation",l.ORTHOGONAL),this.widthInPixels=i(o,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=i(o,"heightInPixels",this.height*this.baseTileHeight),this.alpha=i(o,"alpha",1),this.visible=i(o,"visible",!0),this.properties=i(o,"properties",[]),this.indexes=i(o,"indexes",[]),this.collideIndexes=i(o,"collideIndexes",[]),this.callbacks=i(o,"callbacks",[]),this.bodies=i(o,"bodies",[]),this.data=i(o,"data",[]),this.tilemapLayer=i(o,"tilemapLayer",null),this.hexSideLength=i(o,"hexSideLength",0),this.staggerAxis=i(o,"staggerAxis","y"),this.staggerIndex=i(o,"staggerIndex","odd")}});h.exports=s},87010:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(91907),i=t(95540),s=new e({initialize:function(o){o===void 0&&(o={}),this.name=i(o,"name","map"),this.width=i(o,"width",0),this.height=i(o,"height",0),this.infinite=i(o,"infinite",!1),this.tileWidth=i(o,"tileWidth",0),this.tileHeight=i(o,"tileHeight",0),this.widthInPixels=i(o,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=i(o,"heightInPixels",this.height*this.tileHeight),this.format=i(o,"format",null),this.orientation=i(o,"orientation",l.ORTHOGONAL),this.renderOrder=i(o,"renderOrder","right-down"),this.version=i(o,"version","1"),this.properties=i(o,"properties",{}),this.layers=i(o,"layers",[]),this.images=i(o,"images",[]),this.objects=i(o,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=i(o,"collision",{}),this.tilesets=i(o,"tilesets",[]),this.imageCollections=i(o,"imageCollections",[]),this.tiles=i(o,"tiles",[]),this.hexSideLength=i(o,"hexSideLength",0),this.staggerAxis=i(o,"staggerAxis","y"),this.staggerIndex=i(o,"staggerIndex","odd")}});h.exports=s},48700:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(95540),i=new e({initialize:function(r){r===void 0&&(r={}),this.name=l(r,"name","object layer"),this.id=l(r,"id",0),this.opacity=l(r,"opacity",1),this.properties=l(r,"properties",{}),this.propertyTypes=l(r,"propertytypes",{}),this.type=l(r,"type","objectgroup"),this.visible=l(r,"visible",!0),this.objects=l(r,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});h.exports=i},6641:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(91907),l=function(i){return i=i.toLowerCase(),i==="isometric"?e.ISOMETRIC:i==="staggered"?e.STAGGERED:i==="hexagonal"?e.HEXAGONAL:e.ORTHOGONAL};h.exports=l},46177:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(80341),l=t(2342),i=t(82593),s=t(46594),r=t(87021),o=function(a,u,f,v,c,g){var p;switch(u){case e.ARRAY_2D:p=l(a,f,v,c,g);break;case e.CSV:p=i(a,f,v,c,g);break;case e.TILED_JSON:p=s(a,f,g);break;case e.WELTMEISTER:p=r(a,f,g);break;default:console.warn("Unrecognized tilemap data format: "+u),p=null}return p};h.exports=o},2342:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(80341),l=t(14977),i=t(87010),s=t(23029),r=function(o,a,u,f,v){for(var c=new l({tileWidth:u,tileHeight:f}),g=new i({name:o,tileWidth:u,tileHeight:f,format:e.ARRAY_2D,layers:[c]}),p=[],T=a.length,C=0,M=0;M<a.length;M++){p[M]=[];for(var A=a[M],R=0;R<A.length;R++){var P=parseInt(A[R],10);isNaN(P)||P===-1?p[M][R]=v?null:new s(c,-1,R,M,u,f):p[M][R]=new s(c,P,R,M,u,f)}C===0&&(C=A.length)}return g.width=c.width=C,g.height=c.height=T,g.widthInPixels=c.widthInPixels=C*u,g.heightInPixels=c.heightInPixels=T*f,c.data=p,g};h.exports=r},82593:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(80341),l=t(2342),i=function(s,r,o,a,u){var f=r.trim().split(`
|
||
`).map(function(c){return c.split(",")}),v=l(s,f,o,a,u);return v.format=e.CSV,v};h.exports=i},6656:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(14977),l=t(23029),i=function(s,r){for(var o=[],a=0;a<s.layer.length;a++){for(var u=s.layer[a],f=new e({name:u.name,width:u.width,height:u.height,tileWidth:u.tilesize,tileHeight:u.tilesize,visible:u.visible===1}),v=[],c=[],g=0;g<u.data.length;g++){for(var p=0;p<u.data[g].length;p++){var T=u.data[g][p]-1,C;T>-1?C=new l(f,T,p,g,u.tilesize,u.tilesize):C=r?null:new l(f,-1,p,g,u.tilesize,u.tilesize),v.push(C)}c.push(v),v=[]}f.data=c,o.push(f)}return o};h.exports=i},96483:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(33629),l=function(i){for(var s=[],r=[],o=0;o<i.layer.length;o++){var a=i.layer[o],u=a.tilesetName;u!==""&&r.indexOf(u)===-1&&(r.push(u),s.push(new e(u,0,a.tilesize,a.tilesize,0,0)))}return s};h.exports=l},87021:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(80341),l=t(87010),i=t(6656),s=t(96483),r=function(o,a,u){if(a.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+o),null;for(var f=0,v=0,c=0;c<a.layer.length;c++)a.layer[c].width>f&&(f=a.layer[c].width),a.layer[c].height>v&&(v=a.layer[c].height);var g=new l({width:f,height:v,name:o,tileWidth:a.layer[0].tilesize,tileHeight:a.layer[0].tilesize,format:e.WELTMEISTER});return g.layers=i(a,u),g.tilesets=s(a),g};h.exports=r},52833:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}},57442:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}},51233:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(79291),l=function(i){for(var s,r,o,a,u,f=0;f<i.layers.length;f++){s=i.layers[f],a=null;for(var v=0;v<s.data.length;v++){u=s.data[v];for(var c=0;c<u.length;c++)r=u[c],!(r===null||r.index<0)&&(o=i.tiles[r.index][2],a=i.tilesets[o],r.width=a.tileWidth,r.height=a.tileHeight,a.tileProperties&&a.tileProperties[r.index-a.firstgid]&&(r.properties=e(r.properties,a.tileProperties[r.index-a.firstgid])))}}};h.exports=l},41868:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){for(var e=window.atob(t),l=e.length,i=new Array(l/4),s=0;s<l;s+=4)i[s/4]=(e.charCodeAt(s)|e.charCodeAt(s+1)<<8|e.charCodeAt(s+2)<<16|e.charCodeAt(s+3)<<24)>>>0;return i};h.exports=d},84101:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(33629),l=function(i){var s,r,o=[];for(s=0;s<i.imageCollections.length;s++)for(var a=i.imageCollections[s],u=a.images,f=0;f<u.length;f++){var v=u[f],c={x:0,y:v.height-i.tileHeight};r=new e(v.image,v.gid,v.width,v.height,0,0,void 0,void 0,c),r.updateTileData(v.width,v.height),i.tilesets.push(r)}for(s=0;s<i.tilesets.length;s++){r=i.tilesets[s];for(var g=r.tileMargin,p=r.tileMargin,T=0,C=0,M=0,A=r.firstgid;A<r.firstgid+r.total&&(o[A]=[g,p,s],g+=r.tileWidth+r.tileSpacing,T++,!(T===r.total||(C++,C===r.columns&&(g=r.tileMargin,p+=r.tileHeight+r.tileSpacing,C=0,M++,M===r.rows))));A++);}return o};h.exports=l},79677:(h,d,t)=>{/**
|
||
* @author Seth Berrier <berriers@uwstout.edu>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l=function(i,s,r){if(!s)return{i:0,layers:i.layers,name:"",opacity:1,visible:!0,x:0,y:0};var o=s.x+e(s,"startx",0)*i.tilewidth+e(s,"offsetx",0),a=s.y+e(s,"starty",0)*i.tileheight+e(s,"offsety",0);return{i:0,layers:s.layers,name:r.name+s.name+"/",opacity:r.opacity*s.opacity,visible:r.visible&&s.visible,x:r.x+o,y:r.y+a}};h.exports=l},29920:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=2147483648,t=1073741824,e=536870912,l=function(i){var s=!!(i&d),r=!!(i&t),o=!!(i&e);i=i&536870911;var a=0,u=!1;return s&&r&&o?(a=Math.PI/2,u=!0):s&&r&&!o?(a=Math.PI,u=!1):s&&!r&&o?(a=Math.PI/2,u=!1):s&&!r&&!o?(a=0,u=!0):!s&&r&&o?(a=3*Math.PI/2,u=!1):!s&&r&&!o?(a=Math.PI,u=!0):!s&&!r&&o?(a=3*Math.PI/2,u=!0):!s&&!r&&!o&&(a=0,u=!1),{gid:i,flippedHorizontal:s,flippedVertical:r,flippedAntiDiagonal:o,rotation:a,flipped:u}};h.exports=l},12635:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l=t(79677),i=function(s){for(var r=[],o=[],a=l(s);a.i<a.layers.length||o.length>0;){if(a.i>=a.layers.length){if(o.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=o.pop();continue}var u=a.layers[a.i];if(a.i++,u.type!=="imagelayer"){if(u.type==="group"){var f=l(s,u,a);o.push(a),a=f}continue}var v=e(u,"offsetx",0)+e(u,"startx",0),c=e(u,"offsety",0)+e(u,"starty",0);r.push({name:a.name+u.name,image:u.image,x:a.x+v+u.x,y:a.y+c+u.y,alpha:a.opacity*u.opacity,visible:a.visible&&u.visible,properties:e(u,"properties",{})})}return r};h.exports=i},46594:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(51233),l=t(84101),i=t(91907),s=t(62644),r=t(80341),o=t(6641),a=t(87010),u=t(12635),f=t(22611),v=t(28200),c=t(24619),g=function(p,T,C){var M=s(T),A=new a({width:M.width,height:M.height,name:p,tileWidth:M.tilewidth,tileHeight:M.tileheight,orientation:o(M.orientation),format:r.TILED_JSON,version:M.version,properties:M.properties,renderOrder:M.renderorder,infinite:M.infinite});if(A.orientation===i.HEXAGONAL)if(A.hexSideLength=M.hexsidelength,A.staggerAxis=M.staggeraxis,A.staggerIndex=M.staggerindex,A.staggerAxis==="y"){var R=(A.tileHeight-A.hexSideLength)/2;A.widthInPixels=A.tileWidth*(A.width+.5),A.heightInPixels=A.height*(A.hexSideLength+R)+R}else{var P=(A.tileWidth-A.hexSideLength)/2;A.widthInPixels=A.width*(A.hexSideLength+P)+P,A.heightInPixels=A.tileHeight*(A.height+.5)}A.layers=v(M,C),A.images=u(M);var L=c(M);return A.tilesets=L.tilesets,A.imageCollections=L.imageCollections,A.objects=f(M),A.tiles=l(A),e(A),A};h.exports=g},52205:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(18254),l=t(29920),i=function(o){return{x:o.x,y:o.y}},s=["id","name","type","rotation","properties","visible","x","y","width","height"],r=function(o,a,u){a===void 0&&(a=0),u===void 0&&(u=0);var f=e(o,s);if(f.x+=a,f.y+=u,o.gid){var v=l(o.gid);f.gid=v.gid,f.flippedHorizontal=v.flippedHorizontal,f.flippedVertical=v.flippedVertical,f.flippedAntiDiagonal=v.flippedAntiDiagonal}else o.polyline?f.polyline=o.polyline.map(i):o.polygon?f.polygon=o.polygon.map(i):o.ellipse?f.ellipse=o.ellipse:o.text?f.text=o.text:o.point?f.point=!0:f.rectangle=!0;return f};h.exports=r},22611:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95540),l=t(52205),i=t(48700),s=t(79677),r=function(o){for(var a=[],u=[],f=s(o);f.i<f.layers.length||u.length>0;){if(f.i>=f.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=u.pop();continue}var v=f.layers[f.i];if(f.i++,v.opacity*=f.opacity,v.visible=f.visible&&v.visible,v.type!=="objectgroup"){if(v.type==="group"){var c=s(o,v,f);u.push(f),f=c}continue}v.name=f.name+v.name;for(var g=f.x+e(v,"startx",0)+e(v,"offsetx",0),p=f.y+e(v,"starty",0)+e(v,"offsety",0),T=[],C=0;C<v.objects.length;C++){var M=l(v.objects[C],g,p);T.push(M)}var A=new i(v);A.objects=T,a.push(A)}return a};h.exports=r},28200:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(41868),l=t(91907),i=t(79677),s=t(6641),r=t(95540),o=t(14977),a=t(29920),u=t(23029),f=function(v,c){for(var g=r(v,"infinite",!1),p=[],T=[],C=i(v);C.i<C.layers.length||T.length>0;){if(C.i>=C.layers.length){if(T.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}C=T.pop();continue}var M=C.layers[C.i];if(C.i++,M.type!=="tilelayer"){if(M.type==="group"){var A=i(v,M,C);T.push(C),C=A}continue}if(M.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+M.name+"'");continue}else if(M.encoding&&M.encoding==="base64"){if(M.chunks)for(var R=0;R<M.chunks.length;R++)M.chunks[R].data=e(M.chunks[R].data);M.data&&(M.data=e(M.data)),delete M.encoding}var P,L,F,w,O,B,I=[],D=0;if(g){var N=r(M,"startx",0)+M.x,z=r(M,"starty",0)+M.y;P=new o({name:C.name+M.name,id:M.id,x:C.x+r(M,"offsetx",0)+N*v.tilewidth,y:C.y+r(M,"offsety",0)+z*v.tileheight,width:M.width,height:M.height,tileWidth:v.tilewidth,tileHeight:v.tileheight,alpha:C.opacity*M.opacity,visible:C.visible&&M.visible,properties:r(M,"properties",[]),orientation:s(v.orientation)}),P.orientation===l.HEXAGONAL&&(P.hexSideLength=v.hexsidelength,P.staggerAxis=v.staggeraxis,P.staggerIndex=v.staggerindex,P.staggerAxis==="y"?(O=(P.tileHeight-P.hexSideLength)/2,P.widthInPixels=P.tileWidth*(P.width+.5),P.heightInPixels=P.height*(P.hexSideLength+O)+O):(B=(P.tileWidth-P.hexSideLength)/2,P.widthInPixels=P.width*(P.hexSideLength+B)+B,P.heightInPixels=P.tileHeight*(P.height+.5)));for(var V=0;V<M.height;V++){I[V]=[null];for(var U=0;U<M.width;U++)I[V][U]=null}for(V=0,J=M.chunks.length;V<J;V++)for(var G=M.chunks[V],b=G.x-N,Y=G.y-z,W=0,H=0,X=G.data.length;H<X;H++){var K=D+b,Z=W+Y;L=a(G.data[H]),L.gid>0?(F=new u(P,L.gid,K,Z,v.tilewidth,v.tileheight),F.rotation=L.rotation,F.flipX=L.flipped,I[Z][K]=F):(w=c?null:new u(P,-1,K,Z,v.tilewidth,v.tileheight),I[Z][K]=w),D++,D===G.width&&(W++,D=0)}}else{P=new o({name:C.name+M.name,id:M.id,x:C.x+r(M,"offsetx",0)+M.x,y:C.y+r(M,"offsety",0)+M.y,width:M.width,height:M.height,tileWidth:v.tilewidth,tileHeight:v.tileheight,alpha:C.opacity*M.opacity,visible:C.visible&&M.visible,properties:r(M,"properties",[]),orientation:s(v.orientation)}),P.orientation===l.HEXAGONAL&&(P.hexSideLength=v.hexsidelength,P.staggerAxis=v.staggeraxis,P.staggerIndex=v.staggerindex,P.staggerAxis==="y"?(O=(P.tileHeight-P.hexSideLength)/2,P.widthInPixels=P.tileWidth*(P.width+.5),P.heightInPixels=P.height*(P.hexSideLength+O)+O):(B=(P.tileWidth-P.hexSideLength)/2,P.widthInPixels=P.width*(P.hexSideLength+B)+B,P.heightInPixels=P.tileHeight*(P.height+.5)));for(var Q=[],j=0,J=M.data.length;j<J;j++)L=a(M.data[j]),L.gid>0?(F=new u(P,L.gid,D,I.length,v.tilewidth,v.tileheight),F.rotation=L.rotation,F.flipX=L.flipped,Q.push(F)):(w=c?null:new u(P,-1,D,I.length,v.tilewidth,v.tileheight),Q.push(w)),D++,D===M.width&&(I.push(Q),D=0,Q=[])}P.data=I,p.push(P)}return p};h.exports=f},24619:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(33629),l=t(16536),i=t(52205),s=t(57880),r=function(o){for(var a=[],u=[],f=null,v,c=0;c<o.tilesets.length;c++){var g=o.tilesets[c];if(g.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(g.image){var p=new e(g.name,g.firstgid,g.tilewidth,g.tileheight,g.margin,g.spacing,void 0,void 0,g.tileoffset);if(o.version>1){var T=void 0,C=void 0;if(Array.isArray(g.tiles)){T=T||{},C=C||{};for(var M=0;M<g.tiles.length;M++){var A=g.tiles[M];if(A.properties){var R={};A.properties.forEach(function(Y){R[Y.name]=Y.value}),C[A.id]=R}if(A.objectgroup&&((T[A.id]||(T[A.id]={})).objectgroup=A.objectgroup,A.objectgroup.objects)){var P=A.objectgroup.objects.map(function(Y){return i(Y)});T[A.id].objectgroup.objects=P}A.animation&&((T[A.id]||(T[A.id]={})).animation=A.animation),A.type&&((T[A.id]||(T[A.id]={})).type=A.type)}for(var L in T){var F=T[L].animation;if(F){for(var w=0,O=0;O<F.length;O++)F[O].startTime=w,w+=F[O].duration;T[L].animationDuration=w}}}Array.isArray(g.wangsets)&&(T=T||{},C=C||{},s(g.wangsets,T)),T&&(p.tileData=T,p.tileProperties=C)}else if(g.tileproperties&&(p.tileProperties=g.tileproperties),g.tiles){p.tileData=g.tiles;for(v in p.tileData){var B=p.tileData[v].objectgroup;if(B&&B.objects){var I=B.objects.map(function(Y){return i(Y)});p.tileData[v].objectgroup.objects=I}}}p.updateTileData(g.imagewidth,g.imageheight),a.push(p)}else{var D=new l(g.name,g.firstgid,g.tilewidth,g.tileheight,g.margin,g.spacing,g.properties),N=0;for(M=0;M<g.tiles.length;M++){A=g.tiles[M];var z=A.image,V=parseInt(A.id,10),U=g.firstgid+V,G=A.imagewidth,b=A.imageheight;D.addImage(U,z,G,b),N=Math.max(V,N)}D.maxId=N,u.push(D)}f&&(f.lastgid=g.firstgid-1),f=g}return{tilesets:a,imageCollections:u}};h.exports=r},57880:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){for(var l=0;l<t.length;l++){var i=t[l],s=l;if(i.name&&i.name!==""&&(s=i.name),Array.isArray(i.wangtiles)&&i.wangtiles.length>0){var r={},o={},a,u,f;if(Array.isArray(i.edgecolors))for(a=0;a<i.edgecolors.length;a++)f=1+a,u=i.edgecolors[a],u.name!==""&&(r[f]=u.name);if(Array.isArray(i.cornercolors))for(a=0;a<i.cornercolors.length;a++)f=1+a,u=i.cornercolors[a],u.name!==""&&(o[f]=u.name);if(Array.isArray(i.colors))for(a=0;a<i.colors.length;a++)u=i.colors[a],f=1+a,u.name!==""&&(r[f]=o[f]=u.name);for(var v=[r,o,r,o,r,o,r,o],c=0;c<i.wangtiles.length;c++){var g=i.wangtiles[c],p=e[g.tileid]||(e[g.tileid]={});p=p.wangid||(p.wangid={});for(var T=[],C=0;C<Math.min(v.length,g.wangid.length);C++){if(u=g.wangid[C],u===0){T.push(void 0);continue}var M=v[C][u];if(M!==void 0){T.push(M);continue}T.push(u)}p[s]=T}}}};h.exports=d},96761:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(37277),i=t(44594),s=t(94880),r=t(72905),o=new e({initialize:function(u){this.scene=u,this.systems=u.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],u.sys.events.once(i.BOOT,this.boot,this),u.sys.events.on(i.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(i.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var a=this.systems.events;a.on(i.PRE_UPDATE,this.preUpdate,this),a.on(i.UPDATE,this.update,this),a.once(i.SHUTDOWN,this.shutdown,this)},addEvent:function(a){var u;if(a instanceof s){if(u=a,this.removeEvent(u),u.elapsed=u.startAt,u.hasDispatched=!1,u.repeatCount=u.repeat===-1||u.loop?999999999999:u.repeat,u.delay<=0&&u.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay")}else u=new s(a);return this._pendingInsertion.push(u),u},delayedCall:function(a,u,f,v){return this.addEvent({delay:a,callback:u,args:f,callbackScope:v})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(a){Array.isArray(a)||(a=[a]);for(var u=0;u<a.length;u++){var f=a[u];r(this._pendingRemoval,f),r(this._pendingInsertion,f),r(this._active,f)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var a=this._pendingRemoval.length,u=this._pendingInsertion.length;if(!(a===0&&u===0)){var f,v;for(f=0;f<a;f++){v=this._pendingRemoval[f];var c=this._active.indexOf(v);c>-1&&this._active.splice(c,1),v.destroy()}for(f=0;f<u;f++)v=this._pendingInsertion[f],this._active.push(v);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(a,u){if(this.now=a,!this.paused){u*=this.timeScale;for(var f=0;f<this._active.length;f++){var v=this._active[f];if(!v.paused&&(v.elapsed+=u*v.timeScale,v.elapsed>=v.delay)){var c=v.elapsed-v.delay;if(v.elapsed=v.delay,!v.hasDispatched&&v.callback&&(v.hasDispatched=!0,v.callback.apply(v.callbackScope,v.args)),v.repeatCount>0){if(v.repeatCount--,c>=v.delay)for(;c>=v.delay&&v.repeatCount>0;)v.callback&&v.callback.apply(v.callbackScope,v.args),c-=v.delay,v.repeatCount--;v.elapsed=c,v.hasDispatched=!1}else v.hasDispatched&&this._pendingRemoval.push(v)}}}},shutdown:function(){var a;for(a=0;a<this._pendingInsertion.length;a++)this._pendingInsertion[a].destroy();for(a=0;a<this._active.length;a++)this._active[a].destroy();for(a=0;a<this._pendingRemoval.length;a++)this._pendingRemoval[a].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var u=this.systems.events;u.off(i.PRE_UPDATE,this.preUpdate,this),u.off(i.UPDATE,this.update,this),u.off(i.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(i.START,this.start,this),this.scene=null,this.systems=null}});l.register("Clock",o,"time"),h.exports=o},96120:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50792),i=t(39429),s=t(95540),r=t(44594),o=t(89809),a=new e({Extends:l,initialize:function(f,v){l.call(this),this.scene=f,this.systems=f.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 c=this.systems.events;c.on(r.PRE_UPDATE,this.preUpdate,this),c.on(r.UPDATE,this.update,this),c.once(r.SHUTDOWN,this.destroy,this),v&&this.add(v)},preUpdate:function(u,f){this.paused||(this.elapsed+=f*this.timeScale)},update:function(){if(!(this.paused||this.complete)){var u,f=this.events,v=!1,c=this.systems,g;for(u=0;u<f.length;u++){var p=f[u];if(!p.complete&&p.time<=this.elapsed){if(p.complete=!0,this.totalComplete++,g=p.target?p.target:this,p.if&&!p.if.call(g,p))continue;if(p.once&&(v=!0),p.set&&p.target)for(var T in p.set)p.target[T]=p.set[T];this.iteration&&p.repeat++,p.loop&&p.repeat&&p.loop.call(g),p.tween&&(p.tweenInstance=c.tweens.add(p.tween)),p.sound&&(typeof p.sound=="string"?c.sound.play(p.sound):c.sound.play(p.sound.key,p.sound.config)),p.event&&this.emit(p.event,g),p.run&&p.run.call(g),p.stop&&this.stop()}}if(v)for(u=0;u<f.length;u++)f[u].complete&&f[u].once&&(f.splice(u,1),u--);var C=0;for(u=0;u<f.length;u++)f[u].complete||C++;C===0&&(f.length>0||this.totalComplete>0)&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(o.COMPLETE,this)}},play:function(u){return u===void 0&&(u=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,u&&this.reset(),this},pause:function(){this.paused=!0;for(var u=this.events,f=0;f<u.length;f++){var v=u[f];v.tweenInstance&&(v.tweenInstance.paused=!0)}return this},repeat:function(u){return(u===void 0||u===!0)&&(u=-1),u===!1&&(u=0),this.loop=u,this},resume:function(){this.paused=!1;for(var u=this.events,f=0;f<u.length;f++){var v=u[f];v.tweenInstance&&(v.tweenInstance.paused=!1)}return this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(u){u===void 0&&(u=!1),this.elapsed=0,u||(this.iteration=0);for(var f=this.events,v=0;v<f.length;v++){var c=f[v];c.complete=!1,u||(c.repeat=0),c.tweenInstance&&c.tweenInstance.stop()}return this.play(!1)},add:function(u){Array.isArray(u)||(u=[u]);var f=this.events,v=0;f.length>0&&(v=f[f.length-1].time);for(var c=0;c<u.length;c++){var g=u[c],p=s(g,"at",0),T=s(g,"in",null);T!==null&&(p=this.elapsed+T);var C=s(g,"from",null);C!==null&&(p=v+C),f.push({complete:!1,time:p,repeat:0,if:s(g,"if",null),run:s(g,"run",null),loop:s(g,"loop",null),event:s(g,"event",null),target:s(g,"target",null),set:s(g,"set",null),tween:s(g,"tween",null),sound:s(g,"sound",null),once:s(g,"once",!1),stop:s(g,"stop",!1)}),v=p}return this.complete=!1,this},clear:function(){for(var u=this.events,f=0;f<u.length;f++){var v=u[f];v.tweenInstance&&v.tweenInstance.stop()}return u=[],this.elapsed=0,this.paused=!0,this},isPlaying:function(){return!this.paused&&!this.complete},getProgress:function(){var u=Math.min(this.totalComplete,this.events.length);return u/this.events.length},destroy:function(){var u=this.systems.events;u.off(r.PRE_UPDATE,this.preUpdate,this),u.off(r.UPDATE,this.update,this),u.off(r.SHUTDOWN,this.destroy,this),this.clear(),this.scene=null,this.systems=null}});i.register("timeline",function(u){return new a(this.scene,u)}),h.exports=a},94880:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(95540),i=new e({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(s){if(this.delay=l(s,"delay",0),this.repeat=l(s,"repeat",0),this.loop=l(s,"loop",!1),this.callback=l(s,"callback",void 0),this.callbackScope=l(s,"callbackScope",this),this.args=l(s,"args",[]),this.timeScale=l(s,"timeScale",1),this.startAt=l(s,"startAt",0),this.paused=l(s,"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 s=this.delay+this.delay*this.repeat,r=this.elapsed+this.delay*(this.repeat-this.repeatCount);return r/s}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(s){s===void 0&&(s=!1),this.elapsed=this.delay,this.hasDispatched=!s,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});h.exports=i},35945:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="complete"},89809:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={COMPLETE:t(35945)}},90291:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}},40382:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(72905),l=t(83419),i=t(43491),s=t(88032),r=t(37277),o=t(44594),a=t(93109),u=t(8462),f=t(8357),v=t(43960),c=t(26012),g=new l({initialize:function(T){this.scene=T,this.events=T.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.events.once(o.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(o.UPDATE,this.update,this),this.events.once(o.SHUTDOWN,this.shutdown,this)},create:function(p){Array.isArray(p)||(p=[p]);for(var T=[],C=0;C<p.length;C++){var M=p[C];M instanceof u||M instanceof v?T.push(M):Array.isArray(M.tweens)?T.push(c(this,M)):T.push(f(this,M))}return T.length===1?T[0]:T},add:function(p){var T=p,C=this.tweens;return T instanceof u||T instanceof v||(Array.isArray(T.tweens)?T=c(this,T):T=f(this,T)),C.push(T.reset()),T},addMultiple:function(p){for(var T,C=[],M=this.tweens,A=0;A<p.length;A++)T=p[A],T instanceof u||T instanceof v||(Array.isArray(T.tweens)?T=c(this,T):T=f(this,T)),M.push(T.reset()),C.push(T);return C},chain:function(p){var T=c(this,p);return this.tweens.push(T.init()),T},getChainedTweens:function(p){return p.getChainedTweens()},has:function(p){return this.tweens.indexOf(p)>-1},existing:function(p){return this.has(p)||this.tweens.push(p.reset()),this},addCounter:function(p){var T=s(this,p);return this.tweens.push(T.reset()),T},stagger:function(p,T){return a(p,T)},setLagSmooth:function(p,T){return p===void 0&&(p=1/1e-8),T===void 0&&(T=0),this.maxLag=p,this.lagSkip=Math.min(T,this.maxLag),this},setFps:function(p){return p===void 0&&(p=240),this.gap=1e3/p,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(p){var T=Date.now()-this.prevTime;T>this.maxLag&&(this.startTime+=T-this.lagSkip),this.prevTime+=T;var C=this.prevTime-this.startTime,M=C-this.nextTime,A=C-this.time*1e3;return M>0||p?(C/=1e3,this.time=C,this.nextTime+=M+(M>=this.gap?4:this.gap-M)):A=0,A},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(p){p===void 0&&(p=!1);var T=this.getDelta(p);if(!(T<=0)){this.processing=!0;var C,M,A=[],R=this.tweens;for(C=0;C<R.length;C++)M=R[C],M.update(T)&&A.push(M);var P=A.length;if(P&&R.length>0){for(C=0;C<P;C++){M=A[C];var L=R.indexOf(M);L>-1&&(M.isPendingRemove()||M.isDestroyed())&&(R.splice(L,1),M.destroy())}A.length=0}this.processing=!1}},remove:function(p){return this.processing?p.setPendingRemoveState():(e(this.tweens,p),p.setRemovedState()),this},reset:function(p){return this.existing(p),p.seek(),p.setActiveState(),this},makeActive:function(p){return this.existing(p),p.setActiveState(),this},each:function(p,T){var C,M=[null];for(C=1;C<arguments.length;C++)M.push(arguments[C]);return this.tweens.forEach(function(A){M[0]=A,p.apply(T,M)}),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(p){var T=[],C=this.tweens;Array.isArray(p)?p=i(p):p=[p];for(var M=p.length,A=0;A<C.length;A++)for(var R=C[A],P=0;P<M;P++)!R.isDestroyed()&&R.hasTarget(p[P])&&T.push(R);return T},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(p){return this.timeScale=p,this},isTweening:function(p){for(var T=this.tweens,C,M=0;M<T.length;M++)if(C=T[M],C.isPlaying()&&C.hasTarget(p))return!0;return!1},killAll:function(){for(var p=this.processing?this.getTweens():this.tweens,T=0;T<p.length;T++)p[T].destroy();return this.processing||(p.length=0),this},killTweensOf:function(p){for(var T=this.getTweensOf(p),C=0;C<T.length;C++)T[C].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(o.UPDATE,this.update,this),this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.events=null}});r.register("TweenManager",g,"tweens"),h.exports=g},57355:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){return t&&t.hasOwnProperty(e)?t[e]:l};h.exports=d},6113:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(62640),l=t(35355),i=function(s,r){var o=e.Power0;if(typeof s=="string")if(e.hasOwnProperty(s))o=e[s];else{var a="";if(s.indexOf(".")){a=s.substring(s.indexOf(".")+1);var u=a.toLowerCase();u==="in"?a="easeIn":u==="out"?a="easeOut":u==="inout"&&(a="easeInOut")}s=l(s.substring(0,s.indexOf(".")+1)+a),e.hasOwnProperty(s)&&(o=e[s])}else typeof s=="function"&&(o=s);if(!r)return o;var f=r.slice(0);return f.unshift(0),function(v){return f[0]=v,o.apply(this,f)}};h.exports=i},91389:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(89318),l=t(77259),i=t(28392),s={bezier:e,catmull:l,catmullrom:l,linear:i},r=function(o){if(o===null)return null;var a=s.linear;return typeof o=="string"?s.hasOwnProperty(o)&&(a=s[o]):typeof o=="function"&&(a=o),a};h.exports=r},55292:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i;if(t.hasOwnProperty(e)){var s=typeof t[e];s==="function"?i=function(r,o,a,u,f,v){return t[e](r,o,a,u,f,v)}:i=function(){return t[e]}}else typeof l=="function"?i=l:i=function(){return l};return i};h.exports=d},82985:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(81076),l=function(i){var s,r=[];if(i.hasOwnProperty("props"))for(s in i.props)s.substring(0,1)!=="_"&&r.push({key:s,value:i.props[s]});else for(s in i)e.indexOf(s)===-1&&s.substring(0,1)!=="_"&&r.push({key:s,value:i[s]});return r};h.exports=l},62329:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35154),l=function(i){var s=e(i,"targets",null);return s===null||(typeof s=="function"&&(s=s.call()),Array.isArray(s)||(s=[s])),s};h.exports=l},17777:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(30976),l=t(99472);function i(u){return!!u.getActive&&typeof u.getActive=="function"}function s(u){return!!u.getStart&&typeof u.getStart=="function"}function r(u){return!!u.getEnd&&typeof u.getEnd=="function"}function o(u){return s(u)||r(u)||i(u)}var a=function(u,f){var v,c=function(V,U,G){return G},g=function(V,U,G){return G},p=null,T=typeof f;if(T==="number")c=function(){return f};else if(Array.isArray(f))g=function(){return f[0]},c=function(){return f[f.length-1]};else if(T==="string"){var C=f.toLowerCase(),M=C.substring(0,6)==="random",A=C.substring(0,3)==="int";if(M||A){var R=C.indexOf("("),P=C.indexOf(")"),L=C.indexOf(",");if(R&&P&&L){var F=parseFloat(C.substring(R+1,L)),w=parseFloat(C.substring(L+1,P));M?c=function(){return l(F,w)}:c=function(){return e(F,w)}}else throw new Error("invalid random() format")}else{C=C[0];var O=parseFloat(f.substr(2));switch(C){case"+":c=function(V,U,G){return G+O};break;case"-":c=function(V,U,G){return G-O};break;case"*":c=function(V,U,G){return G*O};break;case"/":c=function(V,U,G){return G/O};break;default:c=function(){return parseFloat(f)}}}}else if(T==="function")c=f;else if(T==="object")if(o(f))i(f)&&(p=f.getActive),r(f)&&(c=f.getEnd),s(f)&&(g=f.getStart);else if(f.hasOwnProperty("value"))v=a(u,f.value);else{var B=f.hasOwnProperty("to"),I=f.hasOwnProperty("from"),D=f.hasOwnProperty("start");if(B&&(I||D)){if(v=a(u,f.to),D){var N=a(u,f.start);v.getActive=N.getEnd}if(I){var z=a(u,f.from);v.getStart=z.getEnd}}}return v||(v={getActive:p,getEnd:c,getStart:g}),v};h.exports=a},88032:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70402),l=t(69902),i=t(23568),s=t(57355),r=t(6113),o=t(95540),a=t(55292),u=t(35154),f=t(17777),v=t(269),c=t(8462),g=function(p,T,C){if(T instanceof c)return T.parent=p,T;C===void 0?C=l:C=v(l,C);var M=o(T,"from",0),A=o(T,"to",1),R=[{value:M}],P=o(T,"delay",C.delay),L=o(T,"easeParams",C.easeParams),F=o(T,"ease",C.ease),w=f("value",A),O=new c(p,R),B=O.add(0,"value",w.getEnd,w.getStart,w.getActive,r(o(T,"ease",F),o(T,"easeParams",L)),a(T,"delay",P),o(T,"duration",C.duration),s(T,"yoyo",C.yoyo),o(T,"hold",C.hold),o(T,"repeat",C.repeat),o(T,"repeatDelay",C.repeatDelay),!1,!1);B.start=M,B.current=M,O.completeDelay=i(T,"completeDelay",0),O.loop=Math.round(i(T,"loop",0)),O.loopDelay=Math.round(i(T,"loopDelay",0)),O.paused=s(T,"paused",!1),O.persist=s(T,"persist",!1),O.isNumberTween=!0,O.callbackScope=u(T,"callbackScope",O);for(var I=e.TYPES,D=0;D<I.length;D++){var N=I[D],z=u(T,N,!1);if(z){var V=u(T,N+"Params",[]);O.setCallback(N,z,V)}}return O};h.exports=g},93109:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(6113),l=t(35154),i=t(36383),s=function(r,o){o===void 0&&(o={});var a,u=l(o,"start",0),f=l(o,"ease",null),v=l(o,"grid",null),c=l(o,"from",0),g=c==="first",p=c==="center",T=c==="last",C=typeof c=="number",M=Array.isArray(r),A=parseFloat(M?r[0]:r),R=M?parseFloat(r[1]):0,P=Math.max(A,R);if(M&&(u+=A),v){var L=v[0],F=v[1],w=0,O=0,B=0,I=0,D=[];T?(w=L-1,O=F-1):C?(w=c%L,O=Math.floor(c/L)):p&&(w=(L-1)/2,O=(F-1)/2);for(var N=i.MIN_SAFE_INTEGER,z=0;z<F;z++){D[z]=[];for(var V=0;V<L;V++){B=w-V,I=O-z;var U=Math.sqrt(B*B+I*I);U>N&&(N=U),D[z][V]=U}}}var G=f?e(f):null;return v?a=function(b,Y,W,H){var X=0,K=H%L,Z=Math.floor(H/L);K>=0&&K<L&&Z>=0&&Z<F&&(X=D[Z][K]);var Q;if(M){var j=R-A;G?Q=X/N*j*G(X/N):Q=X/N*j}else G?Q=X*A*G(X/N):Q=X*A;return Q+u}:a=function(b,Y,W,H,X){X--;var K;g?K=H:p?K=Math.abs(X/2-H):T?K=X-H:C&&(K=Math.abs(c-H));var Z;if(M){var Q;p?Q=(R-A)/X*(K*2):Q=(R-A)/X*K,G?Z=Q*G(K/X):Z=Q}else G?Z=X*P*G(K/X):Z=K*A;return Z+u},a};h.exports=s},8357:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70402),l=t(69902),i=t(23568),s=t(57355),r=t(6113),o=t(95540),a=t(91389),u=t(55292),f=t(82985),v=t(62329),c=t(35154),g=t(17777),p=t(269),T=t(8462),C=function(M,A,R){if(A instanceof T)return A.parent=M,A;R===void 0?R=l:R=p(l,R);var P=v(A);!P&&R.targets&&(P=R.targets);for(var L=f(A),F=o(A,"delay",R.delay),w=o(A,"duration",R.duration),O=o(A,"easeParams",R.easeParams),B=o(A,"ease",R.ease),I=o(A,"hold",R.hold),D=o(A,"repeat",R.repeat),N=o(A,"repeatDelay",R.repeatDelay),z=s(A,"yoyo",R.yoyo),V=s(A,"flipX",R.flipX),U=s(A,"flipY",R.flipY),G=o(A,"interpolation",R.interpolation),b=function(q,_,rt,at){if(rt==="texture"){var ht=at,ot=void 0;Array.isArray(at)?(ht=at[0],ot=at[1]):at.hasOwnProperty("value")?(ht=at.value,Array.isArray(at.value)?(ht=at.value[0],ot=at.value[1]):typeof at.value=="string"&&(ht=at.value)):typeof at=="string"&&(ht=at),q.addFrame(_,ht,ot,u(at,"delay",F),o(at,"duration",w),o(at,"hold",I),o(at,"repeat",D),o(at,"repeatDelay",N),s(at,"flipX",V),s(at,"flipY",U))}else{var nt=g(rt,at),it=a(o(at,"interpolation",G));q.add(_,rt,nt.getEnd,nt.getStart,nt.getActive,r(o(at,"ease",B),o(at,"easeParams",O)),u(at,"delay",F),o(at,"duration",w),s(at,"yoyo",z),o(at,"hold",I),o(at,"repeat",D),o(at,"repeatDelay",N),s(at,"flipX",V),s(at,"flipY",U),it,it?at:null)}},Y=new T(M,P),W=0;W<L.length;W++)for(var H=L[W].key,X=L[W].value,K=0;K<P.length;K++){var Z=P[K];Z&&(H==="scale"&&!P[K].hasOwnProperty("scale")?(b(Y,K,"scaleX",X),b(Y,K,"scaleY",X)):b(Y,K,H,X))}Y.completeDelay=i(A,"completeDelay",0),Y.loop=Math.round(i(A,"loop",0)),Y.loopDelay=Math.round(i(A,"loopDelay",0)),Y.paused=s(A,"paused",!1),Y.persist=s(A,"persist",!1),Y.callbackScope=o(A,"callbackScope",Y);for(var Q=e.TYPES,j=0;j<Q.length;j++){var J=Q[j],tt=c(A,J,!1);if(tt){var k=c(A,J+"Params",[]);Y.setCallback(J,tt,k)}}return Y};h.exports=C},26012:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70402),l=t(23568),i=t(57355),s=t(62329),r=t(35154),o=t(8357),a=t(43960),u=function(f,v){if(v instanceof a)return v.parent=f,v;var c=new a(f);c.startDelay=r(v,"delay",0),c.completeDelay=l(v,"completeDelay",0),c.loop=Math.round(l(v,"loop",r(v,"repeat",0))),c.loopDelay=Math.round(l(v,"loopDelay",r(v,"repeatDelay",0))),c.paused=i(v,"paused",!1),c.persist=i(v,"persist",!1),c.callbackScope=r(v,"callbackScope",c);var g,p=e.TYPES;for(g=0;g<p.length;g++){var T=p[g],C=r(v,T,!1);if(C){var M=r(v,T+"Params",[]);c.setCallback(T,C,M)}}var A=r(v,"tweens",null);if(Array.isArray(A)){var R=[],P=s(v),L=void 0;for(P&&(L={targets:P}),g=0;g<A.length;g++)R.push(o(c,A[g],L));c.add(R)}return c};h.exports=u},30231:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="active"},98540:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="complete"},67233:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="loop"},2859:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="pause"},98336:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="repeat"},25764:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="resume"},32193:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="start"},84371:h=>{/**
|
||
* @author samme
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="stop"},70766:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="update"},55659:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports="yoyo"},842:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e={States:t(86353),Builders:t(30231),Events:t(842),TweenManager:t(40382),Tween:t(8462),TweenData:t(48177),TweenFrameData:t(42220),BaseTween:t(70402),TweenChain:t(43960)};h.exports=e},70402:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(50792),i=t(842),s=t(86353),r=new e({Extends:l,initialize:function(a){l.call(this),this.parent=a,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=s.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(o){return this.timeScale=o,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(i.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(i.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(i.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(i.TWEEN_COMPLETE,"onComplete")},complete:function(o){return o===void 0&&(o=0),o?(this.setCompleteDelayState(),this.countdown=o):this.onCompleteHandler(),this},completeAfterLoop:function(o){return o===void 0&&(o=0),this.loopCounter>o&&(this.loopCounter=o),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(i.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(o){this.countdown-=o,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(i.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(o){return this.countdown-=o,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(i.TWEEN_START,"onStart"),o=0),o},updateCompleteDelay:function(o){this.countdown-=o,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(o,a,u){return u===void 0&&(u=[]),this.callbacks.hasOwnProperty(o)&&(this.callbacks[o]={func:a,params:u}),this},setPendingState:function(){this.state=s.PENDING},setActiveState:function(){this.state=s.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=s.LOOP_DELAY},setCompleteDelayState:function(){this.state=s.COMPLETE_DELAY},setStartDelayState:function(){this.state=s.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=s.PENDING_REMOVE},setRemovedState:function(){this.state=s.REMOVED},setFinishedState:function(){this.state=s.FINISHED},setDestroyedState:function(){this.state=s.DESTROYED},isPending:function(){return this.state===s.PENDING},isActive:function(){return this.state===s.ACTIVE},isLoopDelayed:function(){return this.state===s.LOOP_DELAY},isCompleteDelayed:function(){return this.state===s.COMPLETE_DELAY},isStartDelayed:function(){return this.state===s.START_DELAY},isPendingRemove:function(){return this.state===s.PENDING_REMOVE},isRemoved:function(){return this.state===s.REMOVED},isFinished:function(){return this.state===s.FINISHED},isDestroyed:function(){return this.state===s.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(o){o.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"],h.exports=r},95042:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(83419),l=t(842),i=t(86353),s=new e({initialize:function(o,a,u,f,v,c,g,p,T,C){this.tween=o,this.targetIndex=a,this.duration=f<=0?.01:f,this.totalDuration=0,this.delay=0,this.getDelay=u,this.yoyo=v,this.hold=c,this.repeat=g,this.repeatDelay=p,this.repeatCounter=0,this.flipX=T,this.flipY=C,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=i.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=i.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=i.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=i.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=i.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=i.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=i.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=i.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===i.CREATED},isDelayed:function(){return this.state===i.DELAY},isPendingRender:function(){return this.state===i.PENDING_RENDER},isPlayingForward:function(){return this.state===i.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===i.PLAYING_BACKWARD},isHolding:function(){return this.state===i.HOLD_DELAY},isRepeating:function(){return this.state===i.REPEAT_DELAY},isComplete:function(){return this.state===i.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,o=r.totalTargets,a=this.targetIndex,u=r.targets[a],f=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(u,f,0,a,o,r),this.repeatCounter=this.repeat===-1?i.MAX:this.repeat,this.setPendingRenderState();var v=this.duration+this.hold;this.yoyo&&(v+=this.duration);var c=v+this.repeatDelay;this.totalDuration=this.delay+v,this.repeat===-1?(this.totalDuration+=c*i.MAX,r.isInfinite=!0):this.repeat>0&&(this.totalDuration+=c*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,o,a){var u=this.tween,f=u.totalTargets,v=this.targetIndex,c=u.targets[v],g=this.key,p=g!=="texture";if(this.elapsed=r,this.progress=r/this.duration,this.flipX&&c.toggleFlipX(),this.flipY&&c.toggleFlipY(),p&&(o||a)&&(this.start=this.getStartValue(c,g,this.start,v,f,u)),a){this.setPlayingBackwardState(),this.dispatchEvent(l.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,p&&(this.end=this.getEndValue(c,g,this.start,v,f,u)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-r,p&&(this.current=this.start,c[g]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(l.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});h.exports=s},69902:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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};h.exports=d},81076:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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"]},8462:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(70402),l=t(83419),i=t(842),s=t(44603),r=t(39429),o=t(36383),a=t(86353),u=t(48177),f=t(42220),v=new l({Extends:e,initialize:function(g,p){e.call(this,g),this.targets=p,this.totalTargets=p.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(c,g,p,T,C,M,A,R,P,L,F,w,O,B,I,D){var N=new u(this,c,g,p,T,C,M,A,R,P,L,F,w,O,B,I,D);return this.totalData=this.data.push(N),N},addFrame:function(c,g,p,T,C,M,A,R,P,L){var F=new f(this,c,g,p,T,C,M,A,R,P,L);return this.totalData=this.data.push(F),F},getValue:function(c){c===void 0&&(c=0);var g=null;return this.data&&(g=this.data[c].current),g},hasTarget:function(c){return this.targets&&this.targets.indexOf(c)!==-1},updateTo:function(c,g,p){if(p===void 0&&(p=!1),c!=="texture")for(var T=0;T<this.totalData;T++){var C=this.data[T];C.key===c&&(C.isPlayingForward()||C.isPlayingBackward())&&(C.end=g,p&&(C.start=C.current))}return this},restart:function(){switch(this.state){case a.REMOVED:case a.FINISHED:this.seek(),this.parent.makeActive(this);break;case a.PENDING:case a.PENDING_REMOVE:this.parent.reset(this);break;case a.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(i.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,e.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(c,g,p){if(c===void 0&&(c=0),g===void 0&&(g=16.6),p===void 0&&(p=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;p||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(i.TWEEN_ACTIVE,"onActive");var T=this.paused;if(this.paused=!1,c>0){for(var C=Math.floor(c/g),M=c-C*g,A=0;A<C;A++)this.update(g);M>0&&this.update(M)}return this.paused=T,this.isSeeking=!1,this},initTweenData:function(c){c===void 0&&(c=!1),this.duration=0,this.startDelay=o.MAX_SAFE_INTEGER;for(var g=this.data,p=0;p<this.totalData;p++)g[p].reset(c);this.duration=Math.max(this.duration,.01);var T=this.duration,C=this.completeDelay,M=this.loopCounter,A=this.loopDelay;M>0?this.totalDuration=T+C+(T+A)*M:this.totalDuration=T+C},reset:function(c){return c===void 0&&(c=!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=a.MAX),c||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(i.TWEEN_ACTIVE,"onActive")),this},update:function(c){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.paused||this.isFinished())return!1;if(c*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(c),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(c),!1;this.hasStarted||(this.startDelay-=c,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(i.TWEEN_START,"onStart"),c=0));var g=!1;if(this.isActive())for(var p=this.data,T=0;T<this.totalData;T++)p[T].update(c)&&(g=!0);this.elapsed+=c,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=c,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),g||this.nextState();var C=this.isPendingRemove();return C&&this.persist&&(this.setFinishedState(),C=!1),C},forward:function(c){return this.update(c),this},rewind:function(c){return this.update(-c),this},dispatchEvent:function(c,g){if(!this.isSeeking){if(this.emit(c,this,this.targets),!this.callbacks)return;var p=this.callbacks[g];p&&p.func.apply(this.callbackScope,[this,this.targets].concat(p.params))}},destroy:function(){e.prototype.destroy.call(this),this.targets=null}});r.register("tween",function(c){return this.scene.sys.tweens.add(c)}),s.register("tween",function(c){return this.scene.sys.tweens.create(c)}),h.exports=v},43960:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(72905),l=t(70402),i=t(83419),s=t(842),r=t(44603),o=t(39429),a=t(86353),u=new i({Extends:l,initialize:function(v){l.call(this,v),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?a.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(f){var v=this.parent.create(f);Array.isArray(v)||(v=[v]);for(var c=this.data,g=0;g<v.length;g++){var p=v[g];p.parent=this,c.push(p.reset())}return this.totalData=c.length,this},remove:function(f){return e(this.data,f),f.setRemovedState(),f===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(f){for(var v=this.data,c=0;c<this.totalData;c++)if(v[c].hasTarget(f))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(f){return f.seek(),f.setActiveState(),this},makeActive:function(f){return f.reset(),f.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(s.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 f=this.data,v=this.totalData,c=0;c<v;c++)f[c].reset(!1);this.setCurrentTween(0)},update:function(f){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.isFinished()||this.paused)return!1;if(f*=this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(f),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(f),!1;this.hasStarted||(this.startDelay-=f,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(s.TWEEN_START,"onStart"),f=0));var v=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(f)&&this.nextTween()&&this.nextState(),v=this.isPendingRemove(),v&&this.persist&&(this.setFinishedState(),v=!1)),v},nextTween:function(){return this.currentIndex++,this.currentIndex===this.totalData?!0:(this.setCurrentTween(this.currentIndex),!1)},setCurrentTween:function(f){this.currentIndex=f,this.currentTween=this.data[f],this.currentTween.setActiveState()},dispatchEvent:function(f,v){this.emit(f,this);var c=this.callbacks[v];c&&c.func.apply(this.callbackScope,[this].concat(c.params))},destroy:function(){l.prototype.destroy.call(this),this.currentTween=null}});o.register("tweenchain",function(f){return this.scene.sys.tweens.chain(f)}),r.register("tweenchain",function(f){return this.scene.sys.tweens.create(f)}),h.exports=u},48177:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95042),l=t(45319),i=t(83419),s=t(842),r=new i({Extends:e,initialize:function(a,u,f,v,c,g,p,T,C,M,A,R,P,L,F,w,O){e.call(this,a,u,T,C,M,A,R,P,L,F),this.key=f,this.getActiveValue=g,this.getEndValue=v,this.getStartValue=c,this.ease=p,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=w,this.interpolationData=O},reset:function(o){e.prototype.reset.call(this);var a=this.tween.targets[this.targetIndex],u=this.key;o&&(a[u]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(a[u]=this.getActiveValue(a,u,0))},update:function(o){var a=this.tween,u=a.totalTargets,f=this.targetIndex,v=a.targets[f],c=this.key;if(!v)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=o,this.elapsed<=0&&(this.elapsed=0,o=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(s.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(v,c,v[c],f,u,a),this.end=this.getEndValue(v,c,this.start,f,u,a),this.current=this.start,v[c]=this.start,this.setPlayingForwardState(),!0;var g=this.isPlayingForward(),p=this.isPlayingBackward();if(g||p){var T=this.elapsed,C=this.duration,M=0,A=!1;T+=o,T>=C?(M=T-C,T=C,A=!0):T<0&&(T=0);var R=l(T/C,0,1);this.elapsed=T,this.progress=R,this.previous=this.current,g||(R=1-R);var P=this.ease(R);this.interpolation?this.current=this.interpolation(this.interpolationData,P):this.current=this.start+(this.end-this.start)*P,v[c]=this.current,A&&(g?(a.isNumberTween&&(this.current=this.end,v[c]=this.current),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(M)):(a.isNumberTween&&(this.current=this.start,v[c]=this.current),this.setStateFromStart(M))),this.dispatchEvent(s.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(o,a){var u=this.tween;if(!u.isSeeking){var f=u.targets[this.targetIndex],v=this.key,c=this.current,g=this.previous;u.emit(o,u,v,f,c,g);var p=u.callbacks[a];p&&p.func.apply(u.callbackScope,[u,f,v,c,g].concat(p.params))}},destroy:function(){e.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});h.exports=r},42220:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(95042),l=t(45319),i=t(83419),s=t(842),r=new i({Extends:e,initialize:function(a,u,f,v,c,g,p,T,C,M,A){e.call(this,a,u,c,g,!1,p,T,C,M,A),this.key="texture",this.startTexture=null,this.endTexture=f,this.startFrame=null,this.endFrame=v,this.yoyo=T!==0},reset:function(o){e.prototype.reset.call(this);var a=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=a.texture.key,this.startFrame=a.frame.name),o&&a.setTexture(this.startTexture,this.startFrame)},update:function(o){var a=this.tween,u=this.targetIndex,f=a.targets[u];if(!f)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=o,this.elapsed<=0&&(this.elapsed=0,o=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(s.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&f.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var v=this.isPlayingForward(),c=this.isPlayingBackward();if(v||c){var g=this.elapsed,p=this.duration,T=0,C=!1;g+=o,g>=p?(T=g-p,g=p,C=!0):g<0&&(g=0);var M=l(g/p,0,1);this.elapsed=g,this.progress=M,C&&(v?(f.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(T)):(f.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(T))),this.dispatchEvent(s.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(o,a){var u=this.tween;if(!u.isSeeking){var f=u.targets[this.targetIndex],v=this.key;u.emit(o,u,v,f);var c=u.callbacks[a];c&&c.func.apply(u.callbackScope,[u,f,v].concat(c.params))}},destroy:function(){e.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});h.exports=r},86353:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d={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};h.exports=d},83419:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function d(r){return!!r.get&&typeof r.get=="function"||!!r.set&&typeof r.set=="function"}function t(r,o,a){var u=a?r[o]:Object.getOwnPropertyDescriptor(r,o);return!a&&u.value&&typeof u.value=="object"&&(u=u.value),u&&d(u)?(typeof u.enumerable>"u"&&(u.enumerable=!0),typeof u.configurable>"u"&&(u.configurable=!0),u):!1}function e(r,o){var a=Object.getOwnPropertyDescriptor(r,o);return a?(a.value&&typeof a.value=="object"&&(a=a.value),a.configurable===!1):!1}function l(r,o,a,u){for(var f in o)if(o.hasOwnProperty(f)){var v=t(o,f,a);if(v!==!1){var c=u||r;if(e(c.prototype,f)){if(s.ignoreFinals)continue;throw new Error("cannot override final property '"+f+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(r.prototype,f,v)}else r.prototype[f]=o[f]}}function i(r,o){if(o){Array.isArray(o)||(o=[o]);for(var a=0;a<o.length;a++)l(r,o[a].prototype||o[a])}}function s(r){r||(r={});var o,a;if(r.initialize){if(typeof r.initialize!="function")throw new Error("initialize must be a function");o=r.initialize,delete r.initialize}else if(r.Extends){var u=r.Extends;o=function(){u.apply(this,arguments)}}else o=function(){};r.Extends?(o.prototype=Object.create(r.Extends.prototype),o.prototype.constructor=o,a=r.Extends,delete r.Extends):o.prototype.constructor=o;var f=null;return r.Mixins&&(f=r.Mixins,delete r.Mixins),i(o,f),l(o,r,!0,a),o}s.extend=l,s.mixin=i,s.ignoreFinals=!1,h.exports=s},29747:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(){};h.exports=d},20242:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(){return null};h.exports=d},71146:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s){if(s===void 0&&(s=t),l>0){var r=l-t.length;if(r<=0)return null}if(!Array.isArray(e))return t.indexOf(e)===-1?(t.push(e),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;)t.indexOf(e[o])!==-1&&e.splice(o,1),o--;if(o=e.length,o===0)return null;l>0&&o>r&&(e.splice(r),o=r);for(var a=0;a<o;a++){var u=e[a];t.push(u),i&&i.call(s,u)}return e};h.exports=d},51067:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i,s,r){if(l===void 0&&(l=0),r===void 0&&(r=t),i>0){var o=i-t.length;if(o<=0)return null}if(!Array.isArray(e))return t.indexOf(e)===-1?(t.splice(l,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)t.indexOf(e[a])!==-1&&e.pop(),a--;if(a=e.length,a===0)return null;i>0&&a>o&&(e.splice(o),a=o);for(var u=a-1;u>=0;u--){var f=e[u];t.splice(l,0,f),s&&s.call(r,f)}return e};h.exports=d},66905:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.indexOf(e);return l!==-1&&l<t.length&&(t.splice(l,1),t.push(e)),e};h.exports=d},21612:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(82011),l=function(i,s,r,o,a){o===void 0&&(o=0),a===void 0&&(a=i.length);var u=0;if(e(i,o,a))for(var f=o;f<a;f++){var v=i[f];v[s]===r&&u++}return u};h.exports=l},95428:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i,s=[null];for(i=3;i<arguments.length;i++)s.push(arguments[i]);for(i=0;i<t.length;i++)s[0]=t[i],e.apply(l,s);return t};h.exports=d},36914:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(82011),l=function(i,s,r,o,a){if(o===void 0&&(o=0),a===void 0&&(a=i.length),e(i,o,a)){var u,f=[null];for(u=5;u<arguments.length;u++)f.push(arguments[u]);for(u=o;u<a;u++)f[0]=i[u],s.apply(r,f)}return i};h.exports=l},81957:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(e.length){if(e.length===1)return e[0]}else return NaN;var i=1,s,r;if(l){if(t<e[0][l])return e[0];for(;e[i][l]<t;)i++}else for(;e[i]<t;)i++;return i>e.length&&(i=e.length),l?(s=e[i-1][l],r=e[i][l],r-t<=t-s?e[i]:e[i-1]):(s=e[i-1],r=e[i],r-t<=t-s?r:s)};h.exports=d},43491:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=[]);for(var l=0;l<t.length;l++)Array.isArray(t[l])?d(t[l],e):e.push(t[l]);return e};h.exports=d},46710:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(82011),l=function(i,s,r,o,a){o===void 0&&(o=0),a===void 0&&(a=i.length);var u=[];if(e(i,o,a))for(var f=o;f<a;f++){var v=i[f];(!s||s&&r===void 0&&v.hasOwnProperty(s)||s&&r!==void 0&&v[s]===r)&&u.push(v)}return u};h.exports=l},58731:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(82011),l=function(i,s,r,o,a){o===void 0&&(o=0),a===void 0&&(a=i.length);var u,f;if(o!==-1){if(e(i,o,a)){for(u=o;u<a;u++)if(f=i[u],!s||s&&r===void 0&&f.hasOwnProperty(s)||s&&r!==void 0&&f[s]===r)return f}}else if(e(i,0,a)){for(u=a;u>=0;u--)if(f=i[u],!s||s&&r===void 0&&f.hasOwnProperty(s)||s&&r!==void 0&&f[s]===r)return f}return null};h.exports=l},26546:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){e===void 0&&(e=0),l===void 0&&(l=t.length);var i=e+Math.floor(Math.random()*l);return t[i]===void 0?null:t[i]};h.exports=d},85835:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(e===l)return t;var i=t.indexOf(e),s=t.indexOf(l);if(i<0||s<0)throw new Error("Supplied items must be elements of the same array");return i>s||(t.splice(i,1),s=t.indexOf(l),t.splice(s+1,0,e)),t};h.exports=d},83371:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(e===l)return t;var i=t.indexOf(e),s=t.indexOf(l);if(i<0||s<0)throw new Error("Supplied items must be elements of the same array");return i<s||(t.splice(i,1),s===0?t.unshift(e):t.splice(s,0,e)),t};h.exports=d},70864:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.indexOf(e);if(l>0){var i=t[l-1],s=t.indexOf(i);t[l]=i,t[s]=e}return t};h.exports=d},69693:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=t.indexOf(e);if(i===-1||l<0||l>=t.length)throw new Error("Supplied index out of bounds");return i!==l&&(t.splice(i,1),t.splice(l,0,e)),e};h.exports=d},40853:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.indexOf(e);if(l!==-1&&l<t.length-1){var i=t[l+1],s=t.indexOf(i);t[l]=i,t[s]=e}return t};h.exports=d},20283:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=[],r,o=!1;if((l||i)&&(o=!0,l||(l=""),i||(i="")),e<t)for(r=t;r>=e;r--)o?s.push(l+r.toString()+i):s.push(r);else for(r=t;r<=e;r++)o?s.push(l+r.toString()+i):s.push(r);return s};h.exports=d},593:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(2284),l=function(i,s,r){i===void 0&&(i=0),s===void 0&&(s=null),r===void 0&&(r=1),s===null&&(s=i,i=0);for(var o=[],a=Math.max(e((s-i)/(r||1)),0),u=0;u<a;u++)o.push(i),i+=r;return o};h.exports=l},43886:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/function d(l,i,s){var r=l[i];l[i]=l[s],l[s]=r}function t(l,i){return l<i?-1:l>i?1:0}var e=function(l,i,s,r,o){for(s===void 0&&(s=0),r===void 0&&(r=l.length-1),o===void 0&&(o=t);r>s;){if(r-s>600){var a=r-s+1,u=i-s+1,f=Math.log(a),v=.5*Math.exp(2*f/3),c=.5*Math.sqrt(f*v*(a-v)/a)*(u-a/2<0?-1:1),g=Math.max(s,Math.floor(i-u*v/a+c)),p=Math.min(r,Math.floor(i+(a-u)*v/a+c));e(l,i,g,p,o)}var T=l[i],C=s,M=r;for(d(l,s,i),o(l[r],T)>0&&d(l,s,r);C<M;){for(d(l,C,M),C++,M--;o(l[C],T)<0;)C++;for(;o(l[M],T)>0;)M--}o(l[s],T)===0?d(l,s,M):(M++,d(l,M,r)),M<=i&&(s=M+1),i<=M&&(r=M-1)}};h.exports=e},88492:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35154),l=t(33680),i=function(r,o,a){for(var u=[],f=0;f<r.length;f++)for(var v=0;v<o.length;v++)for(var c=0;c<a;c++)u.push({a:r[f],b:o[v]});return u},s=function(r,o,a){var u=e(a,"max",0),f=e(a,"qty",1),v=e(a,"random",!1),c=e(a,"randomB",!1),g=e(a,"repeat",0),p=e(a,"yoyo",!1),T=[];if(c&&l(o),g===-1)if(u===0)g=0;else{var C=r.length*o.length*f;p&&(C*=2),g=Math.ceil(u/C)}for(var M=0;M<=g;M++){var A=i(r,o,f);v&&l(A),T=T.concat(A),p&&(A.reverse(),T=T.concat(A))}return u&&T.splice(u),T};h.exports=s},72905:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19133),l=function(i,s,r,o){o===void 0&&(o=i);var a;if(!Array.isArray(s))return a=i.indexOf(s),a!==-1?(e(i,a),r&&r.call(o,s),s):null;for(var u=s.length-1,f=[];u>=0;){var v=s[u];a=i.indexOf(v),a!==-1&&(e(i,a),f.push(v),r&&r.call(o,v)),u--}return f};h.exports=l},60248:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19133),l=function(i,s,r,o){if(o===void 0&&(o=i),s<0||s>i.length-1)throw new Error("Index out of bounds");var a=e(i,s);return r&&r.call(o,a),a};h.exports=l},81409:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(82011),l=function(i,s,r,o,a){if(s===void 0&&(s=0),r===void 0&&(r=i.length),a===void 0&&(a=i),e(i,s,r)){var u=r-s,f=i.splice(s,u);if(o)for(var v=0;v<f.length;v++){var c=f[v];o.call(a,c)}return f}else return[]};h.exports=l},31856:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(19133),l=function(i,s,r){s===void 0&&(s=0),r===void 0&&(r=i.length);var o=s+Math.floor(Math.random()*r);return e(i,o)};h.exports=l},42169:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=t.indexOf(e),s=t.indexOf(l);return i!==-1&&s===-1?(t[i]=l,!0):!1};h.exports=d},86003:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=1);for(var l=null,i=0;i<e;i++)l=t.shift(),t.push(l);return l};h.exports=d},49498:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){e===void 0&&(e=1);for(var l=null,i=0;i<e;i++)l=t.pop(),t.unshift(l);return l};h.exports=d},82011:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){var s=t.length;if(e<0||e>=s||e>=l||l>s){if(i)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};h.exports=d},89545:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){var l=t.indexOf(e);return l!==-1&&l>0&&(t.splice(l,1),t.unshift(e)),e};h.exports=d},17810:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(82011),l=function(i,s,r,o,a){if(o===void 0&&(o=0),a===void 0&&(a=i.length),e(i,o,a))for(var u=o;u<a;u++){var f=i[u];f.hasOwnProperty(s)&&(f[s]=r)}return i};h.exports=l},33680:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){for(var e=t.length-1;e>0;e--){var l=Math.floor(Math.random()*(e+1)),i=t[e];t[e]=t[l],t[l]=i}return t};h.exports=d},90126:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e=/\D/g;return t.sort(function(l,i){return parseInt(l.replace(e,""),10)-parseInt(i.replace(e,""),10)}),t};h.exports=d},19133:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){if(!(e>=t.length)){for(var l=t.length-1,i=t[e],s=e;s<l;s++)t[s]=t[s+1];return t.length=l,i}};h.exports=d},19186:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @author Angry Bytes (and contributors)
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(82264);function l(o,a){return String(o).localeCompare(a)}function i(o,a){var u=o.length;if(u<=1)return o;for(var f=new Array(u),v=1;v<u;v*=2){s(o,a,v,f);var c=o;o=f,f=c}return o}function s(o,a,u,f){var v=o.length,c=0,g=u*2,p,T,C,M,A;for(p=0;p<v;p+=g)for(T=p+u,C=T+u,T>v&&(T=v),C>v&&(C=v),M=p,A=T;;)if(M<T&&A<C)a(o[M],o[A])<=0?f[c++]=o[M++]:f[c++]=o[A++];else if(M<T)f[c++]=o[M++];else if(A<C)f[c++]=o[A++];else break}var r=function(o,a){if(a===void 0&&(a=l),!o||o.length<2)return o;if(e.features.stableSort)return o.sort(a);var u=i(o,a);return u!==o&&s(u,null,o.length,o),o};h.exports=r},25630:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(e===l)return t;var i=t.indexOf(e),s=t.indexOf(l);if(i<0||s<0)throw new Error("Supplied items must be elements of the same array");return t[i]=l,t[s]=e,t};h.exports=d},37105:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Matrix:t(54915),Add:t(71146),AddAt:t(51067),BringToTop:t(66905),CountAllMatching:t(21612),Each:t(95428),EachInRange:t(36914),FindClosestInSorted:t(81957),Flatten:t(43491),GetAll:t(46710),GetFirst:t(58731),GetRandom:t(26546),MoveDown:t(70864),MoveTo:t(69693),MoveUp:t(40853),MoveAbove:t(85835),MoveBelow:t(83371),NumberArray:t(20283),NumberArrayStep:t(593),QuickSelect:t(43886),Range:t(88492),Remove:t(72905),RemoveAt:t(60248),RemoveBetween:t(81409),RemoveRandomElement:t(31856),Replace:t(42169),RotateLeft:t(86003),RotateRight:t(49498),SafeRange:t(82011),SendToBack:t(89545),SetAll:t(17810),Shuffle:t(33680),SortByDigits:t(90126),SpliceOne:t(19133),StableSort:t(19186),Swap:t(25630)}},86922:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,l=1;l<t.length;l++)if(t[l].length!==e)return!1;return!0};h.exports=d},63362:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(41836),l=t(86922),i=function(s){var r="";if(!l(s))return r;for(var o=0;o<s.length;o++){for(var a=0;a<s[o].length;a++){var u=s[o][a].toString();u!=="undefined"?r+=e(u,2):r+="?",a<s[o].length-1&&(r+=" |")}if(o<s.length-1){r+=`
|
||
`;for(var f=0;f<s[o].length;f++)r+="---",f<s[o].length-1&&(r+="+");r+=`
|
||
`}}return r};h.exports=i},92598:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.reverse()};h.exports=d},21224:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t};h.exports=d},98717:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37829),l=function(i){return e(i,180)};h.exports=l},44657:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37829),l=function(i,s){s===void 0&&(s=1);for(var r=0;r<s;r++)i=e(i,90);return i};h.exports=l},37829:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(86922),l=t(2429),i=function(s,r){if(r===void 0&&(r=90),!e(s))return null;if(typeof r!="string"&&(r=(r%360+360)%360),r===90||r===-270||r==="rotateLeft")s=l(s),s.reverse();else if(r===-90||r===270||r==="rotateRight")s.reverse(),s=l(s);else if(Math.abs(r)===180||r==="rotate180"){for(var o=0;o<s.length;o++)s[o].reverse();s.reverse()}return s};h.exports=i},92632:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(37829),l=function(i,s){s===void 0&&(s=1);for(var r=0;r<s;r++)i=e(i,-90);return i};h.exports=l},69512:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(86003),l=t(49498),i=function(s,r,o){if(r===void 0&&(r=0),o===void 0&&(o=0),o!==0&&(o<0?e(s,Math.abs(o)):l(s,o)),r!==0)for(var a=0;a<s.length;a++){var u=s[a];r<0?e(u,Math.abs(r)):l(u,r)}return s};h.exports=i},2429:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){for(var e=t.length,l=t[0].length,i=new Array(l),s=0;s<l;s++){i[s]=new Array(e);for(var r=e-1;r>-1;r--)i[s][r]=t[r][s]}return i};h.exports=d},54915:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(e,l){for(var i=new Uint8Array(e),s=i.length,r=l?"data:"+l+";base64,":"",o=0;o<s;o+=3)r+=d[i[o]>>2],r+=d[(i[o]&3)<<4|i[o+1]>>4],r+=d[(i[o+1]&15)<<2|i[o+2]>>6],r+=d[i[o+2]&63];return s%3===2?r=r.substring(0,r.length-1)+"=":s%3===1&&(r=r.substring(0,r.length-2)+"=="),r};h.exports=t},53134:h=>{/**
|
||
* @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/for(var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),e=0;e<d.length;e++)t[d.charCodeAt(e)]=e;var l=function(i){i=i.substr(i.indexOf(",")+1);var s=i.length,r=s*.75,o=0,a,u,f,v;i[s-1]==="="&&(r--,i[s-2]==="="&&r--);for(var c=new ArrayBuffer(r),g=new Uint8Array(c),p=0;p<s;p+=4)a=t[i.charCodeAt(p)],u=t[i.charCodeAt(p+1)],f=t[i.charCodeAt(p+2)],v=t[i.charCodeAt(p+3)],g[o++]=a<<2|u>>4,g[o++]=(u&15)<<4|f>>2,g[o++]=(f&3)<<6|v&63;return c};h.exports=l},65839:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}},91799:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}},41786:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e={};for(var l in t)Array.isArray(t[l])?e[l]=t[l].slice(0):e[l]=t[l];return e};h.exports=d},62644:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){var e,l,i;if(typeof t!="object"||t===null)return t;e=Array.isArray(t)?[]:{};for(i in t)l=t[i],e[i]=d(l);return e};h.exports=d},79291:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(41212),l=function(){var i,s,r,o,a,u,f=arguments[0]||{},v=1,c=arguments.length,g=!1;for(typeof f=="boolean"&&(g=f,f=arguments[1]||{},v=2),c===v&&(f=this,--v);v<c;v++)if((i=arguments[v])!=null)for(s in i)r=f[s],o=i[s],f!==o&&(g&&o&&(e(o)||(a=Array.isArray(o)))?(a?(a=!1,u=r&&Array.isArray(r)?r:[]):u=r&&e(r)?r:{},f[s]=l(g,u,o)):o!==void 0&&(f[s]=o));return f};h.exports=l},23568:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(75508),l=t(35154),i=function(s,r,o){var a=l(s,r,null);if(a===null)return o;if(Array.isArray(a))return e.RND.pick(a);if(typeof a=="object"){if(a.hasOwnProperty("randInt"))return e.RND.integerInRange(a.randInt[0],a.randInt[1]);if(a.hasOwnProperty("randFloat"))return e.RND.realInRange(a.randFloat[0],a.randFloat[1])}else if(typeof a=="function")return a(r);return a};h.exports=i},95540:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){var i=typeof t;return!t||i==="number"||i==="string"?l:t.hasOwnProperty(e)&&t[e]!==void 0?t[e]:l};h.exports=d},82840:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(35154),l=t(45319),i=function(s,r,o,a,u){u===void 0&&(u=o);var f=e(s,r,u);return l(f,o,a)};h.exports=i},35154:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){if(!t&&!i||typeof t=="number")return l;if(t&&t.hasOwnProperty(e))return t[e];if(i&&i.hasOwnProperty(e))return i[e];if(e.indexOf(".")!==-1){for(var s=e.split("."),r=t,o=i,a=l,u=l,f=!0,v=!0,c=0;c<s.length;c++)r&&r.hasOwnProperty(s[c])?(a=r[s[c]],r=r[s[c]]):f=!1,o&&o.hasOwnProperty(s[c])?(u=o[s[c]],o=o[s[c]]):v=!1;return f?a:v?u:l}else return l};h.exports=d},69036:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){for(var l=0;l<e.length;l++)if(!t.hasOwnProperty(e[l]))return!1;return!0};h.exports=d},1985:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){for(var l=0;l<e.length;l++)if(t.hasOwnProperty(e[l]))return!0;return!1};h.exports=d},97022:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.hasOwnProperty(e)};h.exports=d},41212:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=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};h.exports=d},46975:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(41786),l=function(i,s){var r=e(i);for(var o in s)r.hasOwnProperty(o)||(r[o]=s[o]);return r};h.exports=l},269:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(41786),l=function(i,s){var r=e(i);for(var o in s)r.hasOwnProperty(o)&&(r[o]=s[o]);return r};h.exports=l},18254:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var e=t(97022),l=function(i,s){for(var r={},o=0;o<s.length;o++){var a=s[o];e(i,a)&&(r[a]=i[a])}return r};h.exports=l},61622:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(e))return t[e]=l,!0;if(e.indexOf(".")!==-1){for(var i=e.split("."),s=t,r=t,o=0;o<i.length;o++)if(s.hasOwnProperty(i[o]))r=s,s=s[i[o]];else return!1;return r[i[i.length-1]]=l,!0}return!1};h.exports=d},1183:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.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:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return t.replace(/%([0-9]+)/g,function(l,i){return e[Number(i)-1]})};h.exports=d},41836:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e,l,i){e===void 0&&(e=0),l===void 0&&(l=" "),i===void 0&&(i=3),t=t.toString();var s=0;if(e+1>=t.length)switch(i){case 1:t=new Array(e+1-t.length).join(l)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2),o=s-r;t=new Array(o+1).join(l)+t+new Array(r+1).join(l);break;default:t=t+new Array(e+1-t.length).join(l);break}return t};h.exports=d},33628:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t,e){return e===0?t.slice(1):t.slice(0,e)+t.slice(e+1)};h.exports=d},27671:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t.split("").reverse().join("")};h.exports=d},45650:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=Math.random()*16|0,l=t==="x"?e:e&3|8;return l.toString(16)})};h.exports=d},35355:h=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/var d=function(t){return t&&t[0].toUpperCase()+t.slice(1)};h.exports=d},31749:(h,d,t)=>{/**
|
||
* @author Richard Davey <rich@phaser.io>
|
||
* @copyright 2013-2026 Phaser Studio Inc.
|
||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||
*/h.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},m={};function S(h){var d=m[h];if(d!==void 0)return d.exports;var t=m[h]={exports:{}};return n[h](t,t.exports,S),t.exports}S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var x=S(85454);return x})())})(fs);var Re=fs.exports;if(typeof window<"u"&&window.Phaser){let E=window.require;window.require=y=>{if(E)return E(y);if(y==="Phaser")return window.Phaser}}var ds=class{constructor(){$(this,"entries",{});$(this,"size",0)}add(E){let y=this.entries[E];return this.entries[E]=!0,y?!1:(this.size++,!0)}addAll(E){let y=this.size;for(var n=0,m=E.length;n<m;n++)this.add(E[n]);return y!=this.size}contains(E){return this.entries[E]}clear(){this.entries={},this.size=0}},oe,It=(oe=class{constructor(y=0,n=0,m=0,S=0){this.r=y,this.g=n,this.b=m,this.a=S}set(y,n,m,S){return this.r=y,this.g=n,this.b=m,this.a=S,this.clamp()}setFromColor(y){return this.r=y.r,this.g=y.g,this.b=y.b,this.a=y.a,this}setFromString(y){return y=y.charAt(0)=="#"?y.substr(1):y,this.r=parseInt(y.substr(0,2),16)/255,this.g=parseInt(y.substr(2,2),16)/255,this.b=parseInt(y.substr(4,2),16)/255,this.a=y.length!=8?1:parseInt(y.substr(6,2),16)/255,this}add(y,n,m,S){return this.r+=y,this.g+=n,this.b+=m,this.a+=S,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(y,n){y.r=((n&4278190080)>>>24)/255,y.g=((n&16711680)>>>16)/255,y.b=((n&65280)>>>8)/255,y.a=(n&255)/255}static rgb888ToColor(y,n){y.r=((n&16711680)>>>16)/255,y.g=((n&65280)>>>8)/255,y.b=(n&255)/255}toRgb888(){const y=n=>("0"+(n*255).toString(16)).slice(-2);return+("0x"+y(this.r)+y(this.g)+y(this.b))}static fromString(y,n=new oe){return n.setFromString(y)}},$(oe,"WHITE",new oe(1,1,1,1)),$(oe,"RED",new oe(1,0,0,1)),$(oe,"GREEN",new oe(0,1,0,1)),$(oe,"BLUE",new oe(0,0,1,1)),$(oe,"MAGENTA",new oe(1,0,1,1)),oe),kt,ft=(kt=class{static clamp(y,n,m){return y<n?n:y>m?m:y}static cosDeg(y){return Math.cos(y*kt.degRad)}static sinDeg(y){return Math.sin(y*kt.degRad)}static atan2Deg(y,n){return Math.atan2(y,n)*kt.degRad}static signum(y){return y>0?1:y<0?-1:0}static toInt(y){return y>0?Math.floor(y):Math.ceil(y)}static cbrt(y){let n=Math.pow(Math.abs(y),.3333333333333333);return y<0?-n:n}static randomTriangular(y,n){return kt.randomTriangularWith(y,n,(y+n)*.5)}static randomTriangularWith(y,n,m){let S=Math.random(),x=n-y;return S<=(m-y)/x?y+Math.sqrt(S*x*(m-y)):n-Math.sqrt((1-S)*x*(n-m))}static isPowerOfTwo(y){return y&&(y&y-1)===0}},$(kt,"PI",3.1415927),$(kt,"PI2",kt.PI*2),$(kt,"invPI2",1/kt.PI2),$(kt,"radiansToDegrees",180/kt.PI),$(kt,"radDeg",kt.radiansToDegrees),$(kt,"degreesToRadians",kt.PI/180),$(kt,"degRad",kt.degreesToRadians),kt),ye,ut=(ye=class{static arrayCopy(y,n,m,S,x){for(let h=n,d=S;h<n+x;h++,d++)m[d]=y[h]}static arrayFill(y,n,m,S){for(let x=n;x<m;x++)y[x]=S}static setArraySize(y,n,m=0){let S=y.length;if(S==n)return y;if(y.length=n,S<n)for(let x=S;x<n;x++)y[x]=m;return y}static ensureArrayCapacity(y,n,m=0){return y.length>=n?y:ye.setArraySize(y,n,m)}static newArray(y,n){let m=new Array(y);for(let S=0;S<y;S++)m[S]=n;return m}static newFloatArray(y){if(ye.SUPPORTS_TYPED_ARRAYS)return new Float32Array(y);{let n=new Array(y);for(let m=0;m<n.length;m++)n[m]=0;return n}}static newShortArray(y){if(ye.SUPPORTS_TYPED_ARRAYS)return new Int16Array(y);{let n=new Array(y);for(let m=0;m<n.length;m++)n[m]=0;return n}}static toFloatArray(y){return ye.SUPPORTS_TYPED_ARRAYS?new Float32Array(y):y}static toSinglePrecision(y){return ye.SUPPORTS_TYPED_ARRAYS?Math.fround(y):y}static webkit602BugfixHelper(y,n){}static contains(y,n,m=!0){for(var S=0;S<y.length;S++)if(y[S]==n)return!0;return!1}static enumValue(y,n){return y[n[0].toUpperCase()+n.slice(1)]}},$(ye,"SUPPORTS_TYPED_ARRAYS",typeof Float32Array<"u"),ye),oi=class{constructor(E){$(this,"items",new Array);$(this,"instantiator");this.instantiator=E}obtain(){return this.items.length>0?this.items.pop():this.instantiator()}free(E){E.reset&&E.reset(),this.items.push(E)}freeAll(E){for(let y=0;y<E.length;y++)this.free(E[y])}clear(){this.items.length=0}},qe=class{constructor(E=0,y=0){this.x=E,this.y=y}set(E,y){return this.x=E,this.y=y,this}length(){let E=this.x,y=this.y;return Math.sqrt(E*E+y*y)}normalize(){let E=this.length();return E!=0&&(this.x/=E,this.y/=E),this}},vs=class{constructor(E){$(this,"name");if(!E)throw new Error("name cannot be null.");this.name=E}},We,Ne=(We=class extends vs{constructor(n){super(n);$(this,"id",We.nextID++);$(this,"bones",null);$(this,"vertices",[]);$(this,"worldVerticesLength",0);$(this,"timelineAttachment",this)}computeWorldVertices(n,m,S,x,h,d){S=h+(S>>1)*d;let t=n.bone.skeleton,e=n.deform,l=this.vertices,i=this.bones;if(!i){e.length>0&&(l=e);let a=n.bone,u=a.worldX,f=a.worldY,v=a.a,c=a.b,g=a.c,p=a.d;for(let T=m,C=h;C<S;T+=2,C+=d){let M=l[T],A=l[T+1];x[C]=M*v+A*c+u,x[C+1]=M*g+A*p+f}return}let s=0,r=0;for(let a=0;a<m;a+=2){let u=i[s];s+=u+1,r+=u}let o=t.bones;if(e.length==0)for(let a=h,u=r*3;a<S;a+=d){let f=0,v=0,c=i[s++];for(c+=s;s<c;s++,u+=3){let g=o[i[s]],p=l[u],T=l[u+1],C=l[u+2];f+=(p*g.a+T*g.b+g.worldX)*C,v+=(p*g.c+T*g.d+g.worldY)*C}x[a]=f,x[a+1]=v}else{let a=e;for(let u=h,f=r*3,v=r<<1;u<S;u+=d){let c=0,g=0,p=i[s++];for(p+=s;s<p;s++,f+=3,v+=2){let T=o[i[s]],C=l[f]+a[v],M=l[f+1]+a[v+1],A=l[f+2];c+=(C*T.a+M*T.b+T.worldX)*A,g+=(C*T.c+M*T.d+T.worldY)*A}x[u]=c,x[u+1]=g}}}copyTo(n){this.bones?(n.bones=new Array(this.bones.length),ut.arrayCopy(this.bones,0,n.bones,0,this.bones.length)):n.bones=null,this.vertices&&(n.vertices=ut.newFloatArray(this.vertices.length),ut.arrayCopy(this.vertices,0,n.vertices,0,this.vertices.length)),n.worldVerticesLength=this.worldVerticesLength,n.timelineAttachment=this.timelineAttachment}},$(We,"nextID",0),We),Be,cs=(Be=class{constructor(y){$(this,"id",Be.nextID());$(this,"regions");$(this,"start",0);$(this,"digits",0);$(this,"setupIndex",0);this.regions=new Array(y)}copy(){let y=new Be(this.regions.length);return ut.arrayCopy(this.regions,0,y.regions,0,this.regions.length),y.start=this.start,y.digits=this.digits,y.setupIndex=this.setupIndex,y}apply(y,n){let m=y.sequenceIndex;m==-1&&(m=this.setupIndex),m>=this.regions.length&&(m=this.regions.length-1);let S=this.regions[m];n.region!=S&&(n.region=S,n.updateRegion())}getPath(y,n){let m=y,S=(this.start+n).toString();for(let x=this.digits-S.length;x>0;x--)m+="0";return m+=S,m}static nextID(){return Be._nextID++}},$(Be,"_nextID",0),Be),ps=(E=>(E[E.hold=0]="hold",E[E.once=1]="once",E[E.loop=2]="loop",E[E.pingpong=3]="pingpong",E[E.onceReverse=4]="onceReverse",E[E.loopReverse=5]="loopReverse",E[E.pingpongReverse=6]="pingpongReverse",E))(ps||{}),ms=[0,1,2,3,4,5,6],Di=class{constructor(E,y,n){$(this,"name");$(this,"timelines",[]);$(this,"timelineIds",new ds);$(this,"duration");if(!E)throw new Error("name cannot be null.");this.name=E,this.setTimelines(y),this.duration=n}setTimelines(E){if(!E)throw new Error("timelines cannot be null.");this.timelines=E,this.timelineIds.clear();for(var y=0;y<E.length;y++)this.timelineIds.addAll(E[y].getPropertyIds())}hasTimeline(E){for(let y=0;y<E.length;y++)if(this.timelineIds.contains(E[y]))return!0;return!1}apply(E,y,n,m,S,x,h,d){if(!E)throw new Error("skeleton cannot be null.");m&&this.duration!=0&&(n%=this.duration,y>0&&(y%=this.duration));let t=this.timelines;for(let e=0,l=t.length;e<l;e++)t[e].apply(E,y,n,S,x,h,d)}},Ut={rotate:0,x:1,y:2,scaleX:3,scaleY:4,shearX:5,shearY:6,inherit:7,rgb:8,alpha:9,rgb2:10,attachment:11,deform:12,event:13,drawOrder:14,ikConstraint:15,transformConstraint:16,pathConstraintPosition:17,pathConstraintSpacing:18,pathConstraintMix:19,physicsConstraintInertia:20,physicsConstraintStrength:21,physicsConstraintDamping:22,physicsConstraintMass:23,physicsConstraintWind:24,physicsConstraintGravity:25,physicsConstraintMix:26,physicsConstraintReset:27,sequence:28},Jt=class{constructor(E,y){$(this,"propertyIds");$(this,"frames");this.propertyIds=y,this.frames=ut.newFloatArray(E*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(E,y){let n=E.length;for(let m=1;m<n;m++)if(E[m]>y)return m-1;return n-1}static search(E,y,n){let m=E.length;for(let S=n;S<m;S+=n)if(E[S]>y)return S-n;return m-n}},Pe=class extends Jt{constructor(y,n,m){super(y,m);$(this,"curves");this.curves=ut.newFloatArray(y+n*18),this.curves[y-1]=1}setLinear(y){this.curves[y]=0}setStepped(y){this.curves[y]=1}shrink(y){let n=this.getFrameCount()+y*18;if(this.curves.length>n){let m=ut.newFloatArray(n);ut.arrayCopy(this.curves,0,m,0,n),this.curves=m}}setBezier(y,n,m,S,x,h,d,t,e,l,i){let s=this.curves,r=this.getFrameCount()+y*18;m==0&&(s[n]=2+r);let o=(S-h*2+t)*.03,a=(x-d*2+e)*.03,u=((h-t)*3-S+l)*.006,f=((d-e)*3-x+i)*.006,v=o*2+u,c=a*2+f,g=(h-S)*.3+o+u*.16666667,p=(d-x)*.3+a+f*.16666667,T=S+g,C=x+p;for(let M=r+18;r<M;r+=2)s[r]=T,s[r+1]=C,g+=v,p+=c,v+=u,c+=f,T+=g,C+=p}getBezierValue(y,n,m,S){let x=this.curves;if(x[S]>y){let e=this.frames[n],l=this.frames[n+m];return l+(y-e)/(x[S]-e)*(x[S+1]-l)}let h=S+18;for(S+=2;S<h;S+=2)if(x[S]>=y){let e=x[S-2],l=x[S-1];return l+(y-e)/(x[S]-e)*(x[S+1]-l)}n+=this.getFrameEntries();let d=x[h-2],t=x[h-1];return t+(y-d)/(this.frames[n]-d)*(this.frames[n+m]-t)}},Te=class extends Pe{constructor(E,y,n){super(E,y,[n])}getFrameEntries(){return 2}setFrame(E,y,n){E<<=1,this.frames[E]=y,this.frames[E+1]=n}getCurveValue(E){let y=this.frames,n=y.length-2;for(let S=2;S<=n;S+=2)if(y[S]>E){n=S-2;break}let m=this.curves[n>>1];switch(m){case 0:let S=y[n],x=y[n+1];return x+(E-S)/(y[n+2]-S)*(y[n+2+1]-x);case 1:return y[n+1]}return this.getBezierValue(E,n,1,m-2)}getRelativeValue(E,y,n,m,S){if(E<this.frames[0]){switch(n){case 0:return S;case 1:return m+(S-m)*y}return m}let x=this.getCurveValue(E);switch(n){case 0:return S+x*y;case 1:case 2:x+=S-m}return m+x*y}getAbsoluteValue(E,y,n,m,S){if(E<this.frames[0]){switch(n){case 0:return S;case 1:return m+(S-m)*y}return m}let x=this.getCurveValue(E);return n==0?S+(x-S)*y:m+(x-m)*y}getAbsoluteValue2(E,y,n,m,S,x){if(E<this.frames[0]){switch(n){case 0:return S;case 1:return m+(S-m)*y}return m}return n==0?S+(x-S)*y:m+(x-m)*y}getScaleValue(E,y,n,m,S,x){const h=this.frames;if(E<h[0]){switch(n){case 0:return x;case 1:return S+(x-S)*y}return S}let d=this.getCurveValue(E)*x;if(y==1)return n==3?S+d-x:d;if(m==1)switch(n){case 0:return x+(Math.abs(d)*ft.signum(x)-x)*y;case 1:case 2:return S+(Math.abs(d)*ft.signum(S)-S)*y}else{let t=0;switch(n){case 0:return t=Math.abs(x)*ft.signum(d),t+(d-t)*y;case 1:case 2:return t=Math.abs(S)*ft.signum(d),t+(d-t)*y}}return S+(d-x)*y}},Bi=class extends Pe{constructor(E,y,n,m){super(E,y,[n,m])}getFrameEntries(){return 3}setFrame(E,y,n,m){E*=3,this.frames[E]=y,this.frames[E+1]=n,this.frames[E+2]=m}},hi=class extends Te{constructor(y,n,m){super(y,n,Ut.rotate+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];t.active&&(t.rotation=this.getRelativeValue(m,x,h,t.rotation,t.data.rotation))}},gs=class extends Bi{constructor(y,n,m){super(y,n,Ut.x+"|"+m,Ut.y+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];if(!t.active)return;let e=this.frames;if(m<e[0]){switch(h){case 0:t.x=t.data.x,t.y=t.data.y;return;case 1:t.x+=(t.data.x-t.x)*x,t.y+=(t.data.y-t.y)*x}return}let l=0,i=0,s=Jt.search(e,m,3),r=this.curves[s/3];switch(r){case 0:let o=e[s];l=e[s+1],i=e[s+2];let a=(m-o)/(e[s+3]-o);l+=(e[s+3+1]-l)*a,i+=(e[s+3+2]-i)*a;break;case 1:l=e[s+1],i=e[s+2];break;default:l=this.getBezierValue(m,s,1,r-2),i=this.getBezierValue(m,s,2,r+18-2)}switch(h){case 0:t.x=t.data.x+l*x,t.y=t.data.y+i*x;break;case 1:case 2:t.x+=(t.data.x+l-t.x)*x,t.y+=(t.data.y+i-t.y)*x;break;case 3:t.x+=l*x,t.y+=i*x}}},xs=class extends Te{constructor(y,n,m){super(y,n,Ut.x+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];t.active&&(t.x=this.getRelativeValue(m,x,h,t.x,t.data.x))}},ys=class extends Te{constructor(y,n,m){super(y,n,Ut.y+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];t.active&&(t.y=this.getRelativeValue(m,x,h,t.y,t.data.y))}},Ts=class extends Bi{constructor(y,n,m){super(y,n,Ut.scaleX+"|"+m,Ut.scaleY+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];if(!t.active)return;let e=this.frames;if(m<e[0]){switch(h){case 0:t.scaleX=t.data.scaleX,t.scaleY=t.data.scaleY;return;case 1:t.scaleX+=(t.data.scaleX-t.scaleX)*x,t.scaleY+=(t.data.scaleY-t.scaleY)*x}return}let l,i,s=Jt.search(e,m,3),r=this.curves[s/3];switch(r){case 0:let o=e[s];l=e[s+1],i=e[s+2];let a=(m-o)/(e[s+3]-o);l+=(e[s+3+1]-l)*a,i+=(e[s+3+2]-i)*a;break;case 1:l=e[s+1],i=e[s+2];break;default:l=this.getBezierValue(m,s,1,r-2),i=this.getBezierValue(m,s,2,r+18-2)}if(l*=t.data.scaleX,i*=t.data.scaleY,x==1)h==3?(t.scaleX+=l-t.data.scaleX,t.scaleY+=i-t.data.scaleY):(t.scaleX=l,t.scaleY=i);else{let o=0,a=0;if(d==1)switch(h){case 0:o=t.data.scaleX,a=t.data.scaleY,t.scaleX=o+(Math.abs(l)*ft.signum(o)-o)*x,t.scaleY=a+(Math.abs(i)*ft.signum(a)-a)*x;break;case 1:case 2:o=t.scaleX,a=t.scaleY,t.scaleX=o+(Math.abs(l)*ft.signum(o)-o)*x,t.scaleY=a+(Math.abs(i)*ft.signum(a)-a)*x;break;case 3:t.scaleX+=(l-t.data.scaleX)*x,t.scaleY+=(i-t.data.scaleY)*x}else switch(h){case 0:o=Math.abs(t.data.scaleX)*ft.signum(l),a=Math.abs(t.data.scaleY)*ft.signum(i),t.scaleX=o+(l-o)*x,t.scaleY=a+(i-a)*x;break;case 1:case 2:o=Math.abs(t.scaleX)*ft.signum(l),a=Math.abs(t.scaleY)*ft.signum(i),t.scaleX=o+(l-o)*x,t.scaleY=a+(i-a)*x;break;case 3:t.scaleX+=(l-t.data.scaleX)*x,t.scaleY+=(i-t.data.scaleY)*x}}}},Ss=class extends Te{constructor(y,n,m){super(y,n,Ut.scaleX+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];t.active&&(t.scaleX=this.getScaleValue(m,x,h,d,t.scaleX,t.data.scaleX))}},Cs=class extends Te{constructor(y,n,m){super(y,n,Ut.scaleY+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];t.active&&(t.scaleY=this.getScaleValue(m,x,h,d,t.scaleY,t.data.scaleY))}},Es=class extends Bi{constructor(y,n,m){super(y,n,Ut.shearX+"|"+m,Ut.shearY+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];if(!t.active)return;let e=this.frames;if(m<e[0]){switch(h){case 0:t.shearX=t.data.shearX,t.shearY=t.data.shearY;return;case 1:t.shearX+=(t.data.shearX-t.shearX)*x,t.shearY+=(t.data.shearY-t.shearY)*x}return}let l=0,i=0,s=Jt.search(e,m,3),r=this.curves[s/3];switch(r){case 0:let o=e[s];l=e[s+1],i=e[s+2];let a=(m-o)/(e[s+3]-o);l+=(e[s+3+1]-l)*a,i+=(e[s+3+2]-i)*a;break;case 1:l=e[s+1],i=e[s+2];break;default:l=this.getBezierValue(m,s,1,r-2),i=this.getBezierValue(m,s,2,r+18-2)}switch(h){case 0:t.shearX=t.data.shearX+l*x,t.shearY=t.data.shearY+i*x;break;case 1:case 2:t.shearX+=(t.data.shearX+l-t.shearX)*x,t.shearY+=(t.data.shearY+i-t.shearY)*x;break;case 3:t.shearX+=l*x,t.shearY+=i*x}}},As=class extends Te{constructor(y,n,m){super(y,n,Ut.shearX+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];t.active&&(t.shearX=this.getRelativeValue(m,x,h,t.shearX,t.data.shearX))}},Ms=class extends Te{constructor(y,n,m){super(y,n,Ut.shearY+"|"+m);$(this,"boneIndex",0);this.boneIndex=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];t.active&&(t.shearY=this.getRelativeValue(m,x,h,t.shearY,t.data.shearY))}},Rs=class extends Jt{constructor(y,n){super(y,[Ut.inherit+"|"+n]);$(this,"boneIndex",0);this.boneIndex=n}getFrameEntries(){return 2}setFrame(y,n,m){y*=2,this.frames[y]=n,this.frames[y+1]=m}apply(y,n,m,S,x,h,d){let t=y.bones[this.boneIndex];if(!t.active)return;if(d==1){h==0&&(t.inherit=t.data.inherit);return}let e=this.frames;if(m<e[0]){(h==0||h==1)&&(t.inherit=t.data.inherit);return}t.inherit=this.frames[Jt.search(e,m,2)+1]}},Ps=class extends Pe{constructor(y,n,m){super(y,n,[Ut.rgb+"|"+m,Ut.alpha+"|"+m]);$(this,"slotIndex",0);this.slotIndex=m}getFrameEntries(){return 5}setFrame(y,n,m,S,x,h){y*=5,this.frames[y]=n,this.frames[y+1]=m,this.frames[y+2]=S,this.frames[y+3]=x,this.frames[y+4]=h}apply(y,n,m,S,x,h,d){let t=y.slots[this.slotIndex];if(!t.bone.active)return;let e=this.frames,l=t.color;if(m<e[0]){let f=t.data.color;switch(h){case 0:l.setFromColor(f);return;case 1:l.add((f.r-l.r)*x,(f.g-l.g)*x,(f.b-l.b)*x,(f.a-l.a)*x)}return}let i=0,s=0,r=0,o=0,a=Jt.search(e,m,5),u=this.curves[a/5];switch(u){case 0:let f=e[a];i=e[a+1],s=e[a+2],r=e[a+3],o=e[a+4];let v=(m-f)/(e[a+5]-f);i+=(e[a+5+1]-i)*v,s+=(e[a+5+2]-s)*v,r+=(e[a+5+3]-r)*v,o+=(e[a+5+4]-o)*v;break;case 1:i=e[a+1],s=e[a+2],r=e[a+3],o=e[a+4];break;default:i=this.getBezierValue(m,a,1,u-2),s=this.getBezierValue(m,a,2,u+18-2),r=this.getBezierValue(m,a,3,u+18*2-2),o=this.getBezierValue(m,a,4,u+18*3-2)}x==1?l.set(i,s,r,o):(h==0&&l.setFromColor(t.data.color),l.add((i-l.r)*x,(s-l.g)*x,(r-l.b)*x,(o-l.a)*x))}},Ls=class extends Pe{constructor(y,n,m){super(y,n,[Ut.rgb+"|"+m]);$(this,"slotIndex",0);this.slotIndex=m}getFrameEntries(){return 4}setFrame(y,n,m,S,x){y<<=2,this.frames[y]=n,this.frames[y+1]=m,this.frames[y+2]=S,this.frames[y+3]=x}apply(y,n,m,S,x,h,d){let t=y.slots[this.slotIndex];if(!t.bone.active)return;let e=this.frames,l=t.color;if(m<e[0]){let u=t.data.color;switch(h){case 0:l.r=u.r,l.g=u.g,l.b=u.b;return;case 1:l.r+=(u.r-l.r)*x,l.g+=(u.g-l.g)*x,l.b+=(u.b-l.b)*x}return}let i=0,s=0,r=0,o=Jt.search(e,m,4),a=this.curves[o>>2];switch(a){case 0:let u=e[o];i=e[o+1],s=e[o+2],r=e[o+3];let f=(m-u)/(e[o+4]-u);i+=(e[o+4+1]-i)*f,s+=(e[o+4+2]-s)*f,r+=(e[o+4+3]-r)*f;break;case 1:i=e[o+1],s=e[o+2],r=e[o+3];break;default:i=this.getBezierValue(m,o,1,a-2),s=this.getBezierValue(m,o,2,a+18-2),r=this.getBezierValue(m,o,3,a+18*2-2)}if(x==1)l.r=i,l.g=s,l.b=r;else{if(h==0){let u=t.data.color;l.r=u.r,l.g=u.g,l.b=u.b}l.r+=(i-l.r)*x,l.g+=(s-l.g)*x,l.b+=(r-l.b)*x}}},Fs=class extends Te{constructor(y,n,m){super(y,n,Ut.alpha+"|"+m);$(this,"slotIndex",0);this.slotIndex=m}apply(y,n,m,S,x,h,d){let t=y.slots[this.slotIndex];if(!t.bone.active)return;let e=t.color;if(m<this.frames[0]){let i=t.data.color;switch(h){case 0:e.a=i.a;return;case 1:e.a+=(i.a-e.a)*x}return}let l=this.getCurveValue(m);x==1?e.a=l:(h==0&&(e.a=t.data.color.a),e.a+=(l-e.a)*x)}},Os=class extends Pe{constructor(y,n,m){super(y,n,[Ut.rgb+"|"+m,Ut.alpha+"|"+m,Ut.rgb2+"|"+m]);$(this,"slotIndex",0);this.slotIndex=m}getFrameEntries(){return 8}setFrame(y,n,m,S,x,h,d,t,e){y<<=3,this.frames[y]=n,this.frames[y+1]=m,this.frames[y+2]=S,this.frames[y+3]=x,this.frames[y+4]=h,this.frames[y+5]=d,this.frames[y+6]=t,this.frames[y+7]=e}apply(y,n,m,S,x,h,d){let t=y.slots[this.slotIndex];if(!t.bone.active)return;let e=this.frames,l=t.color,i=t.darkColor;if(m<e[0]){let p=t.data.color,T=t.data.darkColor;switch(h){case 0:l.setFromColor(p),i.r=T.r,i.g=T.g,i.b=T.b;return;case 1:l.add((p.r-l.r)*x,(p.g-l.g)*x,(p.b-l.b)*x,(p.a-l.a)*x),i.r+=(T.r-i.r)*x,i.g+=(T.g-i.g)*x,i.b+=(T.b-i.b)*x}return}let s=0,r=0,o=0,a=0,u=0,f=0,v=0,c=Jt.search(e,m,8),g=this.curves[c>>3];switch(g){case 0:let p=e[c];s=e[c+1],r=e[c+2],o=e[c+3],a=e[c+4],u=e[c+5],f=e[c+6],v=e[c+7];let T=(m-p)/(e[c+8]-p);s+=(e[c+8+1]-s)*T,r+=(e[c+8+2]-r)*T,o+=(e[c+8+3]-o)*T,a+=(e[c+8+4]-a)*T,u+=(e[c+8+5]-u)*T,f+=(e[c+8+6]-f)*T,v+=(e[c+8+7]-v)*T;break;case 1:s=e[c+1],r=e[c+2],o=e[c+3],a=e[c+4],u=e[c+5],f=e[c+6],v=e[c+7];break;default:s=this.getBezierValue(m,c,1,g-2),r=this.getBezierValue(m,c,2,g+18-2),o=this.getBezierValue(m,c,3,g+18*2-2),a=this.getBezierValue(m,c,4,g+18*3-2),u=this.getBezierValue(m,c,5,g+18*4-2),f=this.getBezierValue(m,c,6,g+18*5-2),v=this.getBezierValue(m,c,7,g+18*6-2)}if(x==1)l.set(s,r,o,a),i.r=u,i.g=f,i.b=v;else{if(h==0){l.setFromColor(t.data.color);let p=t.data.darkColor;i.r=p.r,i.g=p.g,i.b=p.b}l.add((s-l.r)*x,(r-l.g)*x,(o-l.b)*x,(a-l.a)*x),i.r+=(u-i.r)*x,i.g+=(f-i.g)*x,i.b+=(v-i.b)*x}}},ws=class extends Pe{constructor(y,n,m){super(y,n,[Ut.rgb+"|"+m,Ut.rgb2+"|"+m]);$(this,"slotIndex",0);this.slotIndex=m}getFrameEntries(){return 7}setFrame(y,n,m,S,x,h,d,t){y*=7,this.frames[y]=n,this.frames[y+1]=m,this.frames[y+2]=S,this.frames[y+3]=x,this.frames[y+4]=h,this.frames[y+5]=d,this.frames[y+6]=t}apply(y,n,m,S,x,h,d){let t=y.slots[this.slotIndex];if(!t.bone.active)return;let e=this.frames,l=t.color,i=t.darkColor;if(m<e[0]){let g=t.data.color,p=t.data.darkColor;switch(h){case 0:l.r=g.r,l.g=g.g,l.b=g.b,i.r=p.r,i.g=p.g,i.b=p.b;return;case 1:l.r+=(g.r-l.r)*x,l.g+=(g.g-l.g)*x,l.b+=(g.b-l.b)*x,i.r+=(p.r-i.r)*x,i.g+=(p.g-i.g)*x,i.b+=(p.b-i.b)*x}return}let s=0,r=0,o=0,a=0,u=0,f=0,v=Jt.search(e,m,7),c=this.curves[v/7];switch(c){case 0:let g=e[v];s=e[v+1],r=e[v+2],o=e[v+3],a=e[v+4],u=e[v+5],f=e[v+6];let p=(m-g)/(e[v+7]-g);s+=(e[v+7+1]-s)*p,r+=(e[v+7+2]-r)*p,o+=(e[v+7+3]-o)*p,a+=(e[v+7+4]-a)*p,u+=(e[v+7+5]-u)*p,f+=(e[v+7+6]-f)*p;break;case 1:s=e[v+1],r=e[v+2],o=e[v+3],a=e[v+4],u=e[v+5],f=e[v+6];break;default:s=this.getBezierValue(m,v,1,c-2),r=this.getBezierValue(m,v,2,c+18-2),o=this.getBezierValue(m,v,3,c+18*2-2),a=this.getBezierValue(m,v,4,c+18*3-2),u=this.getBezierValue(m,v,5,c+18*4-2),f=this.getBezierValue(m,v,6,c+18*5-2)}if(x==1)l.r=s,l.g=r,l.b=o,i.r=a,i.g=u,i.b=f;else{if(h==0){let g=t.data.color,p=t.data.darkColor;l.r=g.r,l.g=g.g,l.b=g.b,i.r=p.r,i.g=p.g,i.b=p.b}l.r+=(s-l.r)*x,l.g+=(r-l.g)*x,l.b+=(o-l.b)*x,i.r+=(a-i.r)*x,i.g+=(u-i.g)*x,i.b+=(f-i.b)*x}}},je=class extends Jt{constructor(y,n){super(y,[Ut.attachment+"|"+n]);$(this,"slotIndex",0);$(this,"attachmentNames");this.slotIndex=n,this.attachmentNames=new Array(y)}getFrameCount(){return this.frames.length}setFrame(y,n,m){this.frames[y]=n,this.attachmentNames[y]=m}apply(y,n,m,S,x,h,d){let t=y.slots[this.slotIndex];if(t.bone.active){if(d==1){h==0&&this.setAttachment(y,t,t.data.attachmentName);return}if(m<this.frames[0]){(h==0||h==1)&&this.setAttachment(y,t,t.data.attachmentName);return}this.setAttachment(y,t,this.attachmentNames[Jt.search1(this.frames,m)])}}setAttachment(y,n,m){n.setAttachment(m?y.getAttachment(this.slotIndex,m):null)}},Ds=class extends Pe{constructor(y,n,m,S){super(y,n,[Ut.deform+"|"+m+"|"+S.id]);$(this,"slotIndex",0);$(this,"attachment");$(this,"vertices");this.slotIndex=m,this.attachment=S,this.vertices=new Array(y)}getFrameCount(){return this.frames.length}setFrame(y,n,m){this.frames[y]=n,this.vertices[y]=m}setBezier(y,n,m,S,x,h,d,t,e,l,i){let s=this.curves,r=this.getFrameCount()+y*18;m==0&&(s[n]=2+r);let o=(S-h*2+t)*.03,a=e*.03-d*.06,u=((h-t)*3-S+l)*.006,f=(d-e+.33333333)*.018,v=o*2+u,c=a*2+f,g=(h-S)*.3+o+u*.16666667,p=d*.3+a+f*.16666667,T=S+g,C=p;for(let M=r+18;r<M;r+=2)s[r]=T,s[r+1]=C,g+=v,p+=c,v+=u,c+=f,T+=g,C+=p}getCurvePercent(y,n){let m=this.curves,S=m[n];switch(S){case 0:let t=this.frames[n];return(y-t)/(this.frames[n+this.getFrameEntries()]-t);case 1:return 0}if(S-=2,m[S]>y){let t=this.frames[n];return m[S+1]*(y-t)/(m[S]-t)}let x=S+18;for(S+=2;S<x;S+=2)if(m[S]>=y){let t=m[S-2],e=m[S-1];return e+(y-t)/(m[S]-t)*(m[S+1]-e)}let h=m[x-2],d=m[x-1];return d+(1-d)*(y-h)/(this.frames[n+this.getFrameEntries()]-h)}apply(y,n,m,S,x,h,d){let t=y.slots[this.slotIndex];if(!t.bone.active)return;let e=t.getAttachment();if(!e||!(e instanceof Ne)||e.timelineAttachment!=this.attachment)return;let l=t.deform;l.length==0&&(h=0);let i=this.vertices,s=i[0].length,r=this.frames;if(m<r[0]){switch(h){case 0:l.length=0;return;case 1:if(x==1){l.length=0;return}l.length=s;let c=e;if(c.bones){x=1-x;for(var o=0;o<s;o++)l[o]*=x}else{let g=c.vertices;for(var o=0;o<s;o++)l[o]+=(g[o]-l[o])*x}}return}if(l.length=s,m>=r[r.length-1]){let c=i[r.length-1];if(x==1)if(h==3){let g=e;if(g.bones)for(let p=0;p<s;p++)l[p]+=c[p];else{let p=g.vertices;for(let T=0;T<s;T++)l[T]+=c[T]-p[T]}}else ut.arrayCopy(c,0,l,0,s);else switch(h){case 0:{let p=e;if(p.bones)for(let T=0;T<s;T++)l[T]=c[T]*x;else{let T=p.vertices;for(let C=0;C<s;C++){let M=T[C];l[C]=M+(c[C]-M)*x}}break}case 1:case 2:for(let p=0;p<s;p++)l[p]+=(c[p]-l[p])*x;break;case 3:let g=e;if(g.bones)for(let p=0;p<s;p++)l[p]+=c[p]*x;else{let p=g.vertices;for(let T=0;T<s;T++)l[T]+=(c[T]-p[T])*x}}return}let a=Jt.search1(r,m),u=this.getCurvePercent(m,a),f=i[a],v=i[a+1];if(x==1)if(h==3){let c=e;if(c.bones)for(let g=0;g<s;g++){let p=f[g];l[g]+=p+(v[g]-p)*u}else{let g=c.vertices;for(let p=0;p<s;p++){let T=f[p];l[p]+=T+(v[p]-T)*u-g[p]}}}else for(let c=0;c<s;c++){let g=f[c];l[c]=g+(v[c]-g)*u}else switch(h){case 0:{let g=e;if(g.bones)for(let p=0;p<s;p++){let T=f[p];l[p]=(T+(v[p]-T)*u)*x}else{let p=g.vertices;for(let T=0;T<s;T++){let C=f[T],M=p[T];l[T]=M+(C+(v[T]-C)*u-M)*x}}break}case 1:case 2:for(let g=0;g<s;g++){let p=f[g];l[g]+=(p+(v[g]-p)*u-l[g])*x}break;case 3:let c=e;if(c.bones)for(let g=0;g<s;g++){let p=f[g];l[g]+=(p+(v[g]-p)*u)*x}else{let g=c.vertices;for(let p=0;p<s;p++){let T=f[p];l[p]+=(T+(v[p]-T)*u-g[p])*x}}}}},He,Ii=(He=class extends Jt{constructor(n){super(n,He.propertyIds);$(this,"events");this.events=new Array(n)}getFrameCount(){return this.frames.length}setFrame(n,m){this.frames[n]=m.time,this.events[n]=m}apply(n,m,S,x,h,d,t){if(!x)return;let e=this.frames,l=this.frames.length;if(m>S)this.apply(n,m,Number.MAX_VALUE,x,h,d,t),m=-1;else if(m>=e[l-1])return;if(S<e[0])return;let i=0;if(m<e[0])i=0;else{i=Jt.search1(e,m)+1;let s=e[i];for(;i>0&&e[i-1]==s;)i--}for(;i<l&&S>=e[i];i++)x.push(this.events[i])}},$(He,"propertyIds",[""+Ut.event]),He),Ke,ti=(Ke=class extends Jt{constructor(n){super(n,Ke.propertyIds);$(this,"drawOrders");this.drawOrders=new Array(n)}getFrameCount(){return this.frames.length}setFrame(n,m,S){this.frames[n]=m,this.drawOrders[n]=S}apply(n,m,S,x,h,d,t){if(t==1){d==0&&ut.arrayCopy(n.slots,0,n.drawOrder,0,n.slots.length);return}if(S<this.frames[0]){(d==0||d==1)&&ut.arrayCopy(n.slots,0,n.drawOrder,0,n.slots.length);return}let e=Jt.search1(this.frames,S),l=this.drawOrders[e];if(!l)ut.arrayCopy(n.slots,0,n.drawOrder,0,n.slots.length);else{let i=n.drawOrder,s=n.slots;for(let r=0,o=l.length;r<o;r++)i[r]=s[l[r]]}}},$(Ke,"propertyIds",[""+Ut.drawOrder]),Ke),Bs=class extends Pe{constructor(y,n,m){super(y,n,[Ut.ikConstraint+"|"+m]);$(this,"constraintIndex",0);this.constraintIndex=m}getFrameEntries(){return 6}setFrame(y,n,m,S,x,h,d){y*=6,this.frames[y]=n,this.frames[y+1]=m,this.frames[y+2]=S,this.frames[y+3]=x,this.frames[y+4]=h?1:0,this.frames[y+5]=d?1:0}apply(y,n,m,S,x,h,d){let t=y.ikConstraints[this.constraintIndex];if(!t.active)return;let e=this.frames;if(m<e[0]){switch(h){case 0:t.mix=t.data.mix,t.softness=t.data.softness,t.bendDirection=t.data.bendDirection,t.compress=t.data.compress,t.stretch=t.data.stretch;return;case 1:t.mix+=(t.data.mix-t.mix)*x,t.softness+=(t.data.softness-t.softness)*x,t.bendDirection=t.data.bendDirection,t.compress=t.data.compress,t.stretch=t.data.stretch}return}let l=0,i=0,s=Jt.search(e,m,6),r=this.curves[s/6];switch(r){case 0:let o=e[s];l=e[s+1],i=e[s+2];let a=(m-o)/(e[s+6]-o);l+=(e[s+6+1]-l)*a,i+=(e[s+6+2]-i)*a;break;case 1:l=e[s+1],i=e[s+2];break;default:l=this.getBezierValue(m,s,1,r-2),i=this.getBezierValue(m,s,2,r+18-2)}h==0?(t.mix=t.data.mix+(l-t.data.mix)*x,t.softness=t.data.softness+(i-t.data.softness)*x,d==1?(t.bendDirection=t.data.bendDirection,t.compress=t.data.compress,t.stretch=t.data.stretch):(t.bendDirection=e[s+3],t.compress=e[s+4]!=0,t.stretch=e[s+5]!=0)):(t.mix+=(l-t.mix)*x,t.softness+=(i-t.softness)*x,d==0&&(t.bendDirection=e[s+3],t.compress=e[s+4]!=0,t.stretch=e[s+5]!=0))}},Is=class extends Pe{constructor(y,n,m){super(y,n,[Ut.transformConstraint+"|"+m]);$(this,"constraintIndex",0);this.constraintIndex=m}getFrameEntries(){return 7}setFrame(y,n,m,S,x,h,d,t){let e=this.frames;y*=7,e[y]=n,e[y+1]=m,e[y+2]=S,e[y+3]=x,e[y+4]=h,e[y+5]=d,e[y+6]=t}apply(y,n,m,S,x,h,d){let t=y.transformConstraints[this.constraintIndex];if(!t.active)return;let e=this.frames;if(m<e[0]){let v=t.data;switch(h){case 0:t.mixRotate=v.mixRotate,t.mixX=v.mixX,t.mixY=v.mixY,t.mixScaleX=v.mixScaleX,t.mixScaleY=v.mixScaleY,t.mixShearY=v.mixShearY;return;case 1:t.mixRotate+=(v.mixRotate-t.mixRotate)*x,t.mixX+=(v.mixX-t.mixX)*x,t.mixY+=(v.mixY-t.mixY)*x,t.mixScaleX+=(v.mixScaleX-t.mixScaleX)*x,t.mixScaleY+=(v.mixScaleY-t.mixScaleY)*x,t.mixShearY+=(v.mixShearY-t.mixShearY)*x}return}let l,i,s,r,o,a,u=Jt.search(e,m,7),f=this.curves[u/7];switch(f){case 0:let v=e[u];l=e[u+1],i=e[u+2],s=e[u+3],r=e[u+4],o=e[u+5],a=e[u+6];let c=(m-v)/(e[u+7]-v);l+=(e[u+7+1]-l)*c,i+=(e[u+7+2]-i)*c,s+=(e[u+7+3]-s)*c,r+=(e[u+7+4]-r)*c,o+=(e[u+7+5]-o)*c,a+=(e[u+7+6]-a)*c;break;case 1:l=e[u+1],i=e[u+2],s=e[u+3],r=e[u+4],o=e[u+5],a=e[u+6];break;default:l=this.getBezierValue(m,u,1,f-2),i=this.getBezierValue(m,u,2,f+18-2),s=this.getBezierValue(m,u,3,f+18*2-2),r=this.getBezierValue(m,u,4,f+18*3-2),o=this.getBezierValue(m,u,5,f+18*4-2),a=this.getBezierValue(m,u,6,f+18*5-2)}if(h==0){let v=t.data;t.mixRotate=v.mixRotate+(l-v.mixRotate)*x,t.mixX=v.mixX+(i-v.mixX)*x,t.mixY=v.mixY+(s-v.mixY)*x,t.mixScaleX=v.mixScaleX+(r-v.mixScaleX)*x,t.mixScaleY=v.mixScaleY+(o-v.mixScaleY)*x,t.mixShearY=v.mixShearY+(a-v.mixShearY)*x}else t.mixRotate+=(l-t.mixRotate)*x,t.mixX+=(i-t.mixX)*x,t.mixY+=(s-t.mixY)*x,t.mixScaleX+=(r-t.mixScaleX)*x,t.mixScaleY+=(o-t.mixScaleY)*x,t.mixShearY+=(a-t.mixShearY)*x}},Ns=class extends Te{constructor(y,n,m){super(y,n,Ut.pathConstraintPosition+"|"+m);$(this,"constraintIndex",0);this.constraintIndex=m}apply(y,n,m,S,x,h,d){let t=y.pathConstraints[this.constraintIndex];t.active&&(t.position=this.getAbsoluteValue(m,x,h,t.position,t.data.position))}},bs=class extends Te{constructor(y,n,m){super(y,n,Ut.pathConstraintSpacing+"|"+m);$(this,"constraintIndex",0);this.constraintIndex=m}apply(y,n,m,S,x,h,d){let t=y.pathConstraints[this.constraintIndex];t.active&&(t.spacing=this.getAbsoluteValue(m,x,h,t.spacing,t.data.spacing))}},Gs=class extends Pe{constructor(y,n,m){super(y,n,[Ut.pathConstraintMix+"|"+m]);$(this,"constraintIndex",0);this.constraintIndex=m}getFrameEntries(){return 4}setFrame(y,n,m,S,x){let h=this.frames;y<<=2,h[y]=n,h[y+1]=m,h[y+2]=S,h[y+3]=x}apply(y,n,m,S,x,h,d){let t=y.pathConstraints[this.constraintIndex];if(!t.active)return;let e=this.frames;if(m<e[0]){switch(h){case 0:t.mixRotate=t.data.mixRotate,t.mixX=t.data.mixX,t.mixY=t.data.mixY;return;case 1:t.mixRotate+=(t.data.mixRotate-t.mixRotate)*x,t.mixX+=(t.data.mixX-t.mixX)*x,t.mixY+=(t.data.mixY-t.mixY)*x}return}let l,i,s,r=Jt.search(e,m,4),o=this.curves[r>>2];switch(o){case 0:let a=e[r];l=e[r+1],i=e[r+2],s=e[r+3];let u=(m-a)/(e[r+4]-a);l+=(e[r+4+1]-l)*u,i+=(e[r+4+2]-i)*u,s+=(e[r+4+3]-s)*u;break;case 1:l=e[r+1],i=e[r+2],s=e[r+3];break;default:l=this.getBezierValue(m,r,1,o-2),i=this.getBezierValue(m,r,2,o+18-2),s=this.getBezierValue(m,r,3,o+18*2-2)}if(h==0){let a=t.data;t.mixRotate=a.mixRotate+(l-a.mixRotate)*x,t.mixX=a.mixX+(i-a.mixX)*x,t.mixY=a.mixY+(s-a.mixY)*x}else t.mixRotate+=(l-t.mixRotate)*x,t.mixX+=(i-t.mixX)*x,t.mixY+=(s-t.mixY)*x}},Qe=class extends Te{constructor(y,n,m,S){super(y,n,S+"|"+m);$(this,"constraintIndex",0);this.constraintIndex=m}apply(y,n,m,S,x,h,d){let t;if(this.constraintIndex==-1){const e=m>=this.frames[0]?this.getCurveValue(m):0;for(const l of y.physicsConstraints)l.active&&this.global(l.data)&&this.set(l,this.getAbsoluteValue2(m,x,h,this.get(l),this.setup(l),e))}else t=y.physicsConstraints[this.constraintIndex],t.active&&this.set(t,this.getAbsoluteValue(m,x,h,this.get(t),this.setup(t)))}},Us=class extends Qe{constructor(E,y,n){super(E,y,n,Ut.physicsConstraintInertia)}setup(E){return E.data.inertia}get(E){return E.inertia}set(E,y){E.inertia=y}global(E){return E.inertiaGlobal}},zs=class extends Qe{constructor(E,y,n){super(E,y,n,Ut.physicsConstraintStrength)}setup(E){return E.data.strength}get(E){return E.strength}set(E,y){E.strength=y}global(E){return E.strengthGlobal}},Ys=class extends Qe{constructor(E,y,n){super(E,y,n,Ut.physicsConstraintDamping)}setup(E){return E.data.damping}get(E){return E.damping}set(E,y){E.damping=y}global(E){return E.dampingGlobal}},Vs=class extends Qe{constructor(E,y,n){super(E,y,n,Ut.physicsConstraintMass)}setup(E){return 1/E.data.massInverse}get(E){return 1/E.massInverse}set(E,y){E.massInverse=1/y}global(E){return E.massGlobal}},Xs=class extends Qe{constructor(E,y,n){super(E,y,n,Ut.physicsConstraintWind)}setup(E){return E.data.wind}get(E){return E.wind}set(E,y){E.wind=y}global(E){return E.windGlobal}},Ws=class extends Qe{constructor(E,y,n){super(E,y,n,Ut.physicsConstraintGravity)}setup(E){return E.data.gravity}get(E){return E.gravity}set(E,y){E.gravity=y}global(E){return E.gravityGlobal}},Hs=class extends Qe{constructor(E,y,n){super(E,y,n,Ut.physicsConstraintMix)}setup(E){return E.data.mix}get(E){return E.mix}set(E,y){E.mix=y}global(E){return E.mixGlobal}},Ze,Ks=(Ze=class extends Jt{constructor(n,m){super(n,Ze.propertyIds);$(this,"constraintIndex");this.constraintIndex=m}getFrameCount(){return this.frames.length}setFrame(n,m){this.frames[n]=m}apply(n,m,S,x,h,d,t){let e;if(this.constraintIndex!=-1&&(e=n.physicsConstraints[this.constraintIndex],!e.active))return;const l=this.frames;if(m>S)this.apply(n,m,Number.MAX_VALUE,[],h,d,t),m=-1;else if(m>=l[l.length-1])return;if(!(S<l[0])&&(m<l[0]||S>=l[Jt.search1(l,m)+1]))if(e!=null)e.reset();else for(const i of n.physicsConstraints)i.active&&i.reset()}},$(Ze,"propertyIds",[Ut.physicsConstraintReset.toString()]),Ze),ue,Zs=(ue=class extends Jt{constructor(n,m,S){super(n,[Ut.sequence+"|"+m+"|"+S.sequence.id]);$(this,"slotIndex");$(this,"attachment");this.slotIndex=m,this.attachment=S}getFrameEntries(){return ue.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(n,m,S,x,h){let d=this.frames;n*=ue.ENTRIES,d[n]=m,d[n+ue.MODE]=S|x<<4,d[n+ue.DELAY]=h}apply(n,m,S,x,h,d,t){let e=n.slots[this.slotIndex];if(!e.bone.active)return;let l=e.attachment,i=this.attachment;if(l!=i&&(!(l instanceof Ne)||l.timelineAttachment!=i))return;if(t==1){d==0&&(e.sequenceIndex=-1);return}let s=this.frames;if(S<s[0]){(d==0||d==1)&&(e.sequenceIndex=-1);return}let r=Jt.search(s,S,ue.ENTRIES),o=s[r],a=s[r+ue.MODE],u=s[r+ue.DELAY];if(!this.attachment.sequence)return;let f=a>>4,v=this.attachment.sequence.regions.length,c=ms[a&15];if(c!=0)switch(f+=(S-o)/u+1e-5|0,c){case 1:f=Math.min(v-1,f);break;case 2:f%=v;break;case 3:{let g=(v<<1)-2;f=g==0?0:f%g,f>=v&&(f=g-f);break}case 4:f=Math.max(v-1-f,0);break;case 5:f=v-1-f%v;break;case 6:{let g=(v<<1)-2;f=g==0?0:(f+v-1)%g,f>=v&&(f=g-f)}}e.sequenceIndex=f}},$(ue,"ENTRIES",3),$(ue,"MODE",1),$(ue,"DELAY",2),ue),Ie,Or=(Ie=class{constructor(y){$(this,"data");$(this,"tracks",new Array);$(this,"timeScale",1);$(this,"unkeyedState",0);$(this,"events",new Array);$(this,"listeners",new Array);$(this,"queue",new Dr(this));$(this,"propertyIDs",new ds);$(this,"animationsChanged",!1);$(this,"trackEntryPool",new oi(()=>new wr));this.data=y}static emptyAnimation(){return Ie._emptyAnimation}update(y){y*=this.timeScale;let n=this.tracks;for(let m=0,S=n.length;m<S;m++){let x=n[m];if(!x)continue;x.animationLast=x.nextAnimationLast,x.trackLast=x.nextTrackLast;let h=y*x.timeScale;if(x.delay>0){if(x.delay-=h,x.delay>0)continue;h=-x.delay,x.delay=0}let d=x.next;if(d){let t=x.trackLast-d.delay;if(t>=0){for(d.delay=0,d.trackTime+=x.timeScale==0?0:(t/x.timeScale+y)*d.timeScale,x.trackTime+=h,this.setCurrent(m,d,!0);d.mixingFrom;)d.mixTime+=y,d=d.mixingFrom;continue}}else if(x.trackLast>=x.trackEnd&&!x.mixingFrom){n[m]=null,this.queue.end(x),this.clearNext(x);continue}if(x.mixingFrom&&this.updateMixingFrom(x,y)){let t=x.mixingFrom;for(x.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}x.trackTime+=h}this.queue.drain()}updateMixingFrom(y,n){let m=y.mixingFrom;if(!m)return!0;let S=this.updateMixingFrom(m,n);return m.animationLast=m.nextAnimationLast,m.trackLast=m.nextTrackLast,y.nextTrackLast!=-1&&y.mixTime>=y.mixDuration?((m.totalAlpha==0||y.mixDuration==0)&&(y.mixingFrom=m.mixingFrom,m.mixingFrom!=null&&(m.mixingFrom.mixingTo=y),y.interruptAlpha=m.interruptAlpha,this.queue.end(m)),S):(m.trackTime+=n*m.timeScale,y.mixTime+=n,!1)}apply(y){if(!y)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let n=this.events,m=this.tracks,S=!1;for(let s=0,r=m.length;s<r;s++){let o=m[s];if(!o||o.delay>0)continue;S=!0;let a=s==0?1:o.mixBlend,u=o.alpha;o.mixingFrom?u*=this.applyMixingFrom(o,y,a):o.trackTime>=o.trackEnd&&!o.next&&(u=0);let f=u>=o.alphaAttachmentThreshold,v=o.animationLast,c=o.getAnimationTime(),g=c,p=n;o.reverse&&(g=o.animation.duration-g,p=null);let T=o.animation.timelines,C=T.length;if(s==0&&u==1||a==3){s==0&&(f=!0);for(let M=0;M<C;M++){var x=T[M];x instanceof je?this.applyAttachmentTimeline(x,y,g,a,f):x.apply(y,v,g,p,u,a,0)}}else{let M=o.timelineMode,A=o.shortestRotation,R=!A&&o.timelinesRotation.length!=C<<1;R&&(o.timelinesRotation.length=C<<1);for(let P=0;P<C;P++){let L=T[P],F=M[P]==yi?a:0;!A&&L instanceof hi?this.applyRotateTimeline(L,y,g,u,F,o.timelinesRotation,P<<1,R):L instanceof je?this.applyAttachmentTimeline(L,y,g,a,f):L.apply(y,v,g,p,u,F,0)}}this.queueEvents(o,c),n.length=0,o.nextAnimationLast=c,o.nextTrackLast=o.trackTime}for(var h=this.unkeyedState+Zi,d=y.slots,t=0,e=y.slots.length;t<e;t++){var l=d[t];if(l.attachmentState==h){var i=l.data.attachmentName;l.setAttachment(i?y.getAttachment(l.data.index,i):null)}}return this.unkeyedState+=2,this.queue.drain(),S}applyMixingFrom(y,n,m){let S=y.mixingFrom;S.mixingFrom&&this.applyMixingFrom(S,n,m);let x=0;y.mixDuration==0?(x=1,m==1&&(m=0)):(x=y.mixTime/y.mixDuration,x>1&&(x=1),m!=1&&(m=S.mixBlend));let h=x<S.mixAttachmentThreshold,d=x<S.mixDrawOrderThreshold,t=S.animation.timelines,e=t.length,l=S.alpha*y.interruptAlpha,i=l*(1-x),s=S.animationLast,r=S.getAnimationTime(),o=r,a=null;if(S.reverse?o=S.animation.duration-o:x<S.eventThreshold&&(a=this.events),m==3)for(let u=0;u<e;u++)t[u].apply(n,s,o,a,i,m,1);else{let u=S.timelineMode,f=S.timelineHoldMix,v=S.shortestRotation,c=!v&&S.timelinesRotation.length!=e<<1;c&&(S.timelinesRotation.length=e<<1),S.totalAlpha=0;for(let g=0;g<e;g++){let p=t[g],T=1,C,M=0;switch(u[g]){case yi:if(!d&&p instanceof ti)continue;C=m,M=i;break;case Hi:C=0,M=i;break;case Ki:C=m,M=l;break;case Ti:C=0,M=l;break;default:C=0;let A=f[g];M=l*Math.max(0,1-A.mixTime/A.mixDuration);break}S.totalAlpha+=M,!v&&p instanceof hi?this.applyRotateTimeline(p,n,o,M,C,S.timelinesRotation,g<<1,c):p instanceof je?this.applyAttachmentTimeline(p,n,o,C,h&&M>=S.alphaAttachmentThreshold):(d&&p instanceof ti&&C==0&&(T=0),p.apply(n,s,o,a,M,C,T))}}return y.mixDuration>0&&this.queueEvents(S,r),this.events.length=0,S.nextAnimationLast=r,S.nextTrackLast=S.trackTime,x}applyAttachmentTimeline(y,n,m,S,x){var h=n.slots[y.slotIndex];h.bone.active&&(m<y.frames[0]?(S==0||S==1)&&this.setAttachment(n,h,h.data.attachmentName,x):this.setAttachment(n,h,y.attachmentNames[Jt.search1(y.frames,m)],x),h.attachmentState<=this.unkeyedState&&(h.attachmentState=this.unkeyedState+Zi))}setAttachment(y,n,m,S){n.setAttachment(m?y.getAttachment(n.data.index,m):null),S&&(n.attachmentState=this.unkeyedState+Ir)}applyRotateTimeline(y,n,m,S,x,h,d,t){if(t&&(h[d]=0),S==1){y.apply(n,0,m,null,1,x,0);return}let e=n.bones[y.boneIndex];if(!e.active)return;let l=y.frames,i=0,s=0;if(m<l[0])switch(x){case 0:e.rotation=e.data.rotation;default:return;case 1:i=e.rotation,s=e.data.rotation}else i=x==0?e.data.rotation:e.rotation,s=e.data.rotation+y.getCurveValue(m);let r=0,o=s-i;if(o-=Math.ceil(o/360-.5)*360,o==0)r=h[d];else{let a=0,u=0;t?(a=0,u=o):(a=h[d],u=h[d+1]);let f=a-a%360;r=o+f;let v=o>=0,c=a>=0;Math.abs(u)<=90&&ft.signum(u)!=ft.signum(o)&&(Math.abs(a-f)>180?(r+=360*ft.signum(a),c=v):f!=0?r-=360*ft.signum(a):c=v),c!=v&&(r+=360*ft.signum(a)),h[d]=r}h[d+1]=o,e.rotation=i+r*S}queueEvents(y,n){let m=y.animationStart,S=y.animationEnd,x=S-m,h=y.trackLast%x,d=this.events,t=0,e=d.length;for(;t<e;t++){let i=d[t];if(i.time<h)break;i.time>S||this.queue.event(y,i)}let l=!1;if(y.loop)if(x==0)l=!0;else{const i=Math.floor(y.trackTime/x);l=i>0&&i>Math.floor(y.trackLast/x)}else l=n>=S&&y.animationLast<S;for(l&&this.queue.complete(y);t<e;t++){let i=d[t];i.time<m||this.queue.event(y,i)}}clearTracks(){let y=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let n=0,m=this.tracks.length;n<m;n++)this.clearTrack(n);this.tracks.length=0,this.queue.drainDisabled=y,this.queue.drain()}clearTrack(y){if(y>=this.tracks.length)return;let n=this.tracks[y];if(!n)return;this.queue.end(n),this.clearNext(n);let m=n;for(;;){let S=m.mixingFrom;if(!S)break;this.queue.end(S),m.mixingFrom=null,m.mixingTo=null,m=S}this.tracks[n.trackIndex]=null,this.queue.drain()}setCurrent(y,n,m){let S=this.expandToIndex(y);this.tracks[y]=n,n.previous=null,S&&(m&&this.queue.interrupt(S),n.mixingFrom=S,S.mixingTo=n,n.mixTime=0,S.mixingFrom&&S.mixDuration>0&&(n.interruptAlpha*=Math.min(1,S.mixTime/S.mixDuration)),S.timelinesRotation.length=0),this.queue.start(n)}setAnimation(y,n,m=!1){let S=this.data.skeletonData.findAnimation(n);if(!S)throw new Error("Animation not found: "+n);return this.setAnimationWith(y,S,m)}setAnimationWith(y,n,m=!1){if(!n)throw new Error("animation cannot be null.");let S=!0,x=this.expandToIndex(y);x&&(x.nextTrackLast==-1?(this.tracks[y]=x.mixingFrom,this.queue.interrupt(x),this.queue.end(x),this.clearNext(x),x=x.mixingFrom,S=!1):this.clearNext(x));let h=this.trackEntry(y,n,m,x);return this.setCurrent(y,h,S),this.queue.drain(),h}addAnimation(y,n,m=!1,S=0){let x=this.data.skeletonData.findAnimation(n);if(!x)throw new Error("Animation not found: "+n);return this.addAnimationWith(y,x,m,S)}addAnimationWith(y,n,m=!1,S=0){if(!n)throw new Error("animation cannot be null.");let x=this.expandToIndex(y);if(x)for(;x.next;)x=x.next;let h=this.trackEntry(y,n,m,x);return x?(x.next=h,h.previous=x,S<=0&&(S=Math.max(S+x.getTrackComplete()-h.mixDuration,0))):(this.setCurrent(y,h,!0),this.queue.drain(),S<0&&(S=0)),h.delay=S,h}setEmptyAnimation(y,n=0){let m=this.setAnimationWith(y,Ie.emptyAnimation(),!1);return m.mixDuration=n,m.trackEnd=n,m}addEmptyAnimation(y,n=0,m=0){let S=this.addAnimationWith(y,Ie.emptyAnimation(),!1,m);return m<=0&&(S.delay=Math.max(S.delay+S.mixDuration-n,0)),S.mixDuration=n,S.trackEnd=n,S}setEmptyAnimations(y=0){let n=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let m=0,S=this.tracks.length;m<S;m++){let x=this.tracks[m];x&&this.setEmptyAnimation(x.trackIndex,y)}this.queue.drainDisabled=n,this.queue.drain()}expandToIndex(y){return y<this.tracks.length?this.tracks[y]:(ut.ensureArrayCapacity(this.tracks,y+1,null),this.tracks.length=y+1,null)}trackEntry(y,n,m,S){let x=this.trackEntryPool.obtain();return x.reset(),x.trackIndex=y,x.animation=n,x.loop=m,x.holdPrevious=!1,x.reverse=!1,x.shortestRotation=!1,x.eventThreshold=0,x.alphaAttachmentThreshold=0,x.mixAttachmentThreshold=0,x.mixDrawOrderThreshold=0,x.animationStart=0,x.animationEnd=n.duration,x.animationLast=-1,x.nextAnimationLast=-1,x.delay=0,x.trackTime=0,x.trackLast=-1,x.nextTrackLast=-1,x.trackEnd=Number.MAX_VALUE,x.timeScale=1,x.alpha=1,x.mixTime=0,x.mixDuration=S?this.data.getMix(S.animation,n):0,x.interruptAlpha=1,x.totalAlpha=0,x.mixBlend=2,x}clearNext(y){let n=y.next;for(;n;)this.queue.dispose(n),n=n.next;y.next=null}_animationsChanged(){this.animationsChanged=!1,this.propertyIDs.clear();let y=this.tracks;for(let n=0,m=y.length;n<m;n++){let S=y[n];if(S){for(;S.mixingFrom;)S=S.mixingFrom;do(!S.mixingTo||S.mixBlend!=3)&&this.computeHold(S),S=S.mixingTo;while(S)}}}computeHold(y){let n=y.mixingTo,m=y.animation.timelines,S=y.animation.timelines.length,x=y.timelineMode;x.length=S;let h=y.timelineHoldMix;h.length=0;let d=this.propertyIDs;if(n&&n.holdPrevious){for(let t=0;t<S;t++)x[t]=d.addAll(m[t].getPropertyIds())?Ti:Ki;return}t:for(let t=0;t<S;t++){let e=m[t],l=e.getPropertyIds();if(!d.addAll(l))x[t]=yi;else if(!n||e instanceof je||e instanceof ti||e instanceof Ii||!n.animation.hasTimeline(l))x[t]=Hi;else{for(let i=n.mixingTo;i;i=i.mixingTo)if(!i.animation.hasTimeline(l)){if(y.mixDuration>0){x[t]=Br,h[t]=i;continue t}break}x[t]=Ti}}}getCurrent(y){return y>=this.tracks.length?null:this.tracks[y]}addListener(y){if(!y)throw new Error("listener cannot be null.");this.listeners.push(y)}removeListener(y){let n=this.listeners.indexOf(y);n>=0&&this.listeners.splice(n,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},$(Ie,"_emptyAnimation",new Di("<empty>",[],0)),Ie),wr=class{constructor(){$(this,"animation",null);$(this,"previous",null);$(this,"next",null);$(this,"mixingFrom",null);$(this,"mixingTo",null);$(this,"listener",null);$(this,"trackIndex",0);$(this,"loop",!1);$(this,"holdPrevious",!1);$(this,"reverse",!1);$(this,"shortestRotation",!1);$(this,"eventThreshold",0);$(this,"mixAttachmentThreshold",0);$(this,"alphaAttachmentThreshold",0);$(this,"mixDrawOrderThreshold",0);$(this,"animationStart",0);$(this,"animationEnd",0);$(this,"animationLast",0);$(this,"nextAnimationLast",0);$(this,"delay",0);$(this,"trackTime",0);$(this,"trackLast",0);$(this,"nextTrackLast",0);$(this,"trackEnd",0);$(this,"timeScale",0);$(this,"alpha",0);$(this,"mixTime",0);$(this,"_mixDuration",0);$(this,"interruptAlpha",0);$(this,"totalAlpha",0);$(this,"mixBlend",2);$(this,"timelineMode",new Array);$(this,"timelineHoldMix",new Array);$(this,"timelinesRotation",new Array)}get mixDuration(){return this._mixDuration}set mixDuration(E){this._mixDuration=E}setMixDurationWithDelay(E,y){this._mixDuration=E,y<=0&&(this.previous!=null?y=Math.max(y+this.previous.getTrackComplete()-E,0):y=0),this.delay=y}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let E=this.animationEnd-this.animationStart;return E==0?this.animationStart:this.trackTime%E+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(E){this.animationLast=E,this.nextAnimationLast=E}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let E=this.animationEnd-this.animationStart;if(E!=0){if(this.loop)return E*(1+(this.trackTime/E|0));if(this.trackTime<E)return E}return this.trackTime}wasApplied(){return this.nextTrackLast!=-1}isNextReady(){return this.next!=null&&this.nextTrackLast-this.next.delay>=0}},Dr=class{constructor(E){$(this,"objects",[]);$(this,"drainDisabled",!1);$(this,"animState");this.animState=E}start(E){this.objects.push(0),this.objects.push(E),this.animState.animationsChanged=!0}interrupt(E){this.objects.push(1),this.objects.push(E)}end(E){this.objects.push(2),this.objects.push(E),this.animState.animationsChanged=!0}dispose(E){this.objects.push(3),this.objects.push(E)}complete(E){this.objects.push(4),this.objects.push(E)}event(E,y){this.objects.push(5),this.objects.push(E),this.objects.push(y)}drain(){if(this.drainDisabled)return;this.drainDisabled=!0;let E=this.objects,y=this.animState.listeners;for(let n=0;n<E.length;n+=2){let m=E[n],S=E[n+1];switch(m){case 0:S.listener&&S.listener.start&&S.listener.start(S);for(let h=0;h<y.length;h++){let d=y[h];d.start&&d.start(S)}break;case 1:S.listener&&S.listener.interrupt&&S.listener.interrupt(S);for(let h=0;h<y.length;h++){let d=y[h];d.interrupt&&d.interrupt(S)}break;case 2:S.listener&&S.listener.end&&S.listener.end(S);for(let h=0;h<y.length;h++){let d=y[h];d.end&&d.end(S)}case 3:S.listener&&S.listener.dispose&&S.listener.dispose(S);for(let h=0;h<y.length;h++){let d=y[h];d.dispose&&d.dispose(S)}this.animState.trackEntryPool.free(S);break;case 4:S.listener&&S.listener.complete&&S.listener.complete(S);for(let h=0;h<y.length;h++){let d=y[h];d.complete&&d.complete(S)}break;case 5:let x=E[n+++2];S.listener&&S.listener.event&&S.listener.event(S,x);for(let h=0;h<y.length;h++){let d=y[h];d.event&&d.event(S,x)}break}}this.clear(),this.drainDisabled=!1}clear(){this.objects.length=0}},yi=0,Hi=1,Ki=2,Ti=3,Br=4,Zi=1,Ir=2,Nr=class{constructor(E){$(this,"skeletonData");$(this,"animationToMixTime",{});$(this,"defaultMix",0);if(!E)throw new Error("skeletonData cannot be null.");this.skeletonData=E}setMix(E,y,n){let m=this.skeletonData.findAnimation(E);if(!m)throw new Error("Animation not found: "+E);let S=this.skeletonData.findAnimation(y);if(!S)throw new Error("Animation not found: "+y);this.setMixWith(m,S,n)}setMixWith(E,y,n){if(!E)throw new Error("from cannot be null.");if(!y)throw new Error("to cannot be null.");let m=E.name+"."+y.name;this.animationToMixTime[m]=n}getMix(E,y){let n=E.name+"."+y.name,m=this.animationToMixTime[n];return m===void 0?this.defaultMix:m}},$s=class Qs extends Ne{constructor(n){super(n);$(this,"color",new It(1,1,1,1))}copy(){let n=new Qs(this.name);return this.copyTo(n),n.color.setFromColor(this.color),n}},vi=class Js extends Ne{constructor(n){super(n);$(this,"endSlot",null);$(this,"color",new It(.2275,.2275,.8078,1))}copy(){let n=new Js(this.name);return this.copyTo(n),n.endSlot=this.endSlot,n.color.setFromColor(this.color),n}},js=class{constructor(E){$(this,"_image");this._image=E}getImage(){return this._image}},Ai=(E=>(E[E.Nearest=9728]="Nearest",E[E.Linear=9729]="Linear",E[E.MipMap=9987]="MipMap",E[E.MipMapNearestNearest=9984]="MipMapNearestNearest",E[E.MipMapLinearNearest=9985]="MipMapLinearNearest",E[E.MipMapNearestLinear=9986]="MipMapNearestLinear",E[E.MipMapLinearLinear=9987]="MipMapLinearLinear",E))(Ai||{}),br=class{constructor(){$(this,"texture");$(this,"u",0);$(this,"v",0);$(this,"u2",0);$(this,"v2",0);$(this,"width",0);$(this,"height",0);$(this,"degrees",0);$(this,"offsetX",0);$(this,"offsetY",0);$(this,"originalWidth",0);$(this,"originalHeight",0)}},Gr=class{constructor(E){$(this,"pages",new Array);$(this,"regions",new Array);let y=new Ur(E),n=new Array(4),m={};m.size=e=>{e.width=parseInt(n[1]),e.height=parseInt(n[2])},m.format=()=>{},m.filter=e=>{e.minFilter=ut.enumValue(Ai,n[1]),e.magFilter=ut.enumValue(Ai,n[2])},m.repeat=e=>{n[1].indexOf("x")!=-1&&(e.uWrap=10497),n[1].indexOf("y")!=-1&&(e.vWrap=10497)},m.pma=e=>{e.pma=n[1]=="true"};var S={};S.xy=e=>{e.x=parseInt(n[1]),e.y=parseInt(n[2])},S.size=e=>{e.width=parseInt(n[1]),e.height=parseInt(n[2])},S.bounds=e=>{e.x=parseInt(n[1]),e.y=parseInt(n[2]),e.width=parseInt(n[3]),e.height=parseInt(n[4])},S.offset=e=>{e.offsetX=parseInt(n[1]),e.offsetY=parseInt(n[2])},S.orig=e=>{e.originalWidth=parseInt(n[1]),e.originalHeight=parseInt(n[2])},S.offsets=e=>{e.offsetX=parseInt(n[1]),e.offsetY=parseInt(n[2]),e.originalWidth=parseInt(n[3]),e.originalHeight=parseInt(n[4])},S.rotate=e=>{let l=n[1];l=="true"?e.degrees=90:l!="false"&&(e.degrees=parseInt(l))},S.index=e=>{e.index=parseInt(n[1])};let x=y.readLine();for(;x&&x.trim().length==0;)x=y.readLine();for(;!(!x||x.trim().length==0||y.readEntry(n,x)==0);)x=y.readLine();let h=null,d=null,t=null;for(;x!==null;)if(x.trim().length==0)h=null,x=y.readLine();else if(h){let e=new ks(h,x);for(;;){let l=y.readEntry(n,x=y.readLine());if(l==0)break;let i=S[n[0]];if(i)i(e);else{d||(d=[]),t||(t=[]),d.push(n[0]);let s=[];for(let r=0;r<l;r++)s.push(parseInt(n[r+1]));t.push(s)}}e.originalWidth==0&&e.originalHeight==0&&(e.originalWidth=e.width,e.originalHeight=e.height),d&&d.length>0&&t&&t.length>0&&(e.names=d,e.values=t,d=null,t=null),e.u=e.x/h.width,e.v=e.y/h.height,e.degrees==90?(e.u2=(e.x+e.height)/h.width,e.v2=(e.y+e.width)/h.height):(e.u2=(e.x+e.width)/h.width,e.v2=(e.y+e.height)/h.height),this.regions.push(e)}else{for(h=new zr(x.trim());y.readEntry(n,x=y.readLine())!=0;){let e=m[n[0]];e&&e(h)}this.pages.push(h)}}findRegion(E){for(let y=0;y<this.regions.length;y++)if(this.regions[y].name==E)return this.regions[y];return null}setTextures(E,y=""){for(let n of this.pages)n.setTexture(E.get(y+n.name))}dispose(){for(let E=0;E<this.pages.length;E++)this.pages[E].texture?.dispose()}},Ur=class{constructor(E){$(this,"lines");$(this,"index",0);this.lines=E.split(/\r\n|\r|\n/)}readLine(){return this.index>=this.lines.length?null:this.lines[this.index++]}readEntry(E,y){if(!y||(y=y.trim(),y.length==0))return 0;let n=y.indexOf(":");if(n==-1)return 0;E[0]=y.substr(0,n).trim();for(let m=1,S=n+1;;m++){let x=y.indexOf(",",S);if(x==-1)return E[m]=y.substr(S).trim(),m;if(E[m]=y.substr(S,x-S).trim(),S=x+1,m==4)return 4}}},zr=class{constructor(E){$(this,"name");$(this,"minFilter",9728);$(this,"magFilter",9728);$(this,"uWrap",33071);$(this,"vWrap",33071);$(this,"texture",null);$(this,"width",0);$(this,"height",0);$(this,"pma",!1);$(this,"regions",new Array);this.name=E}setTexture(E){this.texture=E,E.setFilters(this.minFilter,this.magFilter),E.setWraps(this.uWrap,this.vWrap);for(let y of this.regions)y.texture=E}},ks=class extends br{constructor(y,n){super();$(this,"page");$(this,"name");$(this,"x",0);$(this,"y",0);$(this,"offsetX",0);$(this,"offsetY",0);$(this,"originalWidth",0);$(this,"originalHeight",0);$(this,"index",0);$(this,"degrees",0);$(this,"names",null);$(this,"values",null);this.page=y,this.name=n,y.regions.push(this)}},_e=class Mi extends Ne{constructor(n,m){super(n);$(this,"region",null);$(this,"path");$(this,"regionUVs",[]);$(this,"uvs",[]);$(this,"triangles",[]);$(this,"color",new It(1,1,1,1));$(this,"width",0);$(this,"height",0);$(this,"hullLength",0);$(this,"edges",[]);$(this,"parentMesh",null);$(this,"sequence",null);$(this,"tempColor",new It(0,0,0,0));this.path=m}updateRegion(){if(!this.region)throw new Error("Region not set.");let n=this.regionUVs;(!this.uvs||this.uvs.length!=n.length)&&(this.uvs=ut.newFloatArray(n.length));let m=this.uvs,S=this.uvs.length,x=this.region.u,h=this.region.v,d=0,t=0;if(this.region instanceof ks){let e=this.region,l=e.page,i=l.width,s=l.height;switch(e.degrees){case 90:x-=(e.originalHeight-e.offsetY-e.height)/i,h-=(e.originalWidth-e.offsetX-e.width)/s,d=e.originalHeight/i,t=e.originalWidth/s;for(let r=0;r<S;r+=2)m[r]=x+n[r+1]*d,m[r+1]=h+(1-n[r])*t;return;case 180:x-=(e.originalWidth-e.offsetX-e.width)/i,h-=e.offsetY/s,d=e.originalWidth/i,t=e.originalHeight/s;for(let r=0;r<S;r+=2)m[r]=x+(1-n[r])*d,m[r+1]=h+(1-n[r+1])*t;return;case 270:x-=e.offsetY/i,h-=e.offsetX/s,d=e.originalHeight/i,t=e.originalWidth/s;for(let r=0;r<S;r+=2)m[r]=x+(1-n[r+1])*d,m[r+1]=h+n[r]*t;return}x-=e.offsetX/i,h-=(e.originalHeight-e.offsetY-e.height)/s,d=e.originalWidth/i,t=e.originalHeight/s}else this.region?(d=this.region.u2-x,t=this.region.v2-h):(x=h=0,d=t=1);for(let e=0;e<S;e+=2)m[e]=x+n[e]*d,m[e+1]=h+n[e+1]*t}getParentMesh(){return this.parentMesh}setParentMesh(n){this.parentMesh=n,n&&(this.bones=n.bones,this.vertices=n.vertices,this.worldVerticesLength=n.worldVerticesLength,this.regionUVs=n.regionUVs,this.triangles=n.triangles,this.hullLength=n.hullLength,this.worldVerticesLength=n.worldVerticesLength)}copy(){if(this.parentMesh)return this.newLinkedMesh();let n=new Mi(this.name,this.path);return n.region=this.region,n.color.setFromColor(this.color),this.copyTo(n),n.regionUVs=new Array(this.regionUVs.length),ut.arrayCopy(this.regionUVs,0,n.regionUVs,0,this.regionUVs.length),n.uvs=this.uvs instanceof Float32Array?ut.newFloatArray(this.uvs.length):new Array(this.uvs.length),ut.arrayCopy(this.uvs,0,n.uvs,0,this.uvs.length),n.triangles=new Array(this.triangles.length),ut.arrayCopy(this.triangles,0,n.triangles,0,this.triangles.length),n.hullLength=this.hullLength,n.sequence=this.sequence!=null?this.sequence.copy():null,this.edges&&(n.edges=new Array(this.edges.length),ut.arrayCopy(this.edges,0,n.edges,0,this.edges.length)),n.width=this.width,n.height=this.height,n}computeWorldVertices(n,m,S,x,h,d){this.sequence!=null&&this.sequence.apply(n,this),super.computeWorldVertices(n,m,S,x,h,d)}newLinkedMesh(){let n=new Mi(this.name,this.path);return n.region=this.region,n.color.setFromColor(this.color),n.timelineAttachment=this.timelineAttachment,n.setParentMesh(this.parentMesh?this.parentMesh:this),n.region!=null&&n.updateRegion(),n}},ei=class qs extends Ne{constructor(n){super(n);$(this,"lengths",[]);$(this,"closed",!1);$(this,"constantSpeed",!1);$(this,"color",new It(1,1,1,1))}copy(){let n=new qs(this.name);return this.copyTo(n),n.lengths=new Array(this.lengths.length),ut.arrayCopy(this.lengths,0,n.lengths,0,this.lengths.length),n.closed=closed,n.constantSpeed=this.constantSpeed,n.color.setFromColor(this.color),n}},Yr=class _s extends Ne{constructor(n){super(n);$(this,"x",0);$(this,"y",0);$(this,"rotation",0);$(this,"color",new It(.38,.94,0,1))}computeWorldPosition(n,m){return m.x=this.x*n.a+this.y*n.b+n.worldX,m.y=this.x*n.c+this.y*n.d+n.worldY,m}computeWorldRotation(n){const m=this.rotation*ft.degRad,S=Math.cos(m),x=Math.sin(m),h=S*n.a+x*n.b,d=S*n.c+x*n.d;return ft.atan2Deg(d,h)}copy(){let n=new _s(this.name);return n.x=this.x,n.y=this.y,n.rotation=this.rotation,n.color.setFromColor(this.color),n}},Yt,Zt=(Yt=class extends vs{constructor(n,m){super(n);$(this,"x",0);$(this,"y",0);$(this,"scaleX",1);$(this,"scaleY",1);$(this,"rotation",0);$(this,"width",0);$(this,"height",0);$(this,"color",new It(1,1,1,1));$(this,"path");$(this,"region",null);$(this,"sequence",null);$(this,"offset",ut.newFloatArray(8));$(this,"uvs",ut.newFloatArray(8));$(this,"tempColor",new It(1,1,1,1));this.path=m}updateRegion(){if(!this.region)throw new Error("Region not set.");let n=this.region,m=this.uvs;if(n==null){m[0]=0,m[1]=0,m[2]=0,m[3]=1,m[4]=1,m[5]=1,m[6]=1,m[7]=0;return}let S=this.width/this.region.originalWidth*this.scaleX,x=this.height/this.region.originalHeight*this.scaleY,h=-this.width/2*this.scaleX+this.region.offsetX*S,d=-this.height/2*this.scaleY+this.region.offsetY*x,t=h+this.region.width*S,e=d+this.region.height*x,l=this.rotation*ft.degRad,i=Math.cos(l),s=Math.sin(l),r=this.x,o=this.y,a=h*i+r,u=h*s,f=d*i+o,v=d*s,c=t*i+r,g=t*s,p=e*i+o,T=e*s,C=this.offset;C[0]=a-v,C[1]=f+u,C[2]=a-T,C[3]=p+u,C[4]=c-T,C[5]=p+g,C[6]=c-v,C[7]=f+g,n.degrees==90?(m[0]=n.u2,m[1]=n.v2,m[2]=n.u,m[3]=n.v2,m[4]=n.u,m[5]=n.v,m[6]=n.u2,m[7]=n.v):(m[0]=n.u,m[1]=n.v2,m[2]=n.u,m[3]=n.v,m[4]=n.u2,m[5]=n.v,m[6]=n.u2,m[7]=n.v2)}computeWorldVertices(n,m,S,x){this.sequence!=null&&this.sequence.apply(n,this);let h=n.bone,d=this.offset,t=h.worldX,e=h.worldY,l=h.a,i=h.b,s=h.c,r=h.d,o=0,a=0;o=d[0],a=d[1],m[S]=o*l+a*i+t,m[S+1]=o*s+a*r+e,S+=x,o=d[2],a=d[3],m[S]=o*l+a*i+t,m[S+1]=o*s+a*r+e,S+=x,o=d[4],a=d[5],m[S]=o*l+a*i+t,m[S+1]=o*s+a*r+e,S+=x,o=d[6],a=d[7],m[S]=o*l+a*i+t,m[S+1]=o*s+a*r+e}copy(){let n=new Yt(this.name,this.path);return n.region=this.region,n.x=this.x,n.y=this.y,n.scaleX=this.scaleX,n.scaleY=this.scaleY,n.rotation=this.rotation,n.width=this.width,n.height=this.height,ut.arrayCopy(this.uvs,0,n.uvs,0,8),ut.arrayCopy(this.offset,0,n.offset,0,8),n.color.setFromColor(this.color),n.sequence=this.sequence!=null?this.sequence.copy():null,n}},$(Yt,"X1",0),$(Yt,"Y1",1),$(Yt,"C1R",2),$(Yt,"C1G",3),$(Yt,"C1B",4),$(Yt,"C1A",5),$(Yt,"U1",6),$(Yt,"V1",7),$(Yt,"X2",8),$(Yt,"Y2",9),$(Yt,"C2R",10),$(Yt,"C2G",11),$(Yt,"C2B",12),$(Yt,"C2A",13),$(Yt,"U2",14),$(Yt,"V2",15),$(Yt,"X3",16),$(Yt,"Y3",17),$(Yt,"C3R",18),$(Yt,"C3G",19),$(Yt,"C3B",20),$(Yt,"C3A",21),$(Yt,"U3",22),$(Yt,"V3",23),$(Yt,"X4",24),$(Yt,"Y4",25),$(Yt,"C4R",26),$(Yt,"C4G",27),$(Yt,"C4B",28),$(Yt,"C4A",29),$(Yt,"U4",30),$(Yt,"V4",31),Yt),$i=class{constructor(E){$(this,"atlas");this.atlas=E}loadSequence(E,y,n){let m=n.regions;for(let S=0,x=m.length;S<x;S++){let h=n.getPath(y,S),d=this.atlas.findRegion(h);if(d==null)throw new Error("Region not found in atlas: "+h+" (sequence: "+E+")");m[S]=d}}newRegionAttachment(E,y,n,m){let S=new Zt(y,n);if(m!=null)this.loadSequence(y,n,m);else{let x=this.atlas.findRegion(n);if(!x)throw new Error("Region not found in atlas: "+n+" (region attachment: "+y+")");S.region=x}return S}newMeshAttachment(E,y,n,m){let S=new _e(y,n);if(m!=null)this.loadSequence(y,n,m);else{let x=this.atlas.findRegion(n);if(!x)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+y+")");S.region=x}return S}newBoundingBoxAttachment(E,y){return new $s(y)}newPathAttachment(E,y){return new ei(y)}newPointAttachment(E,y){return new Yr(y)}newClippingAttachment(E,y){return new vi(y)}},tn=class{constructor(E,y,n){$(this,"index",0);$(this,"name");$(this,"parent",null);$(this,"length",0);$(this,"x",0);$(this,"y",0);$(this,"rotation",0);$(this,"scaleX",1);$(this,"scaleY",1);$(this,"shearX",0);$(this,"shearY",0);$(this,"inherit",0);$(this,"skinRequired",!1);$(this,"color",new It);$(this,"icon");$(this,"visible",!1);if(E<0)throw new Error("index must be >= 0.");if(!y)throw new Error("name cannot be null.");this.index=E,this.name=y,this.parent=n}},Ri=(E=>(E[E.Normal=0]="Normal",E[E.OnlyTranslation=1]="OnlyTranslation",E[E.NoRotationOrReflection=2]="NoRotationOrReflection",E[E.NoScale=3]="NoScale",E[E.NoScaleOrReflection=4]="NoScaleOrReflection",E))(Ri||{}),Qi=class{constructor(E,y,n){$(this,"data");$(this,"skeleton");$(this,"parent",null);$(this,"children",new Array);$(this,"x",0);$(this,"y",0);$(this,"rotation",0);$(this,"scaleX",0);$(this,"scaleY",0);$(this,"shearX",0);$(this,"shearY",0);$(this,"ax",0);$(this,"ay",0);$(this,"arotation",0);$(this,"ascaleX",0);$(this,"ascaleY",0);$(this,"ashearX",0);$(this,"ashearY",0);$(this,"a",0);$(this,"b",0);$(this,"c",0);$(this,"d",0);$(this,"worldY",0);$(this,"worldX",0);$(this,"inherit",0);$(this,"sorted",!1);$(this,"active",!1);if(!E)throw new Error("data cannot be null.");if(!y)throw new Error("skeleton cannot be null.");this.data=E,this.skeleton=y,this.parent=n,this.setToSetupPose()}isActive(){return this.active}update(E){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(E,y,n,m,S,x,h){this.ax=E,this.ay=y,this.arotation=n,this.ascaleX=m,this.ascaleY=S,this.ashearX=x,this.ashearY=h;let d=this.parent;if(!d){let s=this.skeleton;const r=s.scaleX,o=s.scaleY,a=(n+x)*ft.degRad,u=(n+90+h)*ft.degRad;this.a=Math.cos(a)*m*r,this.b=Math.cos(u)*S*r,this.c=Math.sin(a)*m*o,this.d=Math.sin(u)*S*o,this.worldX=E*r+s.x,this.worldY=y*o+s.y;return}let t=d.a,e=d.b,l=d.c,i=d.d;switch(this.worldX=t*E+e*y+d.worldX,this.worldY=l*E+i*y+d.worldY,this.inherit){case 0:{const s=(n+x)*ft.degRad,r=(n+90+h)*ft.degRad,o=Math.cos(s)*m,a=Math.cos(r)*S,u=Math.sin(s)*m,f=Math.sin(r)*S;this.a=t*o+e*u,this.b=t*a+e*f,this.c=l*o+i*u,this.d=l*a+i*f;return}case 1:{const s=(n+x)*ft.degRad,r=(n+90+h)*ft.degRad;this.a=Math.cos(s)*m,this.b=Math.cos(r)*S,this.c=Math.sin(s)*m,this.d=Math.sin(r)*S;break}case 2:{let s=1/this.skeleton.scaleX,r=1/this.skeleton.scaleY;t*=s,l*=r;let o=t*t+l*l,a=0;o>1e-4?(o=Math.abs(t*i*r-e*s*l)/o,e=l*o,i=t*o,a=Math.atan2(l,t)*ft.radDeg):(t=0,l=0,a=90-Math.atan2(i,e)*ft.radDeg);const u=(n+x-a)*ft.degRad,f=(n+h-a+90)*ft.degRad,v=Math.cos(u)*m,c=Math.cos(f)*S,g=Math.sin(u)*m,p=Math.sin(f)*S;this.a=t*v-e*g,this.b=t*c-e*p,this.c=l*v+i*g,this.d=l*c+i*p;break}case 3:case 4:{n*=ft.degRad;const s=Math.cos(n),r=Math.sin(n);let o=(t*s+e*r)/this.skeleton.scaleX,a=(l*s+i*r)/this.skeleton.scaleY,u=Math.sqrt(o*o+a*a);u>1e-5&&(u=1/u),o*=u,a*=u,u=Math.sqrt(o*o+a*a),this.inherit==3&&t*i-e*l<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(u=-u),n=Math.PI/2+Math.atan2(a,o);const f=Math.cos(n)*u,v=Math.sin(n)*u;x*=ft.degRad,h=(90+h)*ft.degRad;const c=Math.cos(x)*m,g=Math.cos(h)*S,p=Math.sin(x)*m,T=Math.sin(h)*S;this.a=o*c+f*p,this.b=o*g+f*T,this.c=a*c+v*p,this.d=a*g+v*T;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let E=this.data;this.x=E.x,this.y=E.y,this.rotation=E.rotation,this.scaleX=E.scaleX,this.scaleY=E.scaleY,this.shearX=E.shearX,this.shearY=E.shearY,this.inherit=E.inherit}updateAppliedTransform(){let E=this.parent;if(!E){this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*ft.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*ft.radDeg;return}let y=E.a,n=E.b,m=E.c,S=E.d,x=1/(y*S-n*m),h=S*x,d=n*x,t=m*x,e=y*x,l=this.worldX-E.worldX,i=this.worldY-E.worldY;this.ax=l*h-i*d,this.ay=i*e-l*t;let s,r,o,a;if(this.inherit==1)s=this.a,r=this.b,o=this.c,a=this.d;else{switch(this.inherit){case 2:{let g=Math.abs(y*S-n*m)/(y*y+m*m);n=-m*this.skeleton.scaleX*g/this.skeleton.scaleY,S=y*this.skeleton.scaleY*g/this.skeleton.scaleX,x=1/(y*S-n*m),h=S*x,d=n*x;break}case 3:case 4:let u=ft.cosDeg(this.rotation),f=ft.sinDeg(this.rotation);y=(y*u+n*f)/this.skeleton.scaleX,m=(m*u+S*f)/this.skeleton.scaleY;let v=Math.sqrt(y*y+m*m);v>1e-5&&(v=1/v),y*=v,m*=v,v=Math.sqrt(y*y+m*m),this.inherit==3&&x<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(v=-v);let c=ft.PI/2+Math.atan2(m,y);n=Math.cos(c)*v,S=Math.sin(c)*v,x=1/(y*S-n*m),h=S*x,d=n*x,t=m*x,e=y*x}s=h*this.a-d*this.c,r=h*this.b-d*this.d,o=e*this.c-t*this.a,a=e*this.d-t*this.b}if(this.ashearX=0,this.ascaleX=Math.sqrt(s*s+o*o),this.ascaleX>1e-4){let u=s*a-r*o;this.ascaleY=u/this.ascaleX,this.ashearY=-Math.atan2(s*r+o*a,u)*ft.radDeg,this.arotation=Math.atan2(o,s)*ft.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(r*r+a*a),this.ashearY=0,this.arotation=90-Math.atan2(a,r)*ft.radDeg}getWorldRotationX(){return Math.atan2(this.c,this.a)*ft.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*ft.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}worldToLocal(E){let y=1/(this.a*this.d-this.b*this.c),n=E.x-this.worldX,m=E.y-this.worldY;return E.x=n*this.d*y-m*this.b*y,E.y=m*this.a*y-n*this.c*y,E}localToWorld(E){let y=E.x,n=E.y;return E.x=y*this.a+n*this.b+this.worldX,E.y=y*this.c+n*this.d+this.worldY,E}worldToParent(E){if(E==null)throw new Error("world cannot be null.");return this.parent==null?E:this.parent.worldToLocal(E)}parentToWorld(E){if(E==null)throw new Error("world cannot be null.");return this.parent==null?E:this.parent.localToWorld(E)}worldToLocalRotation(E){let y=ft.sinDeg(E),n=ft.cosDeg(E);return Math.atan2(this.a*y-this.c*n,this.d*n-this.b*y)*ft.radDeg+this.rotation-this.shearX}localToWorldRotation(E){E-=this.rotation-this.shearX;let y=ft.sinDeg(E),n=ft.cosDeg(E);return Math.atan2(n*this.c+y*this.d,n*this.a+y*this.b)*ft.radDeg}rotateWorld(E){E*=ft.degRad;const y=Math.sin(E),n=Math.cos(E),m=this.a,S=this.b;this.a=n*m-y*this.c,this.b=n*S-y*this.d,this.c=y*m+n*this.c,this.d=y*S+n*this.d}},ci=class{constructor(E,y,n){this.name=E,this.order=y,this.skinRequired=n}},en=class{constructor(y,n){$(this,"data");$(this,"intValue",0);$(this,"floatValue",0);$(this,"stringValue",null);$(this,"time",0);$(this,"volume",0);$(this,"balance",0);if(!n)throw new Error("data cannot be null.");this.time=y,this.data=n}},sn=class{constructor(E){$(this,"name");$(this,"intValue",0);$(this,"floatValue",0);$(this,"stringValue",null);$(this,"audioPath",null);$(this,"volume",0);$(this,"balance",0);this.name=E}},Vr=class{constructor(E,y){$(this,"data");$(this,"bones");$(this,"target");$(this,"bendDirection",0);$(this,"compress",!1);$(this,"stretch",!1);$(this,"mix",1);$(this,"softness",0);$(this,"active",!1);if(!E)throw new Error("data cannot be null.");if(!y)throw new Error("skeleton cannot be null.");this.data=E,this.bones=new Array;for(let m=0;m<E.bones.length;m++){let S=y.findBone(E.bones[m].name);if(!S)throw new Error(`Couldn't find bone ${E.bones[m].name}`);this.bones.push(S)}let n=y.findBone(E.target.name);if(!n)throw new Error(`Couldn't find bone ${E.target.name}`);this.target=n,this.mix=E.mix,this.softness=E.softness,this.bendDirection=E.bendDirection,this.compress=E.compress,this.stretch=E.stretch}isActive(){return this.active}setToSetupPose(){const E=this.data;this.mix=E.mix,this.softness=E.softness,this.bendDirection=E.bendDirection,this.compress=E.compress,this.stretch=E.stretch}update(E){if(this.mix==0)return;let y=this.target,n=this.bones;switch(n.length){case 1:this.apply1(n[0],y.worldX,y.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(n[0],n[1],y.worldX,y.worldY,this.bendDirection,this.stretch,this.data.uniform,this.softness,this.mix);break}}apply1(E,y,n,m,S,x,h){let d=E.parent;if(!d)throw new Error("IK bone must have parent.");let t=d.a,e=d.b,l=d.c,i=d.d,s=-E.ashearX-E.arotation,r=0,o=0;switch(E.inherit){case 1:r=(y-E.worldX)*ft.signum(E.skeleton.scaleX),o=(n-E.worldY)*ft.signum(E.skeleton.scaleY);break;case 2:let f=Math.abs(t*i-e*l)/Math.max(1e-4,t*t+l*l),v=t/E.skeleton.scaleX,c=l/E.skeleton.scaleY;e=-c*f*E.skeleton.scaleX,i=v*f*E.skeleton.scaleY,s+=Math.atan2(c,v)*ft.radDeg;default:let g=y-d.worldX,p=n-d.worldY,T=t*i-e*l;Math.abs(T)<=1e-4?(r=0,o=0):(r=(g*i-p*e)/T-E.ax,o=(p*t-g*l)/T-E.ay)}s+=Math.atan2(o,r)*ft.radDeg,E.ascaleX<0&&(s+=180),s>180?s-=360:s<-180&&(s+=360);let a=E.ascaleX,u=E.ascaleY;if(m||S){switch(E.inherit){case 3:case 4:r=y-E.worldX,o=n-E.worldY}const f=E.data.length*a;if(f>1e-4){const v=r*r+o*o;if(m&&v<f*f||S&&v>f*f){const c=(Math.sqrt(v)/f-1)*h+1;a*=c,x&&(u*=c)}}}E.updateWorldTransformWith(E.ax,E.ay,E.arotation+s*h,a,u,E.ashearX,E.ashearY)}apply2(E,y,n,m,S,x,h,d,t){if(E.inherit!=0||y.inherit!=0)return;let e=E.ax,l=E.ay,i=E.ascaleX,s=E.ascaleY,r=i,o=s,a=y.ascaleX,u=0,f=0,v=0;i<0?(i=-i,u=180,v=-1):(u=0,v=1),s<0&&(s=-s,v=-v),a<0?(a=-a,f=180):f=0;let c=y.ax,g=0,p=0,T=0,C=E.a,M=E.b,A=E.c,R=E.d,P=Math.abs(i-s)<=1e-4;!P||x?(g=0,p=C*c+E.worldX,T=A*c+E.worldY):(g=y.ay,p=C*c+M*g+E.worldX,T=A*c+R*g+E.worldY);let L=E.parent;if(!L)throw new Error("IK parent must itself have a parent.");C=L.a,M=L.b,A=L.c,R=L.d;let F=C*R-M*A,w=p-L.worldX,O=T-L.worldY;F=Math.abs(F)<=1e-4?0:1/F;let B=(w*R-O*M)*F-e,I=(O*C-w*A)*F-l,D=Math.sqrt(B*B+I*I),N=y.data.length*a,z,V;if(D<1e-4){this.apply1(E,n,m,!1,x,!1,t),y.updateWorldTransformWith(c,g,0,y.ascaleX,y.ascaleY,y.ashearX,y.ashearY);return}w=n-L.worldX,O=m-L.worldY;let U=(w*R-O*M)*F-e,G=(O*C-w*A)*F-l,b=U*U+G*G;if(d!=0){d*=i*(a+1)*.5;let H=Math.sqrt(b),X=H-D-N*i+d;if(X>0){let K=Math.min(1,X/(d*2))-1;K=(X-d*(1-K*K))/H,U-=K*U,G-=K*G,b=U*U+G*G}}t:if(P){N*=i;let H=(b-D*D-N*N)/(2*D*N);H<-1?(H=-1,V=Math.PI*S):H>1?(H=1,V=0,x&&(C=(Math.sqrt(b)/(D+N)-1)*t+1,r*=C,h&&(o*=C))):V=Math.acos(H)*S,C=D+N*H,M=N*Math.sin(V),z=Math.atan2(G*C-U*M,U*C+G*M)}else{C=i*N,M=s*N;let H=C*C,X=M*M,K=Math.atan2(G,U);A=X*D*D+H*b-H*X;let Z=-2*X*D,Q=X-H;if(R=Z*Z-4*Q*A,R>=0){let ht=Math.sqrt(R);Z<0&&(ht=-ht),ht=-(Z+ht)*.5;let ot=ht/Q,nt=A/ht,it=Math.abs(ot)<Math.abs(nt)?ot:nt;if(ot=b-it*it,ot>=0){O=Math.sqrt(ot)*S,z=K-Math.atan2(O,it),V=Math.atan2(O/s,(it-D)/i);break t}}let j=ft.PI,J=D-C,tt=J*J,k=0,q=0,_=D+C,rt=_*_,at=0;A=-C*D/(H-X),A>=-1&&A<=1&&(A=Math.acos(A),w=C*Math.cos(A)+D,O=M*Math.sin(A),R=w*w+O*O,R<tt&&(j=A,tt=R,J=w,k=O),R>rt&&(q=A,rt=R,_=w,at=O)),b<=(tt+rt)*.5?(z=K-Math.atan2(k*S,J),V=j*S):(z=K-Math.atan2(at*S,_),V=q*S)}let Y=Math.atan2(g,c)*v,W=E.arotation;z=(z-Y)*ft.radDeg+u-W,z>180?z-=360:z<-180&&(z+=360),E.updateWorldTransformWith(e,l,W+z*t,r,o,0,0),W=y.arotation,V=((V+Y)*ft.radDeg-y.ashearX)*v+f-W,V>180?V-=360:V<-180&&(V+=360),y.updateWorldTransformWith(c,g,W+V*t,y.ascaleX,y.ascaleY,y.ashearX,y.ashearY)}},nn=class extends ci{constructor(y){super(y,0,!1);$(this,"bones",new Array);$(this,"_target",null);$(this,"bendDirection",0);$(this,"compress",!1);$(this,"stretch",!1);$(this,"uniform",!1);$(this,"mix",0);$(this,"softness",0)}set target(y){this._target=y}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},rn=class extends ci{constructor(y){super(y,0,!1);$(this,"bones",new Array);$(this,"_target",null);$(this,"positionMode",0);$(this,"spacingMode",1);$(this,"rotateMode",1);$(this,"offsetRotation",0);$(this,"position",0);$(this,"spacing",0);$(this,"mixRotate",0);$(this,"mixX",0);$(this,"mixY",0)}set target(y){this._target=y}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},an=(E=>(E[E.Fixed=0]="Fixed",E[E.Percent=1]="Percent",E))(an||{}),on=(E=>(E[E.Length=0]="Length",E[E.Fixed=1]="Fixed",E[E.Percent=2]="Percent",E[E.Proportional=3]="Proportional",E))(on||{}),hn=(E=>(E[E.Tangent=0]="Tangent",E[E.Chain=1]="Chain",E[E.ChainScale=2]="ChainScale",E))(hn||{}),he,Xr=(he=class{constructor(y,n){$(this,"data");$(this,"bones");$(this,"target");$(this,"position",0);$(this,"spacing",0);$(this,"mixRotate",0);$(this,"mixX",0);$(this,"mixY",0);$(this,"spaces",new Array);$(this,"positions",new Array);$(this,"world",new Array);$(this,"curves",new Array);$(this,"lengths",new Array);$(this,"segments",new Array);$(this,"active",!1);if(!y)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=y,this.bones=new Array;for(let S=0,x=y.bones.length;S<x;S++){let h=n.findBone(y.bones[S].name);if(!h)throw new Error(`Couldn't find bone ${y.bones[S].name}.`);this.bones.push(h)}let m=n.findSlot(y.target.name);if(!m)throw new Error(`Couldn't find target bone ${y.target.name}`);this.target=m,this.position=y.position,this.spacing=y.spacing,this.mixRotate=y.mixRotate,this.mixX=y.mixX,this.mixY=y.mixY}isActive(){return this.active}setToSetupPose(){const y=this.data;this.position=y.position,this.spacing=y.spacing,this.mixRotate=y.mixRotate,this.mixX=y.mixX,this.mixY=y.mixY}update(y){let n=this.target.getAttachment();if(!(n instanceof ei))return;let m=this.mixRotate,S=this.mixX,x=this.mixY;if(m==0&&S==0&&x==0)return;let h=this.data,d=h.rotateMode==0,t=h.rotateMode==2,e=this.bones,l=e.length,i=d?l:l+1,s=ut.setArraySize(this.spaces,i),r=t?this.lengths=ut.setArraySize(this.lengths,l):[],o=this.spacing;switch(h.spacingMode){case 2:if(t)for(let T=0,C=i-1;T<C;T++){let M=e[T],A=M.data.length,R=A*M.a,P=A*M.c;r[T]=Math.sqrt(R*R+P*P)}ut.arrayFill(s,1,i,o);break;case 3:let g=0;for(let T=0,C=i-1;T<C;){let M=e[T],A=M.data.length;if(A<he.epsilon)t&&(r[T]=0),s[++T]=o;else{let R=A*M.a,P=A*M.c,L=Math.sqrt(R*R+P*P);t&&(r[T]=L),s[++T]=L,g+=L}}if(g>0){g=i/g*o;for(let T=1;T<i;T++)s[T]*=g}break;default:let p=h.spacingMode==0;for(let T=0,C=i-1;T<C;){let M=e[T],A=M.data.length;if(A<he.epsilon)t&&(r[T]=0),s[++T]=o;else{let R=A*M.a,P=A*M.c,L=Math.sqrt(R*R+P*P);t&&(r[T]=L),s[++T]=(p?A+o:o)*L/A}}}let a=this.computeWorldPositions(n,i,d),u=a[0],f=a[1],v=h.offsetRotation,c=!1;if(v==0)c=h.rotateMode==1;else{c=!1;let g=this.target.bone;v*=g.a*g.d-g.b*g.c>0?ft.degRad:-.01745329277777778}for(let g=0,p=3;g<l;g++,p+=3){let T=e[g];T.worldX+=(u-T.worldX)*S,T.worldY+=(f-T.worldY)*x;let C=a[p],M=a[p+1],A=C-u,R=M-f;if(t){let P=r[g];if(P!=0){let L=(Math.sqrt(A*A+R*R)/P-1)*m+1;T.a*=L,T.c*=L}}if(u=C,f=M,m>0){let P=T.a,L=T.b,F=T.c,w=T.d,O=0,B=0,I=0;if(d?O=a[p-1]:s[g+1]==0?O=a[p+2]:O=Math.atan2(R,A),O-=Math.atan2(F,P),c){B=Math.cos(O),I=Math.sin(O);let D=T.data.length;u+=(D*(B*P-I*F)-A)*m,f+=(D*(I*P+B*F)-R)*m}else O+=v;O>ft.PI?O-=ft.PI2:O<-3.1415927&&(O+=ft.PI2),O*=m,B=Math.cos(O),I=Math.sin(O),T.a=B*P-I*F,T.b=B*L-I*w,T.c=I*P+B*F,T.d=I*L+B*w}T.updateAppliedTransform()}}computeWorldPositions(y,n,m){let S=this.target,x=this.position,h=this.spaces,d=ut.setArraySize(this.positions,n*3+2),t=this.world,e=y.closed,l=y.worldVerticesLength,i=l/6,s=he.NONE;if(!y.constantSpeed){let D=y.lengths;i-=e?1:2;let N=D[i];this.data.positionMode==1&&(x*=N);let z;switch(this.data.spacingMode){case 2:z=N;break;case 3:z=N/n;break;default:z=1}t=ut.setArraySize(this.world,8);for(let V=0,U=0,G=0;V<n;V++,U+=3){let b=h[V]*z;x+=b;let Y=x;if(e)Y%=N,Y<0&&(Y+=N),G=0;else if(Y<0){s!=he.BEFORE&&(s=he.BEFORE,y.computeWorldVertices(S,2,4,t,0,2)),this.addBeforePosition(Y,t,0,d,U);continue}else if(Y>N){s!=he.AFTER&&(s=he.AFTER,y.computeWorldVertices(S,l-6,4,t,0,2)),this.addAfterPosition(Y-N,t,0,d,U);continue}for(;;G++){let W=D[G];if(!(Y>W)){if(G==0)Y/=W;else{let H=D[G-1];Y=(Y-H)/(W-H)}break}}G!=s&&(s=G,e&&G==i?(y.computeWorldVertices(S,l-4,4,t,0,2),y.computeWorldVertices(S,0,4,t,4,2)):y.computeWorldVertices(S,G*6+2,8,t,0,2)),this.addCurvePosition(Y,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],d,U,m||V>0&&b==0)}return d}e?(l+=2,t=ut.setArraySize(this.world,l),y.computeWorldVertices(S,2,l-4,t,0,2),y.computeWorldVertices(S,0,2,t,l-4,2),t[l-2]=t[0],t[l-1]=t[1]):(i--,l-=4,t=ut.setArraySize(this.world,l),y.computeWorldVertices(S,2,l,t,0,2));let r=ut.setArraySize(this.curves,i),o=0,a=t[0],u=t[1],f=0,v=0,c=0,g=0,p=0,T=0,C=0,M=0,A=0,R=0,P=0,L=0,F=0,w=0;for(let D=0,N=2;D<i;D++,N+=6)f=t[N],v=t[N+1],c=t[N+2],g=t[N+3],p=t[N+4],T=t[N+5],C=(a-f*2+c)*.1875,M=(u-v*2+g)*.1875,A=((f-c)*3-a+p)*.09375,R=((v-g)*3-u+T)*.09375,P=C*2+A,L=M*2+R,F=(f-a)*.75+C+A*.16666667,w=(v-u)*.75+M+R*.16666667,o+=Math.sqrt(F*F+w*w),F+=P,w+=L,P+=A,L+=R,o+=Math.sqrt(F*F+w*w),F+=P,w+=L,o+=Math.sqrt(F*F+w*w),F+=P+A,w+=L+R,o+=Math.sqrt(F*F+w*w),r[D]=o,a=p,u=T;this.data.positionMode==1&&(x*=o);let O;switch(this.data.spacingMode){case 2:O=o;break;case 3:O=o/n;break;default:O=1}let B=this.segments,I=0;for(let D=0,N=0,z=0,V=0;D<n;D++,N+=3){let U=h[D]*O;x+=U;let G=x;if(e)G%=o,G<0&&(G+=o),z=0;else if(G<0){this.addBeforePosition(G,t,0,d,N);continue}else if(G>o){this.addAfterPosition(G-o,t,l-4,d,N);continue}for(;;z++){let b=r[z];if(!(G>b)){if(z==0)G/=b;else{let Y=r[z-1];G=(G-Y)/(b-Y)}break}}if(z!=s){s=z;let b=z*6;for(a=t[b],u=t[b+1],f=t[b+2],v=t[b+3],c=t[b+4],g=t[b+5],p=t[b+6],T=t[b+7],C=(a-f*2+c)*.03,M=(u-v*2+g)*.03,A=((f-c)*3-a+p)*.006,R=((v-g)*3-u+T)*.006,P=C*2+A,L=M*2+R,F=(f-a)*.3+C+A*.16666667,w=(v-u)*.3+M+R*.16666667,I=Math.sqrt(F*F+w*w),B[0]=I,b=1;b<8;b++)F+=P,w+=L,P+=A,L+=R,I+=Math.sqrt(F*F+w*w),B[b]=I;F+=P,w+=L,I+=Math.sqrt(F*F+w*w),B[8]=I,F+=P+A,w+=L+R,I+=Math.sqrt(F*F+w*w),B[9]=I,V=0}for(G*=I;;V++){let b=B[V];if(!(G>b)){if(V==0)G/=b;else{let Y=B[V-1];G=V+(G-Y)/(b-Y)}break}}this.addCurvePosition(G*.1,a,u,f,v,c,g,p,T,d,N,m||D>0&&U==0)}return d}addBeforePosition(y,n,m,S,x){let h=n[m],d=n[m+1],t=n[m+2]-h,e=n[m+3]-d,l=Math.atan2(e,t);S[x]=h+y*Math.cos(l),S[x+1]=d+y*Math.sin(l),S[x+2]=l}addAfterPosition(y,n,m,S,x){let h=n[m+2],d=n[m+3],t=h-n[m],e=d-n[m+1],l=Math.atan2(e,t);S[x]=h+y*Math.cos(l),S[x+1]=d+y*Math.sin(l),S[x+2]=l}addCurvePosition(y,n,m,S,x,h,d,t,e,l,i,s){if(y==0||isNaN(y)){l[i]=n,l[i+1]=m,l[i+2]=Math.atan2(x-m,S-n);return}let r=y*y,o=r*y,a=1-y,u=a*a,f=u*a,v=a*y,c=v*3,g=a*c,p=c*y,T=n*f+S*g+h*p+t*o,C=m*f+x*g+d*p+e*o;l[i]=T,l[i+1]=C,s&&(y<.001?l[i+2]=Math.atan2(x-m,S-n):l[i+2]=Math.atan2(C-(m*u+x*v*2+d*r),T-(n*u+S*v*2+h*r)))}},$(he,"NONE",-1),$(he,"BEFORE",-2),$(he,"AFTER",-3),$(he,"epsilon",1e-5),he),Wr=class{constructor(E,y){$(this,"data");$(this,"_bone",null);$(this,"inertia",0);$(this,"strength",0);$(this,"damping",0);$(this,"massInverse",0);$(this,"wind",0);$(this,"gravity",0);$(this,"mix",0);$(this,"_reset",!0);$(this,"ux",0);$(this,"uy",0);$(this,"cx",0);$(this,"cy",0);$(this,"tx",0);$(this,"ty",0);$(this,"xOffset",0);$(this,"xVelocity",0);$(this,"yOffset",0);$(this,"yVelocity",0);$(this,"rotateOffset",0);$(this,"rotateVelocity",0);$(this,"scaleOffset",0);$(this,"scaleVelocity",0);$(this,"active",!1);$(this,"skeleton");$(this,"remaining",0);$(this,"lastTime",0);this.data=E,this.skeleton=y,this.bone=y.bones[E.bone.index],this.inertia=E.inertia,this.strength=E.strength,this.damping=E.damping,this.massInverse=E.massInverse,this.wind=E.wind,this.gravity=E.gravity,this.mix=E.mix}set bone(E){this._bone=E}get bone(){if(this._bone)return this._bone;throw new Error("Bone not set.")}reset(){this.remaining=0,this.lastTime=this.skeleton.time,this._reset=!0,this.xOffset=0,this.xVelocity=0,this.yOffset=0,this.yVelocity=0,this.rotateOffset=0,this.rotateVelocity=0,this.scaleOffset=0,this.scaleVelocity=0}setToSetupPose(){const E=this.data;this.inertia=E.inertia,this.strength=E.strength,this.damping=E.damping,this.massInverse=E.massInverse,this.wind=E.wind,this.gravity=E.gravity,this.mix=E.mix}isActive(){return this.active}update(E){const y=this.mix;if(y==0)return;const n=this.data.x>0,m=this.data.y>0,S=this.data.rotate>0||this.data.shearX>0,x=this.data.scaleX>0,h=this.bone,d=h.data.length;switch(E){case 0:return;case 1:this.reset();case 2:const t=this.skeleton,e=Math.max(this.skeleton.time-this.lastTime,0);this.remaining+=e,this.lastTime=t.time;const l=h.worldX,i=h.worldY;if(this._reset)this._reset=!1,this.ux=l,this.uy=i;else{let s=this.remaining,r=this.inertia,o=this.data.step,a=this.skeleton.data.referenceScale,u=-1,f=this.data.limit*e,v=f*Math.abs(t.scaleY);if(f*=Math.abs(t.scaleX),n||m){if(n){const c=(this.ux-l)*r;this.xOffset+=c>f?f:c<-f?-f:c,this.ux=l}if(m){const c=(this.uy-i)*r;this.yOffset+=c>v?v:c<-v?-v:c,this.uy=i}if(s>=o){u=Math.pow(this.damping,60*o);const c=this.massInverse*o,g=this.strength,p=this.wind*a*t.scaleX,T=this.gravity*a*t.scaleY;do n&&(this.xVelocity+=(p-this.xOffset*g)*c,this.xOffset+=this.xVelocity*o,this.xVelocity*=u),m&&(this.yVelocity-=(T+this.yOffset*g)*c,this.yOffset+=this.yVelocity*o,this.yVelocity*=u),s-=o;while(s>=o)}n&&(h.worldX+=this.xOffset*y*this.data.x),m&&(h.worldY+=this.yOffset*y*this.data.y)}if(S||x){let c=Math.atan2(h.c,h.a),g=0,p=0,T=0,C=this.cx-h.worldX,M=this.cy-h.worldY;if(C>f?C=f:C<-f&&(C=-f),M>v?M=v:M<-v&&(M=-v),S){T=(this.data.rotate+this.data.shearX)*y;let A=Math.atan2(M+this.ty,C+this.tx)-c-this.rotateOffset*T;this.rotateOffset+=(A-Math.ceil(A*ft.invPI2-.5)*ft.PI2)*r,A=this.rotateOffset*T+c,g=Math.cos(A),p=Math.sin(A),x&&(A=d*h.getWorldScaleX(),A>0&&(this.scaleOffset+=(C*g+M*p)*r/A))}else{g=Math.cos(c),p=Math.sin(c);const A=d*h.getWorldScaleX();A>0&&(this.scaleOffset+=(C*g+M*p)*r/A)}if(s=this.remaining,s>=o){u==-1&&(u=Math.pow(this.damping,60*o));const A=this.massInverse*o,R=this.strength,P=this.wind,L=pi.yDown?-this.gravity:this.gravity,F=d/a;for(;;)if(s-=o,x&&(this.scaleVelocity+=(P*g-L*p-this.scaleOffset*R)*A,this.scaleOffset+=this.scaleVelocity*o,this.scaleVelocity*=u),S){if(this.rotateVelocity-=((P*p+L*g)*F+this.rotateOffset*R)*A,this.rotateOffset+=this.rotateVelocity*o,this.rotateVelocity*=u,s<o)break;const w=this.rotateOffset*T+c;g=Math.cos(w),p=Math.sin(w)}else if(s<o)break}}this.remaining=s}this.cx=h.worldX,this.cy=h.worldY;break;case 3:n&&(h.worldX+=this.xOffset*y*this.data.x),m&&(h.worldY+=this.yOffset*y*this.data.y)}if(S){let t=this.rotateOffset*y,e=0,l=0,i=0;if(this.data.shearX>0){let s=0;this.data.rotate>0&&(s=t*this.data.rotate,e=Math.sin(s),l=Math.cos(s),i=h.b,h.b=l*i-e*h.d,h.d=e*i+l*h.d),s+=t*this.data.shearX,e=Math.sin(s),l=Math.cos(s),i=h.a,h.a=l*i-e*h.c,h.c=e*i+l*h.c}else t*=this.data.rotate,e=Math.sin(t),l=Math.cos(t),i=h.a,h.a=l*i-e*h.c,h.c=e*i+l*h.c,i=h.b,h.b=l*i-e*h.d,h.d=e*i+l*h.d}if(x){const t=1+this.scaleOffset*y*this.data.scaleX;h.a*=t,h.c*=t}E!=3&&(this.tx=d*h.a,this.ty=d*h.c),h.updateAppliedTransform()}translate(E,y){this.ux-=E,this.uy-=y,this.cx-=E,this.cy-=y}rotate(E,y,n){const m=n*ft.degRad,S=Math.cos(m),x=Math.sin(m),h=this.cx-E,d=this.cy-y;this.translate(h*S-d*x-h,h*x+d*S-d)}},Hr=class{constructor(E,y){$(this,"data");$(this,"bone");$(this,"color");$(this,"darkColor",null);$(this,"attachment",null);$(this,"attachmentState",0);$(this,"sequenceIndex",-1);$(this,"deform",new Array);if(!E)throw new Error("data cannot be null.");if(!y)throw new Error("bone cannot be null.");this.data=E,this.bone=y,this.color=new It,this.darkColor=E.darkColor?new It:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(E){this.attachment!=E&&((!(E instanceof Ne)||!(this.attachment instanceof Ne)||E.timelineAttachment!=this.attachment.timelineAttachment)&&(this.deform.length=0),this.attachment=E,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Kr=class{constructor(E,y){$(this,"data");$(this,"bones");$(this,"target");$(this,"mixRotate",0);$(this,"mixX",0);$(this,"mixY",0);$(this,"mixScaleX",0);$(this,"mixScaleY",0);$(this,"mixShearY",0);$(this,"temp",new qe);$(this,"active",!1);if(!E)throw new Error("data cannot be null.");if(!y)throw new Error("skeleton cannot be null.");this.data=E,this.bones=new Array;for(let m=0;m<E.bones.length;m++){let S=y.findBone(E.bones[m].name);if(!S)throw new Error(`Couldn't find bone ${E.bones[m].name}.`);this.bones.push(S)}let n=y.findBone(E.target.name);if(!n)throw new Error(`Couldn't find target bone ${E.target.name}.`);this.target=n,this.mixRotate=E.mixRotate,this.mixX=E.mixX,this.mixY=E.mixY,this.mixScaleX=E.mixScaleX,this.mixScaleY=E.mixScaleY,this.mixShearY=E.mixShearY}isActive(){return this.active}setToSetupPose(){const E=this.data;this.mixRotate=E.mixRotate,this.mixX=E.mixX,this.mixY=E.mixY,this.mixScaleX=E.mixScaleX,this.mixScaleY=E.mixScaleY,this.mixShearY=E.mixShearY}update(E){this.mixRotate==0&&this.mixX==0&&this.mixY==0&&this.mixScaleX==0&&this.mixScaleY==0&&this.mixShearY==0||(this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld())}applyAbsoluteWorld(){let E=this.mixRotate,y=this.mixX,n=this.mixY,m=this.mixScaleX,S=this.mixScaleY,x=this.mixShearY,h=y!=0||n!=0,d=this.target,t=d.a,e=d.b,l=d.c,i=d.d,s=t*i-e*l>0?ft.degRad:-.01745329277777778,r=this.data.offsetRotation*s,o=this.data.offsetShearY*s,a=this.bones;for(let u=0,f=a.length;u<f;u++){let v=a[u];if(E!=0){let c=v.a,g=v.b,p=v.c,T=v.d,C=Math.atan2(l,t)-Math.atan2(p,c)+r;C>ft.PI?C-=ft.PI2:C<-3.1415927&&(C+=ft.PI2),C*=E;let M=Math.cos(C),A=Math.sin(C);v.a=M*c-A*p,v.b=M*g-A*T,v.c=A*c+M*p,v.d=A*g+M*T}if(h){let c=this.temp;d.localToWorld(c.set(this.data.offsetX,this.data.offsetY)),v.worldX+=(c.x-v.worldX)*y,v.worldY+=(c.y-v.worldY)*n}if(m!=0){let c=Math.sqrt(v.a*v.a+v.c*v.c);c!=0&&(c=(c+(Math.sqrt(t*t+l*l)-c+this.data.offsetScaleX)*m)/c),v.a*=c,v.c*=c}if(S!=0){let c=Math.sqrt(v.b*v.b+v.d*v.d);c!=0&&(c=(c+(Math.sqrt(e*e+i*i)-c+this.data.offsetScaleY)*S)/c),v.b*=c,v.d*=c}if(x>0){let c=v.b,g=v.d,p=Math.atan2(g,c),T=Math.atan2(i,e)-Math.atan2(l,t)-(p-Math.atan2(v.c,v.a));T>ft.PI?T-=ft.PI2:T<-3.1415927&&(T+=ft.PI2),T=p+(T+o)*x;let C=Math.sqrt(c*c+g*g);v.b=Math.cos(T)*C,v.d=Math.sin(T)*C}v.updateAppliedTransform()}}applyRelativeWorld(){let E=this.mixRotate,y=this.mixX,n=this.mixY,m=this.mixScaleX,S=this.mixScaleY,x=this.mixShearY,h=y!=0||n!=0,d=this.target,t=d.a,e=d.b,l=d.c,i=d.d,s=t*i-e*l>0?ft.degRad:-.01745329277777778,r=this.data.offsetRotation*s,o=this.data.offsetShearY*s,a=this.bones;for(let u=0,f=a.length;u<f;u++){let v=a[u];if(E!=0){let c=v.a,g=v.b,p=v.c,T=v.d,C=Math.atan2(l,t)+r;C>ft.PI?C-=ft.PI2:C<-3.1415927&&(C+=ft.PI2),C*=E;let M=Math.cos(C),A=Math.sin(C);v.a=M*c-A*p,v.b=M*g-A*T,v.c=A*c+M*p,v.d=A*g+M*T}if(h){let c=this.temp;d.localToWorld(c.set(this.data.offsetX,this.data.offsetY)),v.worldX+=c.x*y,v.worldY+=c.y*n}if(m!=0){let c=(Math.sqrt(t*t+l*l)-1+this.data.offsetScaleX)*m+1;v.a*=c,v.c*=c}if(S!=0){let c=(Math.sqrt(e*e+i*i)-1+this.data.offsetScaleY)*S+1;v.b*=c,v.d*=c}if(x>0){let c=Math.atan2(i,e)-Math.atan2(l,t);c>ft.PI?c-=ft.PI2:c<-3.1415927&&(c+=ft.PI2);let g=v.b,p=v.d;c=Math.atan2(p,g)+(c-ft.PI/2+o)*x;let T=Math.sqrt(g*g+p*p);v.b=Math.cos(c)*T,v.d=Math.sin(c)*T}v.updateAppliedTransform()}}applyAbsoluteLocal(){let E=this.mixRotate,y=this.mixX,n=this.mixY,m=this.mixScaleX,S=this.mixScaleY,x=this.mixShearY,h=this.target,d=this.bones;for(let t=0,e=d.length;t<e;t++){let l=d[t],i=l.arotation;E!=0&&(i+=(h.arotation-i+this.data.offsetRotation)*E);let s=l.ax,r=l.ay;s+=(h.ax-s+this.data.offsetX)*y,r+=(h.ay-r+this.data.offsetY)*n;let o=l.ascaleX,a=l.ascaleY;m!=0&&o!=0&&(o=(o+(h.ascaleX-o+this.data.offsetScaleX)*m)/o),S!=0&&a!=0&&(a=(a+(h.ascaleY-a+this.data.offsetScaleY)*S)/a);let u=l.ashearY;x!=0&&(u+=(h.ashearY-u+this.data.offsetShearY)*x),l.updateWorldTransformWith(s,r,i,o,a,l.ashearX,u)}}applyRelativeLocal(){let E=this.mixRotate,y=this.mixX,n=this.mixY,m=this.mixScaleX,S=this.mixScaleY,x=this.mixShearY,h=this.target,d=this.bones;for(let t=0,e=d.length;t<e;t++){let l=d[t],i=l.arotation+(h.arotation+this.data.offsetRotation)*E,s=l.ax+(h.ax+this.data.offsetX)*y,r=l.ay+(h.ay+this.data.offsetY)*n,o=l.ascaleX*((h.ascaleX-1+this.data.offsetScaleX)*m+1),a=l.ascaleY*((h.ascaleY-1+this.data.offsetScaleY)*S+1),u=l.ashearY+(h.ashearY+this.data.offsetShearY)*x;l.updateWorldTransformWith(s,r,i,o,a,l.ashearX,u)}}},we,pi=(we=class{constructor(y){$(this,"data");$(this,"bones");$(this,"slots");$(this,"drawOrder");$(this,"ikConstraints");$(this,"transformConstraints");$(this,"pathConstraints");$(this,"physicsConstraints");$(this,"_updateCache",new Array);$(this,"skin",null);$(this,"color");$(this,"scaleX",1);$(this,"_scaleY",1);$(this,"x",0);$(this,"y",0);$(this,"time",0);if(!y)throw new Error("data cannot be null.");this.data=y,this.bones=new Array;for(let n=0;n<y.bones.length;n++){let m=y.bones[n],S;if(!m.parent)S=new Qi(m,this,null);else{let x=this.bones[m.parent.index];S=new Qi(m,this,x),x.children.push(S)}this.bones.push(S)}this.slots=new Array,this.drawOrder=new Array;for(let n=0;n<y.slots.length;n++){let m=y.slots[n],S=this.bones[m.boneData.index],x=new Hr(m,S);this.slots.push(x),this.drawOrder.push(x)}this.ikConstraints=new Array;for(let n=0;n<y.ikConstraints.length;n++){let m=y.ikConstraints[n];this.ikConstraints.push(new Vr(m,this))}this.transformConstraints=new Array;for(let n=0;n<y.transformConstraints.length;n++){let m=y.transformConstraints[n];this.transformConstraints.push(new Kr(m,this))}this.pathConstraints=new Array;for(let n=0;n<y.pathConstraints.length;n++){let m=y.pathConstraints[n];this.pathConstraints.push(new Xr(m,this))}this.physicsConstraints=new Array;for(let n=0;n<y.physicsConstraints.length;n++){let m=y.physicsConstraints[n];this.physicsConstraints.push(new Wr(m,this))}this.color=new It(1,1,1,1),this.updateCache()}get scaleY(){return we.yDown?-this._scaleY:this._scaleY}set scaleY(y){this._scaleY=y}updateCache(){let y=this._updateCache;y.length=0;let n=this.bones;for(let s=0,r=n.length;s<r;s++){let o=n[s];o.sorted=o.data.skinRequired,o.active=!o.sorted}if(this.skin){let s=this.skin.bones;for(let r=0,o=this.skin.bones.length;r<o;r++){let a=this.bones[s[r].index];do a.sorted=!1,a.active=!0,a=a.parent;while(a)}}let m=this.ikConstraints,S=this.transformConstraints,x=this.pathConstraints,h=this.physicsConstraints,d=m.length,t=S.length,e=x.length,l=this.physicsConstraints.length,i=d+t+e+l;t:for(let s=0;s<i;s++){for(let r=0;r<d;r++){let o=m[r];if(o.data.order==s){this.sortIkConstraint(o);continue t}}for(let r=0;r<t;r++){let o=S[r];if(o.data.order==s){this.sortTransformConstraint(o);continue t}}for(let r=0;r<e;r++){let o=x[r];if(o.data.order==s){this.sortPathConstraint(o);continue t}}for(let r=0;r<l;r++){const o=h[r];if(o.data.order==s){this.sortPhysicsConstraint(o);continue t}}}for(let s=0,r=n.length;s<r;s++)this.sortBone(n[s])}sortIkConstraint(y){if(y.active=y.target.isActive()&&(!y.data.skinRequired||this.skin&&ut.contains(this.skin.constraints,y.data,!0)),!y.active)return;let n=y.target;this.sortBone(n);let m=y.bones,S=m[0];if(this.sortBone(S),m.length==1)this._updateCache.push(y),this.sortReset(S.children);else{let x=m[m.length-1];this.sortBone(x),this._updateCache.push(y),this.sortReset(S.children),x.sorted=!0}}sortPathConstraint(y){if(y.active=y.target.bone.isActive()&&(!y.data.skinRequired||this.skin&&ut.contains(this.skin.constraints,y.data,!0)),!y.active)return;let n=y.target,m=n.data.index,S=n.bone;this.skin&&this.sortPathConstraintAttachment(this.skin,m,S),this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,m,S);for(let t=0,e=this.data.skins.length;t<e;t++)this.sortPathConstraintAttachment(this.data.skins[t],m,S);let x=n.getAttachment();x instanceof ei&&this.sortPathConstraintAttachmentWith(x,S);let h=y.bones,d=h.length;for(let t=0;t<d;t++)this.sortBone(h[t]);this._updateCache.push(y);for(let t=0;t<d;t++)this.sortReset(h[t].children);for(let t=0;t<d;t++)h[t].sorted=!0}sortTransformConstraint(y){if(y.active=y.target.isActive()&&(!y.data.skinRequired||this.skin&&ut.contains(this.skin.constraints,y.data,!0)),!y.active)return;this.sortBone(y.target);let n=y.bones,m=n.length;if(y.data.local)for(let S=0;S<m;S++){let x=n[S];this.sortBone(x.parent),this.sortBone(x)}else for(let S=0;S<m;S++)this.sortBone(n[S]);this._updateCache.push(y);for(let S=0;S<m;S++)this.sortReset(n[S].children);for(let S=0;S<m;S++)n[S].sorted=!0}sortPathConstraintAttachment(y,n,m){let S=y.attachments[n];if(S)for(let x in S)this.sortPathConstraintAttachmentWith(S[x],m)}sortPathConstraintAttachmentWith(y,n){if(!(y instanceof ei))return;let m=y.bones;if(!m)this.sortBone(n);else{let S=this.bones;for(let x=0,h=m.length;x<h;){let d=m[x++];for(d+=x;x<d;)this.sortBone(S[m[x++]])}}}sortPhysicsConstraint(y){const n=y.bone;y.active=n.active&&(!y.data.skinRequired||this.skin!=null&&ut.contains(this.skin.constraints,y.data,!0)),y.active&&(this.sortBone(n),this._updateCache.push(y),this.sortReset(n.children),n.sorted=!0)}sortBone(y){if(!y||y.sorted)return;let n=y.parent;n&&this.sortBone(n),y.sorted=!0,this._updateCache.push(y)}sortReset(y){for(let n=0,m=y.length;n<m;n++){let S=y[n];S.active&&(S.sorted&&this.sortReset(S.children),S.sorted=!1)}}updateWorldTransform(y){if(y==null)throw new Error("physics is undefined");let n=this.bones;for(let S=0,x=n.length;S<x;S++){let h=n[S];h.ax=h.x,h.ay=h.y,h.arotation=h.rotation,h.ascaleX=h.scaleX,h.ascaleY=h.scaleY,h.ashearX=h.shearX,h.ashearY=h.shearY}let m=this._updateCache;for(let S=0,x=m.length;S<x;S++)m[S].update(y)}updateWorldTransformWith(y,n){if(!n)throw new Error("parent cannot be null.");let m=this.bones;for(let u=1,f=m.length;u<f;u++){let v=m[u];v.ax=v.x,v.ay=v.y,v.arotation=v.rotation,v.ascaleX=v.scaleX,v.ascaleY=v.scaleY,v.ashearX=v.shearX,v.ashearY=v.shearY}let S=this.getRootBone();if(!S)throw new Error("Root bone must not be null.");let x=n.a,h=n.b,d=n.c,t=n.d;S.worldX=x*this.x+h*this.y+n.worldX,S.worldY=d*this.x+t*this.y+n.worldY;const e=(S.rotation+S.shearX)*ft.degRad,l=(S.rotation+90+S.shearY)*ft.degRad,i=Math.cos(e)*S.scaleX,s=Math.cos(l)*S.scaleY,r=Math.sin(e)*S.scaleX,o=Math.sin(l)*S.scaleY;S.a=(x*i+h*r)*this.scaleX,S.b=(x*s+h*o)*this.scaleX,S.c=(d*i+t*r)*this.scaleY,S.d=(d*s+t*o)*this.scaleY;let a=this._updateCache;for(let u=0,f=a.length;u<f;u++){let v=a[u];v!=S&&v.update(y)}}setToSetupPose(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()}setBonesToSetupPose(){for(const y of this.bones)y.setToSetupPose();for(const y of this.ikConstraints)y.setToSetupPose();for(const y of this.transformConstraints)y.setToSetupPose();for(const y of this.pathConstraints)y.setToSetupPose();for(const y of this.physicsConstraints)y.setToSetupPose()}setSlotsToSetupPose(){let y=this.slots;ut.arrayCopy(y,0,this.drawOrder,0,y.length);for(let n=0,m=y.length;n<m;n++)y[n].setToSetupPose()}getRootBone(){return this.bones.length==0?null:this.bones[0]}findBone(y){if(!y)throw new Error("boneName cannot be null.");let n=this.bones;for(let m=0,S=n.length;m<S;m++){let x=n[m];if(x.data.name==y)return x}return null}findSlot(y){if(!y)throw new Error("slotName cannot be null.");let n=this.slots;for(let m=0,S=n.length;m<S;m++){let x=n[m];if(x.data.name==y)return x}return null}setSkinByName(y){let n=this.data.findSkin(y);if(!n)throw new Error("Skin not found: "+y);this.setSkin(n)}setSkin(y){if(y!=this.skin){if(y)if(this.skin)y.attachAll(this,this.skin);else{let n=this.slots;for(let m=0,S=n.length;m<S;m++){let x=n[m],h=x.data.attachmentName;if(h){let d=y.getAttachment(m,h);d&&x.setAttachment(d)}}}this.skin=y,this.updateCache()}}getAttachmentByName(y,n){let m=this.data.findSlot(y);if(!m)throw new Error(`Can't find slot with name ${y}`);return this.getAttachment(m.index,n)}getAttachment(y,n){if(!n)throw new Error("attachmentName cannot be null.");if(this.skin){let m=this.skin.getAttachment(y,n);if(m)return m}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(y,n):null}setAttachment(y,n){if(!y)throw new Error("slotName cannot be null.");let m=this.slots;for(let S=0,x=m.length;S<x;S++){let h=m[S];if(h.data.name==y){let d=null;if(n&&(d=this.getAttachment(S,n),!d))throw new Error("Attachment not found: "+n+", for slot: "+y);h.setAttachment(d);return}}throw new Error("Slot not found: "+y)}findIkConstraint(y){if(!y)throw new Error("constraintName cannot be null.");return this.ikConstraints.find(n=>n.data.name==y)??null}findTransformConstraint(y){if(!y)throw new Error("constraintName cannot be null.");return this.transformConstraints.find(n=>n.data.name==y)??null}findPathConstraint(y){if(!y)throw new Error("constraintName cannot be null.");return this.pathConstraints.find(n=>n.data.name==y)??null}findPhysicsConstraint(y){if(y==null)throw new Error("constraintName cannot be null.");return this.physicsConstraints.find(n=>n.data.name==y)??null}getBoundsRect(y){let n=new qe,m=new qe;return this.getBounds(n,m,void 0,y),{x:n.x,y:n.y,width:m.x,height:m.y}}getBounds(y,n,m=new Array(2),S=null){if(!y)throw new Error("offset cannot be null.");if(!n)throw new Error("size cannot be null.");let x=this.drawOrder,h=Number.POSITIVE_INFINITY,d=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY,e=Number.NEGATIVE_INFINITY;for(let l=0,i=x.length;l<i;l++){let s=x[l];if(!s.bone.active)continue;let r=0,o=null,a=null,u=s.getAttachment();if(u instanceof Zt)r=8,o=ut.setArraySize(m,r,0),u.computeWorldVertices(s,o,0,2),a=we.quadTriangles;else if(u instanceof _e){let f=u;r=f.worldVerticesLength,o=ut.setArraySize(m,r,0),f.computeWorldVertices(s,0,r,o,0,2),a=f.triangles}else if(u instanceof vi&&S!=null){S.clipStart(s,u);continue}if(o&&a){S!=null&&S.isClipping()&&(S.clipTriangles(o,a,a.length),o=S.clippedVertices,r=S.clippedVertices.length);for(let f=0,v=o.length;f<v;f+=2){let c=o[f],g=o[f+1];h=Math.min(h,c),d=Math.min(d,g),t=Math.max(t,c),e=Math.max(e,g)}}S?.clipEndWithSlot(s)}S?.clipEnd(),y.set(h,d),n.set(t-h,e-d)}update(y){this.time+=y}physicsTranslate(y,n){const m=this.physicsConstraints;for(let S=0,x=m.length;S<x;S++)m[S].translate(y,n)}physicsRotate(y,n,m){const S=this.physicsConstraints;for(let x=0,h=S.length;x<h;x++)S[x].rotate(y,n,m)}},$(we,"quadTriangles",[0,1,2,2,3,0]),$(we,"yDown",!1),we),ln=class extends ci{constructor(y){super(y,0,!1);$(this,"_bone",null);$(this,"x",0);$(this,"y",0);$(this,"rotate",0);$(this,"scaleX",0);$(this,"shearX",0);$(this,"limit",0);$(this,"step",0);$(this,"inertia",0);$(this,"strength",0);$(this,"damping",0);$(this,"massInverse",0);$(this,"wind",0);$(this,"gravity",0);$(this,"mix",0);$(this,"inertiaGlobal",!1);$(this,"strengthGlobal",!1);$(this,"dampingGlobal",!1);$(this,"massGlobal",!1);$(this,"windGlobal",!1);$(this,"gravityGlobal",!1);$(this,"mixGlobal",!1)}set bone(y){this._bone=y}get bone(){if(this._bone)return this._bone;throw new Error("BoneData not set.")}},un=class{constructor(){$(this,"name",null);$(this,"bones",new Array);$(this,"slots",new Array);$(this,"skins",new Array);$(this,"defaultSkin",null);$(this,"events",new Array);$(this,"animations",new Array);$(this,"ikConstraints",new Array);$(this,"transformConstraints",new Array);$(this,"pathConstraints",new Array);$(this,"physicsConstraints",new Array);$(this,"x",0);$(this,"y",0);$(this,"width",0);$(this,"height",0);$(this,"referenceScale",100);$(this,"version",null);$(this,"hash",null);$(this,"fps",0);$(this,"imagesPath",null);$(this,"audioPath",null)}findBone(E){if(!E)throw new Error("boneName cannot be null.");let y=this.bones;for(let n=0,m=y.length;n<m;n++){let S=y[n];if(S.name==E)return S}return null}findSlot(E){if(!E)throw new Error("slotName cannot be null.");let y=this.slots;for(let n=0,m=y.length;n<m;n++){let S=y[n];if(S.name==E)return S}return null}findSkin(E){if(!E)throw new Error("skinName cannot be null.");let y=this.skins;for(let n=0,m=y.length;n<m;n++){let S=y[n];if(S.name==E)return S}return null}findEvent(E){if(!E)throw new Error("eventDataName cannot be null.");let y=this.events;for(let n=0,m=y.length;n<m;n++){let S=y[n];if(S.name==E)return S}return null}findAnimation(E){if(!E)throw new Error("animationName cannot be null.");let y=this.animations;for(let n=0,m=y.length;n<m;n++){let S=y[n];if(S.name==E)return S}return null}findIkConstraint(E){if(!E)throw new Error("constraintName cannot be null.");const y=this.ikConstraints;for(let n=0,m=y.length;n<m;n++){const S=y[n];if(S.name==E)return S}return null}findTransformConstraint(E){if(!E)throw new Error("constraintName cannot be null.");const y=this.transformConstraints;for(let n=0,m=y.length;n<m;n++){const S=y[n];if(S.name==E)return S}return null}findPathConstraint(E){if(!E)throw new Error("constraintName cannot be null.");const y=this.pathConstraints;for(let n=0,m=y.length;n<m;n++){const S=y[n];if(S.name==E)return S}return null}findPhysicsConstraint(E){if(!E)throw new Error("constraintName cannot be null.");const y=this.physicsConstraints;for(let n=0,m=y.length;n<m;n++){const S=y[n];if(S.name==E)return S}return null}},Ji=class{constructor(E=0,y,n){this.slotIndex=E,this.name=y,this.attachment=n}},Pi=class{constructor(E){$(this,"name");$(this,"attachments",new Array);$(this,"bones",Array());$(this,"constraints",new Array);$(this,"color",new It(.99607843,.61960787,.30980393,1));if(!E)throw new Error("name cannot be null.");this.name=E}setAttachment(E,y,n){if(!n)throw new Error("attachment cannot be null.");let m=this.attachments;E>=m.length&&(m.length=E+1),m[E]||(m[E]={}),m[E][y]=n}addSkin(E){for(let m=0;m<E.bones.length;m++){let S=E.bones[m],x=!1;for(let h=0;h<this.bones.length;h++)if(this.bones[h]==S){x=!0;break}x||this.bones.push(S)}for(let m=0;m<E.constraints.length;m++){let S=E.constraints[m],x=!1;for(let h=0;h<this.constraints.length;h++)if(this.constraints[h]==S){x=!0;break}x||this.constraints.push(S)}let y=E.getAttachments();for(let m=0;m<y.length;m++){var n=y[m];this.setAttachment(n.slotIndex,n.name,n.attachment)}}copySkin(E){for(let m=0;m<E.bones.length;m++){let S=E.bones[m],x=!1;for(let h=0;h<this.bones.length;h++)if(this.bones[h]==S){x=!0;break}x||this.bones.push(S)}for(let m=0;m<E.constraints.length;m++){let S=E.constraints[m],x=!1;for(let h=0;h<this.constraints.length;h++)if(this.constraints[h]==S){x=!0;break}x||this.constraints.push(S)}let y=E.getAttachments();for(let m=0;m<y.length;m++){var n=y[m];n.attachment&&(n.attachment instanceof _e?(n.attachment=n.attachment.newLinkedMesh(),this.setAttachment(n.slotIndex,n.name,n.attachment)):(n.attachment=n.attachment.copy(),this.setAttachment(n.slotIndex,n.name,n.attachment)))}}getAttachment(E,y){let n=this.attachments[E];return n?n[y]:null}removeAttachment(E,y){let n=this.attachments[E];n&&delete n[y]}getAttachments(){let E=new Array;for(var y=0;y<this.attachments.length;y++){let n=this.attachments[y];if(n)for(let m in n){let S=n[m];S&&E.push(new Ji(y,m,S))}}return E}getAttachmentsForSlot(E,y){let n=this.attachments[E];if(n)for(let m in n){let S=n[m];S&&y.push(new Ji(E,m,S))}}clear(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0}attachAll(E,y){let n=0;for(let m=0;m<E.slots.length;m++){let S=E.slots[m],x=S.getAttachment();if(x&&n<y.attachments.length){let h=y.attachments[n];for(let d in h){let t=h[d];if(x==t){let e=this.getAttachment(n,d);e&&S.setAttachment(e);break}}}n++}}},fn=class{constructor(E,y,n){$(this,"index",0);$(this,"name");$(this,"boneData");$(this,"color",new It(1,1,1,1));$(this,"darkColor",null);$(this,"attachmentName",null);$(this,"blendMode",0);$(this,"visible",!0);if(E<0)throw new Error("index must be >= 0.");if(!y)throw new Error("name cannot be null.");if(!n)throw new Error("boneData cannot be null.");this.index=E,this.name=y,this.boneData=n}},dn=(E=>(E[E.Normal=0]="Normal",E[E.Additive=1]="Additive",E[E.Multiply=2]="Multiply",E[E.Screen=3]="Screen",E))(dn||{}),vn=class extends ci{constructor(y){super(y,0,!1);$(this,"bones",new Array);$(this,"_target",null);$(this,"mixRotate",0);$(this,"mixX",0);$(this,"mixY",0);$(this,"mixScaleX",0);$(this,"mixScaleY",0);$(this,"mixShearY",0);$(this,"offsetRotation",0);$(this,"offsetX",0);$(this,"offsetY",0);$(this,"offsetScaleX",0);$(this,"offsetScaleY",0);$(this,"offsetShearY",0);$(this,"relative",!1);$(this,"local",!1)}set target(y){this._target=y}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Zr=class{constructor(E){$(this,"scale",1);$(this,"attachmentLoader");$(this,"linkedMeshes",new Array);this.attachmentLoader=E}readSkeletonData(E){let y=this.scale,n=new un;n.name="";let m=new $r(E),S=m.readInt32(),x=m.readInt32();n.hash=x==0&&S==0?null:x.toString(16)+S.toString(16),n.version=m.readString(),n.x=m.readFloat(),n.y=m.readFloat(),n.width=m.readFloat(),n.height=m.readFloat(),n.referenceScale=m.readFloat()*y;let h=m.readBoolean();h&&(n.fps=m.readFloat(),n.imagesPath=m.readString(),n.audioPath=m.readString());let d=0;d=m.readInt(!0);for(let e=0;e<d;e++){let l=m.readString();if(!l)throw new Error("String in string table must not be null.");m.strings.push(l)}d=m.readInt(!0);for(let e=0;e<d;e++){let l=m.readString();if(!l)throw new Error("Bone name must not be null.");let i=e==0?null:n.bones[m.readInt(!0)],s=new tn(e,l,i);s.rotation=m.readFloat(),s.x=m.readFloat()*y,s.y=m.readFloat()*y,s.scaleX=m.readFloat(),s.scaleY=m.readFloat(),s.shearX=m.readFloat(),s.shearY=m.readFloat(),s.length=m.readFloat()*y,s.inherit=m.readByte(),s.skinRequired=m.readBoolean(),h&&(It.rgba8888ToColor(s.color,m.readInt32()),s.icon=m.readString()??void 0,s.visible=m.readBoolean()),n.bones.push(s)}d=m.readInt(!0);for(let e=0;e<d;e++){let l=m.readString();if(!l)throw new Error("Slot name must not be null.");let i=n.bones[m.readInt(!0)],s=new fn(e,l,i);It.rgba8888ToColor(s.color,m.readInt32());let r=m.readInt32();r!=-1&&It.rgb888ToColor(s.darkColor=new It,r),s.attachmentName=m.readStringRef(),s.blendMode=m.readInt(!0),h&&(s.visible=m.readBoolean()),n.slots.push(s)}d=m.readInt(!0);for(let e=0,l;e<d;e++){let i=m.readString();if(!i)throw new Error("IK constraint data name must not be null.");let s=new nn(i);s.order=m.readInt(!0),l=m.readInt(!0);for(let o=0;o<l;o++)s.bones.push(n.bones[m.readInt(!0)]);s.target=n.bones[m.readInt(!0)];let r=m.readByte();s.skinRequired=(r&1)!=0,s.bendDirection=r&2?1:-1,s.compress=(r&4)!=0,s.stretch=(r&8)!=0,s.uniform=(r&16)!=0,r&32&&(s.mix=r&64?m.readFloat():1),r&128&&(s.softness=m.readFloat()*y),n.ikConstraints.push(s)}d=m.readInt(!0);for(let e=0,l;e<d;e++){let i=m.readString();if(!i)throw new Error("Transform constraint data name must not be null.");let s=new vn(i);s.order=m.readInt(!0),l=m.readInt(!0);for(let o=0;o<l;o++)s.bones.push(n.bones[m.readInt(!0)]);s.target=n.bones[m.readInt(!0)];let r=m.readByte();s.skinRequired=(r&1)!=0,s.local=(r&2)!=0,s.relative=(r&4)!=0,r&8&&(s.offsetRotation=m.readFloat()),r&16&&(s.offsetX=m.readFloat()*y),r&32&&(s.offsetY=m.readFloat()*y),r&64&&(s.offsetScaleX=m.readFloat()),r&128&&(s.offsetScaleY=m.readFloat()),r=m.readByte(),r&1&&(s.offsetShearY=m.readFloat()),r&2&&(s.mixRotate=m.readFloat()),r&4&&(s.mixX=m.readFloat()),r&8&&(s.mixY=m.readFloat()),r&16&&(s.mixScaleX=m.readFloat()),r&32&&(s.mixScaleY=m.readFloat()),r&64&&(s.mixShearY=m.readFloat()),n.transformConstraints.push(s)}d=m.readInt(!0);for(let e=0,l;e<d;e++){let i=m.readString();if(!i)throw new Error("Path constraint data name must not be null.");let s=new rn(i);s.order=m.readInt(!0),s.skinRequired=m.readBoolean(),l=m.readInt(!0);for(let o=0;o<l;o++)s.bones.push(n.bones[m.readInt(!0)]);s.target=n.slots[m.readInt(!0)];const r=m.readByte();s.positionMode=r&1,s.spacingMode=r>>1&3,s.rotateMode=r>>3&3,r&128&&(s.offsetRotation=m.readFloat()),s.position=m.readFloat(),s.positionMode==0&&(s.position*=y),s.spacing=m.readFloat(),(s.spacingMode==0||s.spacingMode==1)&&(s.spacing*=y),s.mixRotate=m.readFloat(),s.mixX=m.readFloat(),s.mixY=m.readFloat(),n.pathConstraints.push(s)}d=m.readInt(!0);for(let e=0,l;e<d;e++){const i=m.readString();if(!i)throw new Error("Physics constraint data name must not be null.");const s=new ln(i);s.order=m.readInt(!0),s.bone=n.bones[m.readInt(!0)];let r=m.readByte();s.skinRequired=(r&1)!=0,r&2&&(s.x=m.readFloat()),r&4&&(s.y=m.readFloat()),r&8&&(s.rotate=m.readFloat()),r&16&&(s.scaleX=m.readFloat()),r&32&&(s.shearX=m.readFloat()),s.limit=(r&64?m.readFloat():5e3)*y,s.step=1/m.readUnsignedByte(),s.inertia=m.readFloat(),s.strength=m.readFloat(),s.damping=m.readFloat(),s.massInverse=r&128?m.readFloat():1,s.wind=m.readFloat(),s.gravity=m.readFloat(),r=m.readByte(),r&1&&(s.inertiaGlobal=!0),r&2&&(s.strengthGlobal=!0),r&4&&(s.dampingGlobal=!0),r&8&&(s.massGlobal=!0),r&16&&(s.windGlobal=!0),r&32&&(s.gravityGlobal=!0),r&64&&(s.mixGlobal=!0),s.mix=r&128?m.readFloat():1,n.physicsConstraints.push(s)}let t=this.readSkin(m,n,!0,h);t&&(n.defaultSkin=t,n.skins.push(t));{let e=n.skins.length;for(ut.setArraySize(n.skins,d=e+m.readInt(!0));e<d;e++){let l=this.readSkin(m,n,!1,h);if(!l)throw new Error("readSkin() should not have returned null.");n.skins[e]=l}}d=this.linkedMeshes.length;for(let e=0;e<d;e++){let l=this.linkedMeshes[e];const i=n.skins[l.skinIndex];if(!l.parent)throw new Error("Linked mesh parent must not be null");let s=i.getAttachment(l.slotIndex,l.parent);if(!s)throw new Error(`Parent mesh not found: ${l.parent}`);l.mesh.timelineAttachment=l.inheritTimeline?s:l.mesh,l.mesh.setParentMesh(s),l.mesh.region!=null&&l.mesh.updateRegion()}this.linkedMeshes.length=0,d=m.readInt(!0);for(let e=0;e<d;e++){let l=m.readString();if(!l)throw new Error("Event data name must not be null");let i=new sn(l);i.intValue=m.readInt(!1),i.floatValue=m.readFloat(),i.stringValue=m.readString(),i.audioPath=m.readString(),i.audioPath&&(i.volume=m.readFloat(),i.balance=m.readFloat()),n.events.push(i)}d=m.readInt(!0);for(let e=0;e<d;e++){let l=m.readString();if(!l)throw new Error("Animatio name must not be null.");n.animations.push(this.readAnimation(m,l,n))}return n}readSkin(E,y,n,m){let S=null,x=0;if(n){if(x=E.readInt(!0),x==0)return null;S=new Pi("default")}else{let h=E.readString();if(!h)throw new Error("Skin name must not be null.");S=new Pi(h),m&&It.rgba8888ToColor(S.color,E.readInt32()),S.bones.length=E.readInt(!0);for(let d=0,t=S.bones.length;d<t;d++)S.bones[d]=y.bones[E.readInt(!0)];for(let d=0,t=E.readInt(!0);d<t;d++)S.constraints.push(y.ikConstraints[E.readInt(!0)]);for(let d=0,t=E.readInt(!0);d<t;d++)S.constraints.push(y.transformConstraints[E.readInt(!0)]);for(let d=0,t=E.readInt(!0);d<t;d++)S.constraints.push(y.pathConstraints[E.readInt(!0)]);for(let d=0,t=E.readInt(!0);d<t;d++)S.constraints.push(y.physicsConstraints[E.readInt(!0)]);x=E.readInt(!0)}for(let h=0;h<x;h++){let d=E.readInt(!0);for(let t=0,e=E.readInt(!0);t<e;t++){let l=E.readStringRef();if(!l)throw new Error("Attachment name must not be null");let i=this.readAttachment(E,y,S,d,l,m);i&&S.setAttachment(d,l,i)}}return S}readAttachment(E,y,n,m,S,x){let h=this.scale,d=E.readByte();const t=d&8?E.readStringRef():S;if(!t)throw new Error("Attachment name must not be null");switch(d&7){case 0:{let e=d&16?E.readStringRef():null;const l=d&32?E.readInt32():4294967295,i=d&64?this.readSequence(E):null;let s=d&128?E.readFloat():0,r=E.readFloat(),o=E.readFloat(),a=E.readFloat(),u=E.readFloat(),f=E.readFloat(),v=E.readFloat();e||(e=t);let c=this.attachmentLoader.newRegionAttachment(n,t,e,i);return c?(c.path=e,c.x=r*h,c.y=o*h,c.scaleX=a,c.scaleY=u,c.rotation=s,c.width=f*h,c.height=v*h,It.rgba8888ToColor(c.color,l),c.sequence=i,i==null&&c.updateRegion(),c):null}case 1:{let e=this.readVertices(E,(d&16)!=0),l=x?E.readInt32():0,i=this.attachmentLoader.newBoundingBoxAttachment(n,t);return i?(i.worldVerticesLength=e.length,i.vertices=e.vertices,i.bones=e.bones,x&&It.rgba8888ToColor(i.color,l),i):null}case 2:{let e=d&16?E.readStringRef():t;const l=d&32?E.readInt32():4294967295,i=d&64?this.readSequence(E):null,s=E.readInt(!0),r=this.readVertices(E,(d&128)!=0),o=this.readFloatArray(E,r.length,1),a=this.readShortArray(E,(r.length-s-2)*3);let u=[],f=0,v=0;x&&(u=this.readShortArray(E,E.readInt(!0)),f=E.readFloat(),v=E.readFloat()),e||(e=t);let c=this.attachmentLoader.newMeshAttachment(n,t,e,i);return c?(c.path=e,It.rgba8888ToColor(c.color,l),c.bones=r.bones,c.vertices=r.vertices,c.worldVerticesLength=r.length,c.triangles=a,c.regionUVs=o,i==null&&c.updateRegion(),c.hullLength=s<<1,c.sequence=i,x&&(c.edges=u,c.width=f*h,c.height=v*h),c):null}case 3:{const e=d&16?E.readStringRef():t;if(e==null)throw new Error("Path of linked mesh must not be null");const l=d&32?E.readInt32():4294967295,i=d&64?this.readSequence(E):null,s=(d&128)!=0,r=E.readInt(!0),o=E.readStringRef();let a=0,u=0;x&&(a=E.readFloat(),u=E.readFloat());let f=this.attachmentLoader.newMeshAttachment(n,t,e,i);return f?(f.path=e,It.rgba8888ToColor(f.color,l),f.sequence=i,x&&(f.width=a*h,f.height=u*h),this.linkedMeshes.push(new Qr(f,r,m,o,s)),f):null}case 4:{const e=(d&16)!=0,l=(d&32)!=0,i=this.readVertices(E,(d&64)!=0),s=ut.newArray(i.length/6,0);for(let a=0,u=s.length;a<u;a++)s[a]=E.readFloat()*h;const r=x?E.readInt32():0,o=this.attachmentLoader.newPathAttachment(n,t);return o?(o.closed=e,o.constantSpeed=l,o.worldVerticesLength=i.length,o.vertices=i.vertices,o.bones=i.bones,o.lengths=s,x&&It.rgba8888ToColor(o.color,r),o):null}case 5:{const e=E.readFloat(),l=E.readFloat(),i=E.readFloat(),s=x?E.readInt32():0,r=this.attachmentLoader.newPointAttachment(n,t);return r?(r.x=l*h,r.y=i*h,r.rotation=e,x&&It.rgba8888ToColor(r.color,s),r):null}case 6:{const e=E.readInt(!0),l=this.readVertices(E,(d&16)!=0);let i=x?E.readInt32():0,s=this.attachmentLoader.newClippingAttachment(n,t);return s?(s.endSlot=y.slots[e],s.worldVerticesLength=l.length,s.vertices=l.vertices,s.bones=l.bones,x&&It.rgba8888ToColor(s.color,i),s):null}}return null}readSequence(E){let y=new cs(E.readInt(!0));return y.start=E.readInt(!0),y.digits=E.readInt(!0),y.setupIndex=E.readInt(!0),y}readVertices(E,y){const n=this.scale,m=E.readInt(!0),S=new Jr;if(S.length=m<<1,!y)return S.vertices=this.readFloatArray(E,S.length,n),S;let x=new Array,h=new Array;for(let d=0;d<m;d++){let t=E.readInt(!0);h.push(t);for(let e=0;e<t;e++)h.push(E.readInt(!0)),x.push(E.readFloat()*n),x.push(E.readFloat()*n),x.push(E.readFloat())}return S.vertices=ut.toFloatArray(x),S.bones=h,S}readFloatArray(E,y,n){let m=new Array(y);if(n==1)for(let S=0;S<y;S++)m[S]=E.readFloat();else for(let S=0;S<y;S++)m[S]=E.readFloat()*n;return m}readShortArray(E,y){let n=new Array(y);for(let m=0;m<y;m++)n[m]=E.readInt(!0);return n}readAnimation(E,y,n){E.readInt(!0);let m=new Array,S=this.scale;for(let t=0,e=E.readInt(!0);t<e;t++){let l=E.readInt(!0);for(let i=0,s=E.readInt(!0);i<s;i++){let r=E.readByte(),o=E.readInt(!0),a=o-1;switch(r){case oa:{let u=new je(o,l);for(let f=0;f<o;f++)u.setFrame(f,E.readFloat(),E.readStringRef());m.push(u);break}case ha:{let u=E.readInt(!0),f=new Ps(o,u,l),v=E.readFloat(),c=E.readUnsignedByte()/255,g=E.readUnsignedByte()/255,p=E.readUnsignedByte()/255,T=E.readUnsignedByte()/255;for(let C=0,M=0;f.setFrame(C,v,c,g,p,T),C!=a;C++){let A=E.readFloat(),R=E.readUnsignedByte()/255,P=E.readUnsignedByte()/255,L=E.readUnsignedByte()/255,F=E.readUnsignedByte()/255;switch(E.readByte()){case Ce:f.setStepped(C);break;case Ee:Xt(E,f,M++,C,0,v,A,c,R,1),Xt(E,f,M++,C,1,v,A,g,P,1),Xt(E,f,M++,C,2,v,A,p,L,1),Xt(E,f,M++,C,3,v,A,T,F,1)}v=A,c=R,g=P,p=L,T=F}m.push(f);break}case la:{let u=E.readInt(!0),f=new Ls(o,u,l),v=E.readFloat(),c=E.readUnsignedByte()/255,g=E.readUnsignedByte()/255,p=E.readUnsignedByte()/255;for(let T=0,C=0;f.setFrame(T,v,c,g,p),T!=a;T++){let M=E.readFloat(),A=E.readUnsignedByte()/255,R=E.readUnsignedByte()/255,P=E.readUnsignedByte()/255;switch(E.readByte()){case Ce:f.setStepped(T);break;case Ee:Xt(E,f,C++,T,0,v,M,c,A,1),Xt(E,f,C++,T,1,v,M,g,R,1),Xt(E,f,C++,T,2,v,M,p,P,1)}v=M,c=A,g=R,p=P}m.push(f);break}case ua:{let u=E.readInt(!0),f=new Os(o,u,l),v=E.readFloat(),c=E.readUnsignedByte()/255,g=E.readUnsignedByte()/255,p=E.readUnsignedByte()/255,T=E.readUnsignedByte()/255,C=E.readUnsignedByte()/255,M=E.readUnsignedByte()/255,A=E.readUnsignedByte()/255;for(let R=0,P=0;f.setFrame(R,v,c,g,p,T,C,M,A),R!=a;R++){let L=E.readFloat(),F=E.readUnsignedByte()/255,w=E.readUnsignedByte()/255,O=E.readUnsignedByte()/255,B=E.readUnsignedByte()/255,I=E.readUnsignedByte()/255,D=E.readUnsignedByte()/255,N=E.readUnsignedByte()/255;switch(E.readByte()){case Ce:f.setStepped(R);break;case Ee:Xt(E,f,P++,R,0,v,L,c,F,1),Xt(E,f,P++,R,1,v,L,g,w,1),Xt(E,f,P++,R,2,v,L,p,O,1),Xt(E,f,P++,R,3,v,L,T,B,1),Xt(E,f,P++,R,4,v,L,C,I,1),Xt(E,f,P++,R,5,v,L,M,D,1),Xt(E,f,P++,R,6,v,L,A,N,1)}v=L,c=F,g=w,p=O,T=B,C=I,M=D,A=N}m.push(f);break}case fa:{let u=E.readInt(!0),f=new ws(o,u,l),v=E.readFloat(),c=E.readUnsignedByte()/255,g=E.readUnsignedByte()/255,p=E.readUnsignedByte()/255,T=E.readUnsignedByte()/255,C=E.readUnsignedByte()/255,M=E.readUnsignedByte()/255;for(let A=0,R=0;f.setFrame(A,v,c,g,p,T,C,M),A!=a;A++){let P=E.readFloat(),L=E.readUnsignedByte()/255,F=E.readUnsignedByte()/255,w=E.readUnsignedByte()/255,O=E.readUnsignedByte()/255,B=E.readUnsignedByte()/255,I=E.readUnsignedByte()/255;switch(E.readByte()){case Ce:f.setStepped(A);break;case Ee:Xt(E,f,R++,A,0,v,P,c,L,1),Xt(E,f,R++,A,1,v,P,g,F,1),Xt(E,f,R++,A,2,v,P,p,w,1),Xt(E,f,R++,A,3,v,P,T,O,1),Xt(E,f,R++,A,4,v,P,C,B,1),Xt(E,f,R++,A,5,v,P,M,I,1)}v=P,c=L,g=F,p=w,T=O,C=B,M=I}m.push(f);break}case da:{let u=new Fs(o,E.readInt(!0),l),f=E.readFloat(),v=E.readUnsignedByte()/255;for(let c=0,g=0;u.setFrame(c,f,v),c!=a;c++){let p=E.readFloat(),T=E.readUnsignedByte()/255;switch(E.readByte()){case Ce:u.setStepped(c);break;case Ee:Xt(E,u,g++,c,0,f,p,v,T,1)}f=p,v=T}m.push(u)}}}}for(let t=0,e=E.readInt(!0);t<e;t++){let l=E.readInt(!0);for(let i=0,s=E.readInt(!0);i<s;i++){let r=E.readByte(),o=E.readInt(!0);if(r==aa){let u=new Rs(o,l);for(let f=0;f<o;f++)u.setFrame(f,E.readFloat(),E.readByte());m.push(u);continue}let a=E.readInt(!0);switch(r){case jr:m.push(re(E,new hi(o,a,l),1));break;case kr:m.push(Si(E,new gs(o,a,l),S));break;case qr:m.push(re(E,new xs(o,a,l),S));break;case _r:m.push(re(E,new ys(o,a,l),S));break;case ta:m.push(Si(E,new Ts(o,a,l),1));break;case ea:m.push(re(E,new Ss(o,a,l),1));break;case ia:m.push(re(E,new Cs(o,a,l),1));break;case sa:m.push(Si(E,new Es(o,a,l),1));break;case na:m.push(re(E,new As(o,a,l),1));break;case ra:m.push(re(E,new Ms(o,a,l),1))}}}for(let t=0,e=E.readInt(!0);t<e;t++){let l=E.readInt(!0),i=E.readInt(!0),s=i-1,r=new Bs(i,E.readInt(!0),l),o=E.readByte(),a=E.readFloat(),u=o&1?o&2?E.readFloat():1:0,f=o&4?E.readFloat()*S:0;for(let v=0,c=0;r.setFrame(v,a,u,f,o&8?1:-1,(o&16)!=0,(o&32)!=0),v!=s;v++){o=E.readByte();const g=E.readFloat(),p=o&1?o&2?E.readFloat():1:0,T=o&4?E.readFloat()*S:0;o&64?r.setStepped(v):o&128&&(Xt(E,r,c++,v,0,a,g,u,p,1),Xt(E,r,c++,v,1,a,g,f,T,S)),a=g,u=p,f=T}m.push(r)}for(let t=0,e=E.readInt(!0);t<e;t++){let l=E.readInt(!0),i=E.readInt(!0),s=i-1,r=new Is(i,E.readInt(!0),l),o=E.readFloat(),a=E.readFloat(),u=E.readFloat(),f=E.readFloat(),v=E.readFloat(),c=E.readFloat(),g=E.readFloat();for(let p=0,T=0;r.setFrame(p,o,a,u,f,v,c,g),p!=s;p++){let C=E.readFloat(),M=E.readFloat(),A=E.readFloat(),R=E.readFloat(),P=E.readFloat(),L=E.readFloat(),F=E.readFloat();switch(E.readByte()){case Ce:r.setStepped(p);break;case Ee:Xt(E,r,T++,p,0,o,C,a,M,1),Xt(E,r,T++,p,1,o,C,u,A,1),Xt(E,r,T++,p,2,o,C,f,R,1),Xt(E,r,T++,p,3,o,C,v,P,1),Xt(E,r,T++,p,4,o,C,c,L,1),Xt(E,r,T++,p,5,o,C,g,F,1)}o=C,a=M,u=A,f=R,v=P,c=L,g=F}m.push(r)}for(let t=0,e=E.readInt(!0);t<e;t++){let l=E.readInt(!0),i=n.pathConstraints[l];for(let s=0,r=E.readInt(!0);s<r;s++){const o=E.readByte(),a=E.readInt(!0),u=E.readInt(!0);switch(o){case pa:m.push(re(E,new Ns(a,u,l),i.positionMode==0?S:1));break;case ma:m.push(re(E,new bs(a,u,l),i.spacingMode==0||i.spacingMode==1?S:1));break;case ga:let f=new Gs(a,u,l),v=E.readFloat(),c=E.readFloat(),g=E.readFloat(),p=E.readFloat();for(let T=0,C=0,M=f.getFrameCount()-1;f.setFrame(T,v,c,g,p),T!=M;T++){let A=E.readFloat(),R=E.readFloat(),P=E.readFloat(),L=E.readFloat();switch(E.readByte()){case Ce:f.setStepped(T);break;case Ee:Xt(E,f,C++,T,0,v,A,c,R,1),Xt(E,f,C++,T,1,v,A,g,P,1),Xt(E,f,C++,T,2,v,A,p,L,1)}v=A,c=R,g=P,p=L}m.push(f)}}}for(let t=0,e=E.readInt(!0);t<e;t++){const l=E.readInt(!0)-1;for(let i=0,s=E.readInt(!0);i<s;i++){const r=E.readByte(),o=E.readInt(!0);if(r==Ma){const u=new Ks(o,l);for(let f=0;f<o;f++)u.setFrame(f,E.readFloat());m.push(u);continue}const a=E.readInt(!0);switch(r){case xa:m.push(re(E,new Us(o,a,l),1));break;case ya:m.push(re(E,new zs(o,a,l),1));break;case Ta:m.push(re(E,new Ys(o,a,l),1));break;case Sa:m.push(re(E,new Vs(o,a,l),1));break;case Ca:m.push(re(E,new Xs(o,a,l),1));break;case Ea:m.push(re(E,new Ws(o,a,l),1));break;case Aa:m.push(re(E,new Hs(o,a,l),1))}}}for(let t=0,e=E.readInt(!0);t<e;t++){let l=n.skins[E.readInt(!0)];for(let i=0,s=E.readInt(!0);i<s;i++){let r=E.readInt(!0);for(let o=0,a=E.readInt(!0);o<a;o++){let u=E.readStringRef();if(!u)throw new Error("attachmentName must not be null.");let f=l.getAttachment(r,u),v=E.readByte(),c=E.readInt(!0),g=c-1;switch(v){case va:{let p=f,T=p.bones,C=p.vertices,M=T?C.length/3*2:C.length,A=E.readInt(!0),R=new Ds(c,A,r,p),P=E.readFloat();for(let L=0,F=0;;L++){let w,O=E.readInt(!0);if(O==0)w=T?ut.newFloatArray(M):C;else{w=ut.newFloatArray(M);let I=E.readInt(!0);if(O+=I,S==1)for(let D=I;D<O;D++)w[D]=E.readFloat();else for(let D=I;D<O;D++)w[D]=E.readFloat()*S;if(!T)for(let D=0,N=w.length;D<N;D++)w[D]+=C[D]}if(R.setFrame(L,P,w),L==g)break;let B=E.readFloat();switch(E.readByte()){case Ce:R.setStepped(L);break;case Ee:Xt(E,R,F++,L,0,P,B,0,1,1)}P=B}m.push(R);break}case ca:{let p=new Zs(c,r,f);for(let T=0;T<c;T++){let C=E.readFloat(),M=E.readInt32();p.setFrame(T,C,ms[M&15],M>>4,E.readFloat())}m.push(p);break}}}}}let x=E.readInt(!0);if(x>0){let t=new ti(x),e=n.slots.length;for(let l=0;l<x;l++){let i=E.readFloat(),s=E.readInt(!0),r=ut.newArray(e,0);for(let f=e-1;f>=0;f--)r[f]=-1;let o=ut.newArray(e-s,0),a=0,u=0;for(let f=0;f<s;f++){let v=E.readInt(!0);for(;a!=v;)o[u++]=a++;r[a+E.readInt(!0)]=a++}for(;a<e;)o[u++]=a++;for(let f=e-1;f>=0;f--)r[f]==-1&&(r[f]=o[--u]);t.setFrame(l,i,r)}m.push(t)}let h=E.readInt(!0);if(h>0){let t=new Ii(h);for(let e=0;e<h;e++){let l=E.readFloat(),i=n.events[E.readInt(!0)],s=new en(l,i);s.intValue=E.readInt(!1),s.floatValue=E.readFloat(),s.stringValue=E.readString(),s.stringValue==null&&(s.stringValue=i.stringValue),s.data.audioPath&&(s.volume=E.readFloat(),s.balance=E.readFloat()),t.setFrame(e,s)}m.push(t)}let d=0;for(let t=0,e=m.length;t<e;t++)d=Math.max(d,m[t].getDuration());return new Di(y,m,d)}},$r=class{constructor(E,y=new Array,n=0,m=new DataView(E instanceof ArrayBuffer?E:E.buffer)){this.strings=y,this.index=n,this.buffer=m}readByte(){return this.buffer.getInt8(this.index++)}readUnsignedByte(){return this.buffer.getUint8(this.index++)}readShort(){let E=this.buffer.getInt16(this.index);return this.index+=2,E}readInt32(){let E=this.buffer.getInt32(this.index);return this.index+=4,E}readInt(E){let y=this.readByte(),n=y&127;return y&128&&(y=this.readByte(),n|=(y&127)<<7,y&128&&(y=this.readByte(),n|=(y&127)<<14,y&128&&(y=this.readByte(),n|=(y&127)<<21,y&128&&(y=this.readByte(),n|=(y&127)<<28)))),E?n:n>>>1^-(n&1)}readStringRef(){let E=this.readInt(!0);return E==0?null:this.strings[E-1]}readString(){let E=this.readInt(!0);switch(E){case 0:return null;case 1:return""}E--;let y="";for(let n=0;n<E;){let m=this.readUnsignedByte();switch(m>>4){case 12:case 13:y+=String.fromCharCode((m&31)<<6|this.readByte()&63),n+=2;break;case 14:y+=String.fromCharCode((m&15)<<12|(this.readByte()&63)<<6|this.readByte()&63),n+=3;break;default:y+=String.fromCharCode(m),n++}}return y}readFloat(){let E=this.buffer.getFloat32(this.index);return this.index+=4,E}readBoolean(){return this.readByte()!=0}},Qr=class{constructor(E,y,n,m,S){$(this,"parent");$(this,"skinIndex");$(this,"slotIndex");$(this,"mesh");$(this,"inheritTimeline");this.mesh=E,this.skinIndex=y,this.slotIndex=n,this.parent=m,this.inheritTimeline=S}},Jr=class{constructor(E=null,y=null,n=0){this.bones=E,this.vertices=y,this.length=n}};function re(E,y,n){let m=E.readFloat(),S=E.readFloat()*n;for(let x=0,h=0,d=y.getFrameCount()-1;y.setFrame(x,m,S),x!=d;x++){let t=E.readFloat(),e=E.readFloat()*n;switch(E.readByte()){case Ce:y.setStepped(x);break;case Ee:Xt(E,y,h++,x,0,m,t,S,e,n)}m=t,S=e}return y}function Si(E,y,n){let m=E.readFloat(),S=E.readFloat()*n,x=E.readFloat()*n;for(let h=0,d=0,t=y.getFrameCount()-1;y.setFrame(h,m,S,x),h!=t;h++){let e=E.readFloat(),l=E.readFloat()*n,i=E.readFloat()*n;switch(E.readByte()){case Ce:y.setStepped(h);break;case Ee:Xt(E,y,d++,h,0,m,e,S,l,n),Xt(E,y,d++,h,1,m,e,x,i,n)}m=e,S=l,x=i}return y}function Xt(E,y,n,m,S,x,h,d,t,e){y.setBezier(n,m,S,x,d,E.readFloat(),E.readFloat()*e,E.readFloat(),E.readFloat()*e,h,t)}var jr=0,kr=1,qr=2,_r=3,ta=4,ea=5,ia=6,sa=7,na=8,ra=9,aa=10,oa=0,ha=1,la=2,ua=3,fa=4,da=5,va=0,ca=1,pa=0,ma=1,ga=2,xa=0,ya=1,Ta=2,Sa=4,Ca=5,Ea=6,Aa=7,Ma=8,Ce=1,Ee=2,Ra=class{constructor(){$(this,"minX",0);$(this,"minY",0);$(this,"maxX",0);$(this,"maxY",0);$(this,"boundingBoxes",new Array);$(this,"polygons",new Array);$(this,"polygonPool",new oi(()=>ut.newFloatArray(16)))}update(E,y){if(!E)throw new Error("skeleton cannot be null.");let n=this.boundingBoxes,m=this.polygons,S=this.polygonPool,x=E.slots,h=x.length;n.length=0,S.freeAll(m),m.length=0;for(let d=0;d<h;d++){let t=x[d];if(!t.bone.active)continue;let e=t.getAttachment();if(e instanceof $s){let l=e;n.push(l);let i=S.obtain();i.length!=l.worldVerticesLength&&(i=ut.newFloatArray(l.worldVerticesLength)),m.push(i),l.computeWorldVertices(t,0,l.worldVerticesLength,i,0,2)}}y?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)}aabbCompute(){let E=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,m=Number.NEGATIVE_INFINITY,S=this.polygons;for(let x=0,h=S.length;x<h;x++){let d=S[x],t=d;for(let e=0,l=d.length;e<l;e+=2){let i=t[e],s=t[e+1];E=Math.min(E,i),y=Math.min(y,s),n=Math.max(n,i),m=Math.max(m,s)}}this.minX=E,this.minY=y,this.maxX=n,this.maxY=m}aabbContainsPoint(E,y){return E>=this.minX&&E<=this.maxX&&y>=this.minY&&y<=this.maxY}aabbIntersectsSegment(E,y,n,m){let S=this.minX,x=this.minY,h=this.maxX,d=this.maxY;if(E<=S&&n<=S||y<=x&&m<=x||E>=h&&n>=h||y>=d&&m>=d)return!1;let t=(m-y)/(n-E),e=t*(S-E)+y;if(e>x&&e<d||(e=t*(h-E)+y,e>x&&e<d))return!0;let l=(x-y)/t+E;return l>S&&l<h||(l=(d-y)/t+E,l>S&&l<h)}aabbIntersectsSkeleton(E){return this.minX<E.maxX&&this.maxX>E.minX&&this.minY<E.maxY&&this.maxY>E.minY}containsPoint(E,y){let n=this.polygons;for(let m=0,S=n.length;m<S;m++)if(this.containsPointPolygon(n[m],E,y))return this.boundingBoxes[m];return null}containsPointPolygon(E,y,n){let m=E,S=E.length,x=S-2,h=!1;for(let d=0;d<S;d+=2){let t=m[d+1],e=m[x+1];if(t<n&&e>=n||e<n&&t>=n){let l=m[d];l+(n-t)/(e-t)*(m[x]-l)<y&&(h=!h)}x=d}return h}intersectsSegment(E,y,n,m){let S=this.polygons;for(let x=0,h=S.length;x<h;x++)if(this.intersectsSegmentPolygon(S[x],E,y,n,m))return this.boundingBoxes[x];return null}intersectsSegmentPolygon(E,y,n,m,S){let x=E,h=E.length,d=y-m,t=n-S,e=y*S-n*m,l=x[h-2],i=x[h-1];for(let s=0;s<h;s+=2){let r=x[s],o=x[s+1],a=l*o-i*r,u=l-r,f=i-o,v=d*f-t*u,c=(e*u-d*a)/v;if((c>=l&&c<=r||c>=r&&c<=l)&&(c>=y&&c<=m||c>=m&&c<=y)){let g=(e*f-t*a)/v;if((g>=i&&g<=o||g>=o&&g<=i)&&(g>=n&&g<=S||g>=S&&g<=n))return!0}l=r,i=o}return!1}getPolygon(E){if(!E)throw new Error("boundingBox cannot be null.");let y=this.boundingBoxes.indexOf(E);return y==-1?null:this.polygons[y]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},Pa=class me{constructor(){$(this,"convexPolygons",new Array);$(this,"convexPolygonsIndices",new Array);$(this,"indicesArray",new Array);$(this,"isConcaveArray",new Array);$(this,"triangles",new Array);$(this,"polygonPool",new oi(()=>new Array));$(this,"polygonIndicesPool",new oi(()=>new Array))}triangulate(y){let n=y,m=y.length>>1,S=this.indicesArray;S.length=0;for(let d=0;d<m;d++)S[d]=d;let x=this.isConcaveArray;x.length=0;for(let d=0,t=m;d<t;++d)x[d]=me.isConcave(d,m,n,S);let h=this.triangles;for(h.length=0;m>3;){let d=m-1,t=0,e=1;for(;;){t:if(!x[t]){let s=S[d]<<1,r=S[t]<<1,o=S[e]<<1,a=n[s],u=n[s+1],f=n[r],v=n[r+1],c=n[o],g=n[o+1];for(let p=(e+1)%m;p!=d;p=(p+1)%m){if(!x[p])continue;let T=S[p]<<1,C=n[T],M=n[T+1];if(me.positiveArea(c,g,a,u,C,M)&&me.positiveArea(a,u,f,v,C,M)&&me.positiveArea(f,v,c,g,C,M))break t}break}if(e==0){do{if(!x[t])break;t--}while(t>0);break}d=t,t=e,e=(e+1)%m}h.push(S[(m+t-1)%m]),h.push(S[t]),h.push(S[(t+1)%m]),S.splice(t,1),x.splice(t,1),m--;let l=(m+t-1)%m,i=t==m?0:t;x[l]=me.isConcave(l,m,n,S),x[i]=me.isConcave(i,m,n,S)}return m==3&&(h.push(S[2]),h.push(S[0]),h.push(S[1])),h}decompose(y,n){let m=y,S=this.convexPolygons;this.polygonPool.freeAll(S),S.length=0;let x=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(x),x.length=0;let h=this.polygonIndicesPool.obtain();h.length=0;let d=this.polygonPool.obtain();d.length=0;let t=-1,e=0;for(let l=0,i=n.length;l<i;l+=3){let s=n[l]<<1,r=n[l+1]<<1,o=n[l+2]<<1,a=m[s],u=m[s+1],f=m[r],v=m[r+1],c=m[o],g=m[o+1],p=!1;if(t==s){let T=d.length-4,C=me.winding(d[T],d[T+1],d[T+2],d[T+3],c,g),M=me.winding(c,g,d[0],d[1],d[2],d[3]);C==e&&M==e&&(d.push(c),d.push(g),h.push(o),p=!0)}p||(d.length>0?(S.push(d),x.push(h)):(this.polygonPool.free(d),this.polygonIndicesPool.free(h)),d=this.polygonPool.obtain(),d.length=0,d.push(a),d.push(u),d.push(f),d.push(v),d.push(c),d.push(g),h=this.polygonIndicesPool.obtain(),h.length=0,h.push(s),h.push(r),h.push(o),e=me.winding(a,u,f,v,c,g),t=s)}d.length>0&&(S.push(d),x.push(h));for(let l=0,i=S.length;l<i;l++){if(h=x[l],h.length==0)continue;let s=h[0],r=h[h.length-1];d=S[l];let o=d.length-4,a=d[o],u=d[o+1],f=d[o+2],v=d[o+3],c=d[0],g=d[1],p=d[2],T=d[3],C=me.winding(a,u,f,v,c,g);for(let M=0;M<i;M++){if(M==l)continue;let A=x[M];if(A.length!=3)continue;let R=A[0],P=A[1],L=A[2],F=S[M],w=F[F.length-2],O=F[F.length-1];if(R!=s||P!=r)continue;let B=me.winding(a,u,f,v,w,O),I=me.winding(w,O,c,g,p,T);B==C&&I==C&&(F.length=0,A.length=0,d.push(w),d.push(O),h.push(L),a=f,u=v,f=w,v=O,M=0)}}for(let l=S.length-1;l>=0;l--)d=S[l],d.length==0&&(S.splice(l,1),this.polygonPool.free(d),h=x[l],x.splice(l,1),this.polygonIndicesPool.free(h));return S}static isConcave(y,n,m,S){let x=S[(n+y-1)%n]<<1,h=S[y]<<1,d=S[(y+1)%n]<<1;return!this.positiveArea(m[x],m[x+1],m[h],m[h+1],m[d],m[d+1])}static positiveArea(y,n,m,S,x,h){return y*(h-S)+m*(n-h)+x*(S-n)>=0}static winding(y,n,m,S,x,h){let d=m-y,t=S-n;return x*t-h*d+d*n-y*t>=0?1:-1}},cn=class Li{constructor(){$(this,"triangulator",new Pa);$(this,"clippingPolygon",new Array);$(this,"clipOutput",new Array);$(this,"clippedVertices",new Array);$(this,"clippedUVs",new Array);$(this,"clippedTriangles",new Array);$(this,"scratch",new Array);$(this,"clipAttachment",null);$(this,"clippingPolygons",null)}clipStart(y,n){if(this.clipAttachment)return 0;this.clipAttachment=n;let m=n.worldVerticesLength,S=ut.setArraySize(this.clippingPolygon,m);n.computeWorldVertices(y,0,m,S,0,2);let x=this.clippingPolygon;Li.makeClockwise(x);let h=this.clippingPolygons=this.triangulator.decompose(x,this.triangulator.triangulate(x));for(let d=0,t=h.length;d<t;d++){let e=h[d];Li.makeClockwise(e),e.push(e[0]),e.push(e[1])}return h.length}clipEndWithSlot(y){this.clipAttachment&&this.clipAttachment.endSlot==y.data&&this.clipEnd()}clipEnd(){this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)}isClipping(){return this.clipAttachment!=null}clipTriangles(y,n,m,S,x,h,d,t){let e,l,i,s,r,o;typeof n=="number"?(e=m,l=S,i=x,s=h,r=d,o=t):(e=n,l=m,i=S,s=x,r=h,o=d),i&&s&&r&&typeof o=="boolean"?this.clipTrianglesRender(y,e,l,i,s,r,o):this.clipTrianglesNoRender(y,e,l)}clipTrianglesNoRender(y,n,m){let S=this.clipOutput,x=this.clippedVertices,h=this.clippedTriangles,d=this.clippingPolygons,t=d.length,e=0;x.length=0,h.length=0;for(let l=0;l<m;l+=3){let i=n[l]<<1,s=y[i],r=y[i+1];i=n[l+1]<<1;let o=y[i],a=y[i+1];i=n[l+2]<<1;let u=y[i],f=y[i+1];for(let v=0;v<t;v++){let c=x.length;if(this.clip(s,r,o,a,u,f,d[v],S)){let g=S.length;if(g==0)continue;let p=g>>1,T=this.clipOutput,C=ut.setArraySize(x,c+p*2);for(let A=0;A<g;A+=2,c+=2){let R=T[A],P=T[A+1];C[c]=R,C[c+1]=P}c=h.length;let M=ut.setArraySize(h,c+3*(p-2));p--;for(let A=1;A<p;A++,c+=3)M[c]=e,M[c+1]=e+A,M[c+2]=e+A+1;e+=p+1}else{let g=ut.setArraySize(x,c+6);g[c]=s,g[c+1]=r,g[c+2]=o,g[c+3]=a,g[c+4]=u,g[c+5]=f,c=h.length;let p=ut.setArraySize(h,c+3);p[c]=e,p[c+1]=e+1,p[c+2]=e+2,e+=3;break}}}}clipTrianglesRender(y,n,m,S,x,h,d){let t=this.clipOutput,e=this.clippedVertices,l=this.clippedTriangles,i=this.clippingPolygons,s=i.length,r=d?12:8,o=0;e.length=0,l.length=0;for(let a=0;a<m;a+=3){let u=n[a]<<1,f=y[u],v=y[u+1],c=S[u],g=S[u+1];u=n[a+1]<<1;let p=y[u],T=y[u+1],C=S[u],M=S[u+1];u=n[a+2]<<1;let A=y[u],R=y[u+1],P=S[u],L=S[u+1];for(let F=0;F<s;F++){let w=e.length;if(this.clip(f,v,p,T,A,R,i[F],t)){let O=t.length;if(O==0)continue;let B=T-R,I=A-p,D=f-A,N=R-v,z=1/(B*D+I*(v-R)),V=O>>1,U=this.clipOutput,G=ut.setArraySize(e,w+V*r);for(let Y=0;Y<O;Y+=2,w+=r){let W=U[Y],H=U[Y+1];G[w]=W,G[w+1]=H,G[w+2]=x.r,G[w+3]=x.g,G[w+4]=x.b,G[w+5]=x.a;let X=W-A,K=H-R,Z=(B*X+I*K)*z,Q=(N*X+D*K)*z,j=1-Z-Q;G[w+6]=c*Z+C*Q+P*j,G[w+7]=g*Z+M*Q+L*j,d&&(G[w+8]=h.r,G[w+9]=h.g,G[w+10]=h.b,G[w+11]=h.a)}w=l.length;let b=ut.setArraySize(l,w+3*(V-2));V--;for(let Y=1;Y<V;Y++,w+=3)b[w]=o,b[w+1]=o+Y,b[w+2]=o+Y+1;o+=V+1}else{let O=ut.setArraySize(e,w+3*r);O[w]=f,O[w+1]=v,O[w+2]=x.r,O[w+3]=x.g,O[w+4]=x.b,O[w+5]=x.a,d?(O[w+6]=c,O[w+7]=g,O[w+8]=h.r,O[w+9]=h.g,O[w+10]=h.b,O[w+11]=h.a,O[w+12]=p,O[w+13]=T,O[w+14]=x.r,O[w+15]=x.g,O[w+16]=x.b,O[w+17]=x.a,O[w+18]=C,O[w+19]=M,O[w+20]=h.r,O[w+21]=h.g,O[w+22]=h.b,O[w+23]=h.a,O[w+24]=A,O[w+25]=R,O[w+26]=x.r,O[w+27]=x.g,O[w+28]=x.b,O[w+29]=x.a,O[w+30]=P,O[w+31]=L,O[w+32]=h.r,O[w+33]=h.g,O[w+34]=h.b,O[w+35]=h.a):(O[w+6]=c,O[w+7]=g,O[w+8]=p,O[w+9]=T,O[w+10]=x.r,O[w+11]=x.g,O[w+12]=x.b,O[w+13]=x.a,O[w+14]=C,O[w+15]=M,O[w+16]=A,O[w+17]=R,O[w+18]=x.r,O[w+19]=x.g,O[w+20]=x.b,O[w+21]=x.a,O[w+22]=P,O[w+23]=L),w=l.length;let B=ut.setArraySize(l,w+3);B[w]=o,B[w+1]=o+1,B[w+2]=o+2,o+=3;break}}}}clipTrianglesUnpacked(y,n,m,S){let x=this.clipOutput,h=this.clippedVertices,d=this.clippedUVs,t=this.clippedTriangles,e=this.clippingPolygons,l=e.length,i=0;h.length=0,d.length=0,t.length=0;for(let s=0;s<m;s+=3){let r=n[s]<<1,o=y[r],a=y[r+1],u=S[r],f=S[r+1];r=n[s+1]<<1;let v=y[r],c=y[r+1],g=S[r],p=S[r+1];r=n[s+2]<<1;let T=y[r],C=y[r+1],M=S[r],A=S[r+1];for(let R=0;R<l;R++){let P=h.length;if(this.clip(o,a,v,c,T,C,e[R],x)){let L=x.length;if(L==0)continue;let F=c-C,w=T-v,O=o-T,B=C-a,I=1/(F*O+w*(a-C)),D=L>>1,N=this.clipOutput,z=ut.setArraySize(h,P+D*2),V=ut.setArraySize(d,P+D*2);for(let G=0;G<L;G+=2,P+=2){let b=N[G],Y=N[G+1];z[P]=b,z[P+1]=Y;let W=b-T,H=Y-C,X=(F*W+w*H)*I,K=(B*W+O*H)*I,Z=1-X-K;V[P]=u*X+g*K+M*Z,V[P+1]=f*X+p*K+A*Z}P=t.length;let U=ut.setArraySize(t,P+3*(D-2));D--;for(let G=1;G<D;G++,P+=3)U[P]=i,U[P+1]=i+G,U[P+2]=i+G+1;i+=D+1}else{let L=ut.setArraySize(h,P+6);L[P]=o,L[P+1]=a,L[P+2]=v,L[P+3]=c,L[P+4]=T,L[P+5]=C;let F=ut.setArraySize(d,P+3*2);F[P]=u,F[P+1]=f,F[P+2]=g,F[P+3]=p,F[P+4]=M,F[P+5]=A,P=t.length;let w=ut.setArraySize(t,P+3);w[P]=i,w[P+1]=i+1,w[P+2]=i+2,i+=3;break}}}}clip(y,n,m,S,x,h,d,t){let e=t,l=!1,i;d.length%4>=2?(i=t,t=this.scratch):i=this.scratch,i.length=0,i.push(y),i.push(n),i.push(m),i.push(S),i.push(x),i.push(h),i.push(y),i.push(n),t.length=0;let s=d.length-4,r=d;for(let o=0;;o+=2){let a=r[o],u=r[o+1],f=a-r[o+2],v=u-r[o+3],c=t.length,g=i;for(let T=0,C=i.length-2;T<C;){let M=g[T],A=g[T+1];T+=2;let R=g[T],P=g[T+1],L=v*(a-R)>f*(u-P),F=v*(a-M)-f*(u-A);if(F>0){if(L){t.push(R),t.push(P);continue}let w=R-M,O=P-A,B=F/(w*v-O*f);if(B>=0&&B<=1)t.push(M+w*B),t.push(A+O*B);else{t.push(R),t.push(P);continue}}else if(L){let w=R-M,O=P-A,B=F/(w*v-O*f);if(B>=0&&B<=1)t.push(M+w*B),t.push(A+O*B),t.push(R),t.push(P);else{t.push(R),t.push(P);continue}}l=!0}if(c==t.length)return e.length=0,!0;if(t.push(t[0]),t.push(t[1]),o==s)break;let p=t;t=i,t.length=0,i=p}if(e!=t){e.length=0;for(let o=0,a=t.length-2;o<a;o++)e[o]=t[o]}else e.length=e.length-2;return l}static makeClockwise(y){let n=y,m=y.length,S=n[m-2]*n[1]-n[0]*n[m-1],x=0,h=0,d=0,t=0;for(let e=0,l=m-3;e<l;e+=2)x=n[e],h=n[e+1],d=n[e+2],t=n[e+3],S+=x*t-d*h;if(!(S<0))for(let e=0,l=m-2,i=m>>1;e<i;e+=2){let s=n[e],r=n[e+1],o=l-e;n[e]=n[o],n[e+1]=n[o+1],n[o]=s,n[o+1]=r}}},La=class{constructor(E){$(this,"attachmentLoader");$(this,"scale",1);$(this,"linkedMeshes",new Array);this.attachmentLoader=E}readSkeletonData(E){let y=this.scale,n=new un,m=typeof E=="string"?JSON.parse(E):E,S=m.skeleton;if(S&&(n.hash=S.hash,n.version=S.spine,n.x=S.x,n.y=S.y,n.width=S.width,n.height=S.height,n.referenceScale=st(S,"referenceScale",100)*y,n.fps=S.fps,n.imagesPath=S.images??null,n.audioPath=S.audio??null),m.bones)for(let x=0;x<m.bones.length;x++){let h=m.bones[x],d=null,t=st(h,"parent",null);t&&(d=n.findBone(t));let e=new tn(n.bones.length,h.name,d);e.length=st(h,"length",0)*y,e.x=st(h,"x",0)*y,e.y=st(h,"y",0)*y,e.rotation=st(h,"rotation",0),e.scaleX=st(h,"scaleX",1),e.scaleY=st(h,"scaleY",1),e.shearX=st(h,"shearX",0),e.shearY=st(h,"shearY",0),e.inherit=ut.enumValue(Ri,st(h,"inherit","Normal")),e.skinRequired=st(h,"skin",!1);let l=st(h,"color",null);l&&e.color.setFromString(l),n.bones.push(e)}if(m.slots)for(let x=0;x<m.slots.length;x++){let h=m.slots[x],d=h.name,t=n.findBone(h.bone);if(!t)throw new Error(`Couldn't find bone ${h.bone} for slot ${d}`);let e=new fn(n.slots.length,d,t),l=st(h,"color",null);l&&e.color.setFromString(l);let i=st(h,"dark",null);i&&(e.darkColor=It.fromString(i)),e.attachmentName=st(h,"attachment",null),e.blendMode=ut.enumValue(dn,st(h,"blend","normal")),e.visible=st(h,"visible",!0),n.slots.push(e)}if(m.ik)for(let x=0;x<m.ik.length;x++){let h=m.ik[x],d=new nn(h.name);d.order=st(h,"order",0),d.skinRequired=st(h,"skin",!1);for(let e=0;e<h.bones.length;e++){let l=n.findBone(h.bones[e]);if(!l)throw new Error(`Couldn't find bone ${h.bones[e]} for IK constraint ${h.name}.`);d.bones.push(l)}let t=n.findBone(h.target);if(!t)throw new Error(`Couldn't find target bone ${h.target} for IK constraint ${h.name}.`);d.target=t,d.mix=st(h,"mix",1),d.softness=st(h,"softness",0)*y,d.bendDirection=st(h,"bendPositive",!0)?1:-1,d.compress=st(h,"compress",!1),d.stretch=st(h,"stretch",!1),d.uniform=st(h,"uniform",!1),n.ikConstraints.push(d)}if(m.transform)for(let x=0;x<m.transform.length;x++){let h=m.transform[x],d=new vn(h.name);d.order=st(h,"order",0),d.skinRequired=st(h,"skin",!1);for(let l=0;l<h.bones.length;l++){let i=h.bones[l],s=n.findBone(i);if(!s)throw new Error(`Couldn't find bone ${i} for transform constraint ${h.name}.`);d.bones.push(s)}let t=h.target,e=n.findBone(t);if(!e)throw new Error(`Couldn't find target bone ${t} for transform constraint ${h.name}.`);d.target=e,d.local=st(h,"local",!1),d.relative=st(h,"relative",!1),d.offsetRotation=st(h,"rotation",0),d.offsetX=st(h,"x",0)*y,d.offsetY=st(h,"y",0)*y,d.offsetScaleX=st(h,"scaleX",0),d.offsetScaleY=st(h,"scaleY",0),d.offsetShearY=st(h,"shearY",0),d.mixRotate=st(h,"mixRotate",1),d.mixX=st(h,"mixX",1),d.mixY=st(h,"mixY",d.mixX),d.mixScaleX=st(h,"mixScaleX",1),d.mixScaleY=st(h,"mixScaleY",d.mixScaleX),d.mixShearY=st(h,"mixShearY",1),n.transformConstraints.push(d)}if(m.path)for(let x=0;x<m.path.length;x++){let h=m.path[x],d=new rn(h.name);d.order=st(h,"order",0),d.skinRequired=st(h,"skin",!1);for(let l=0;l<h.bones.length;l++){let i=h.bones[l],s=n.findBone(i);if(!s)throw new Error(`Couldn't find bone ${i} for path constraint ${h.name}.`);d.bones.push(s)}let t=h.target,e=n.findSlot(t);if(!e)throw new Error(`Couldn't find target slot ${t} for path constraint ${h.name}.`);d.target=e,d.positionMode=ut.enumValue(an,st(h,"positionMode","Percent")),d.spacingMode=ut.enumValue(on,st(h,"spacingMode","Length")),d.rotateMode=ut.enumValue(hn,st(h,"rotateMode","Tangent")),d.offsetRotation=st(h,"rotation",0),d.position=st(h,"position",0),d.positionMode==0&&(d.position*=y),d.spacing=st(h,"spacing",0),(d.spacingMode==0||d.spacingMode==1)&&(d.spacing*=y),d.mixRotate=st(h,"mixRotate",1),d.mixX=st(h,"mixX",1),d.mixY=st(h,"mixY",d.mixX),n.pathConstraints.push(d)}if(m.physics)for(let x=0;x<m.physics.length;x++){const h=m.physics[x],d=new ln(h.name);d.order=st(h,"order",0),d.skinRequired=st(h,"skin",!1);const t=h.bone,e=n.findBone(t);if(e==null)throw new Error("Physics bone not found: "+t);d.bone=e,d.x=st(h,"x",0),d.y=st(h,"y",0),d.rotate=st(h,"rotate",0),d.scaleX=st(h,"scaleX",0),d.shearX=st(h,"shearX",0),d.limit=st(h,"limit",5e3)*y,d.step=1/st(h,"fps",60),d.inertia=st(h,"inertia",1),d.strength=st(h,"strength",100),d.damping=st(h,"damping",1),d.massInverse=1/st(h,"mass",1),d.wind=st(h,"wind",0),d.gravity=st(h,"gravity",0),d.mix=st(h,"mix",1),d.inertiaGlobal=st(h,"inertiaGlobal",!1),d.strengthGlobal=st(h,"strengthGlobal",!1),d.dampingGlobal=st(h,"dampingGlobal",!1),d.massGlobal=st(h,"massGlobal",!1),d.windGlobal=st(h,"windGlobal",!1),d.gravityGlobal=st(h,"gravityGlobal",!1),d.mixGlobal=st(h,"mixGlobal",!1),n.physicsConstraints.push(d)}if(m.skins)for(let x=0;x<m.skins.length;x++){let h=m.skins[x],d=new Pi(h.name);if(h.bones)for(let t=0;t<h.bones.length;t++){let e=h.bones[t],l=n.findBone(e);if(!l)throw new Error(`Couldn't find bone ${e} for skin ${h.name}.`);d.bones.push(l)}if(h.ik)for(let t=0;t<h.ik.length;t++){let e=h.ik[t],l=n.findIkConstraint(e);if(!l)throw new Error(`Couldn't find IK constraint ${e} for skin ${h.name}.`);d.constraints.push(l)}if(h.transform)for(let t=0;t<h.transform.length;t++){let e=h.transform[t],l=n.findTransformConstraint(e);if(!l)throw new Error(`Couldn't find transform constraint ${e} for skin ${h.name}.`);d.constraints.push(l)}if(h.path)for(let t=0;t<h.path.length;t++){let e=h.path[t],l=n.findPathConstraint(e);if(!l)throw new Error(`Couldn't find path constraint ${e} for skin ${h.name}.`);d.constraints.push(l)}if(h.physics)for(let t=0;t<h.physics.length;t++){let e=h.physics[t],l=n.findPhysicsConstraint(e);if(!l)throw new Error(`Couldn't find physics constraint ${e} for skin ${h.name}.`);d.constraints.push(l)}for(let t in h.attachments){let e=n.findSlot(t);if(!e)throw new Error(`Couldn't find slot ${t} for skin ${h.name}.`);let l=h.attachments[t];for(let i in l){let s=this.readAttachment(l[i],d,e.index,i,n);s&&d.setAttachment(e.index,i,s)}}n.skins.push(d),d.name=="default"&&(n.defaultSkin=d)}for(let x=0,h=this.linkedMeshes.length;x<h;x++){let d=this.linkedMeshes[x],t=d.skin?n.findSkin(d.skin):n.defaultSkin;if(!t)throw new Error(`Skin not found: ${d.skin}`);let e=t.getAttachment(d.slotIndex,d.parent);if(!e)throw new Error(`Parent mesh not found: ${d.parent}`);d.mesh.timelineAttachment=d.inheritTimeline?e:d.mesh,d.mesh.setParentMesh(e),d.mesh.region!=null&&d.mesh.updateRegion()}if(this.linkedMeshes.length=0,m.events)for(let x in m.events){let h=m.events[x],d=new sn(x);d.intValue=st(h,"int",0),d.floatValue=st(h,"float",0),d.stringValue=st(h,"string",""),d.audioPath=st(h,"audio",null),d.audioPath&&(d.volume=st(h,"volume",1),d.balance=st(h,"balance",0)),n.events.push(d)}if(m.animations)for(let x in m.animations){let h=m.animations[x];this.readAnimation(h,x,n)}return n}readAttachment(E,y,n,m,S){let x=this.scale;switch(m=st(E,"name",m),st(E,"type","region")){case"region":{let h=st(E,"path",m),d=this.readSequence(st(E,"sequence",null)),t=this.attachmentLoader.newRegionAttachment(y,m,h,d);if(!t)return null;t.path=h,t.x=st(E,"x",0)*x,t.y=st(E,"y",0)*x,t.scaleX=st(E,"scaleX",1),t.scaleY=st(E,"scaleY",1),t.rotation=st(E,"rotation",0),t.width=E.width*x,t.height=E.height*x,t.sequence=d;let e=st(E,"color",null);return e&&t.color.setFromString(e),t.region!=null&&t.updateRegion(),t}case"boundingbox":{let h=this.attachmentLoader.newBoundingBoxAttachment(y,m);if(!h)return null;this.readVertices(E,h,E.vertexCount<<1);let d=st(E,"color",null);return d&&h.color.setFromString(d),h}case"mesh":case"linkedmesh":{let h=st(E,"path",m),d=this.readSequence(st(E,"sequence",null)),t=this.attachmentLoader.newMeshAttachment(y,m,h,d);if(!t)return null;t.path=h;let e=st(E,"color",null);e&&t.color.setFromString(e),t.width=st(E,"width",0)*x,t.height=st(E,"height",0)*x,t.sequence=d;let l=st(E,"parent",null);if(l)return this.linkedMeshes.push(new Fa(t,st(E,"skin",null),n,l,st(E,"timelines",!0))),t;let i=E.uvs;return this.readVertices(E,t,i.length),t.triangles=E.triangles,t.regionUVs=i,t.region!=null&&t.updateRegion(),t.edges=st(E,"edges",null),t.hullLength=st(E,"hull",0)*2,t}case"path":{let h=this.attachmentLoader.newPathAttachment(y,m);if(!h)return null;h.closed=st(E,"closed",!1),h.constantSpeed=st(E,"constantSpeed",!0);let d=E.vertexCount;this.readVertices(E,h,d<<1);let t=ut.newArray(d/3,0);for(let l=0;l<E.lengths.length;l++)t[l]=E.lengths[l]*x;h.lengths=t;let e=st(E,"color",null);return e&&h.color.setFromString(e),h}case"point":{let h=this.attachmentLoader.newPointAttachment(y,m);if(!h)return null;h.x=st(E,"x",0)*x,h.y=st(E,"y",0)*x,h.rotation=st(E,"rotation",0);let d=st(E,"color",null);return d&&h.color.setFromString(d),h}case"clipping":{let h=this.attachmentLoader.newClippingAttachment(y,m);if(!h)return null;let d=st(E,"end",null);d&&(h.endSlot=S.findSlot(d));let t=E.vertexCount;this.readVertices(E,h,t<<1);let e=st(E,"color",null);return e&&h.color.setFromString(e),h}}return null}readSequence(E){if(E==null)return null;let y=new cs(st(E,"count",0));return y.start=st(E,"start",1),y.digits=st(E,"digits",0),y.setupIndex=st(E,"setup",0),y}readVertices(E,y,n){let m=this.scale;y.worldVerticesLength=n;let S=E.vertices;if(n==S.length){let d=ut.toFloatArray(S);if(m!=1)for(let t=0,e=S.length;t<e;t++)d[t]*=m;y.vertices=d;return}let x=new Array,h=new Array;for(let d=0,t=S.length;d<t;){let e=S[d++];h.push(e);for(let l=d+e*4;d<l;d+=4)h.push(S[d]),x.push(S[d+1]*m),x.push(S[d+2]*m),x.push(S[d+3])}y.bones=h,y.vertices=ut.toFloatArray(x)}readAnimation(E,y,n){let m=this.scale,S=new Array;if(E.slots)for(let h in E.slots){let d=E.slots[h],t=n.findSlot(h);if(!t)throw new Error("Slot not found: "+h);let e=t.index;for(let l in d){let i=d[l];if(!i)continue;let s=i.length;if(l=="attachment"){let r=new je(s,e);for(let o=0;o<s;o++){let a=i[o];r.setFrame(o,st(a,"time",0),st(a,"name",null))}S.push(r)}else if(l=="rgba"){let r=new Ps(s,s<<2,e),o=i[0],a=st(o,"time",0),u=It.fromString(o.color);for(let f=0,v=0;;f++){r.setFrame(f,a,u.r,u.g,u.b,u.a);let c=i[f+1];if(!c){r.shrink(v);break}let g=st(c,"time",0),p=It.fromString(c.color),T=o.curve;T&&(v=Wt(T,r,v,f,0,a,g,u.r,p.r,1),v=Wt(T,r,v,f,1,a,g,u.g,p.g,1),v=Wt(T,r,v,f,2,a,g,u.b,p.b,1),v=Wt(T,r,v,f,3,a,g,u.a,p.a,1)),a=g,u=p,o=c}S.push(r)}else if(l=="rgb"){let r=new Ls(s,s*3,e),o=i[0],a=st(o,"time",0),u=It.fromString(o.color);for(let f=0,v=0;;f++){r.setFrame(f,a,u.r,u.g,u.b);let c=i[f+1];if(!c){r.shrink(v);break}let g=st(c,"time",0),p=It.fromString(c.color),T=o.curve;T&&(v=Wt(T,r,v,f,0,a,g,u.r,p.r,1),v=Wt(T,r,v,f,1,a,g,u.g,p.g,1),v=Wt(T,r,v,f,2,a,g,u.b,p.b,1)),a=g,u=p,o=c}S.push(r)}else if(l=="alpha")S.push(xe(i,new Fs(s,s,e),0,1));else if(l=="rgba2"){let r=new Os(s,s*7,e),o=i[0],a=st(o,"time",0),u=It.fromString(o.light),f=It.fromString(o.dark);for(let v=0,c=0;;v++){r.setFrame(v,a,u.r,u.g,u.b,u.a,f.r,f.g,f.b);let g=i[v+1];if(!g){r.shrink(c);break}let p=st(g,"time",0),T=It.fromString(g.light),C=It.fromString(g.dark),M=o.curve;M&&(c=Wt(M,r,c,v,0,a,p,u.r,T.r,1),c=Wt(M,r,c,v,1,a,p,u.g,T.g,1),c=Wt(M,r,c,v,2,a,p,u.b,T.b,1),c=Wt(M,r,c,v,3,a,p,u.a,T.a,1),c=Wt(M,r,c,v,4,a,p,f.r,C.r,1),c=Wt(M,r,c,v,5,a,p,f.g,C.g,1),c=Wt(M,r,c,v,6,a,p,f.b,C.b,1)),a=p,u=T,f=C,o=g}S.push(r)}else if(l=="rgb2"){let r=new ws(s,s*6,e),o=i[0],a=st(o,"time",0),u=It.fromString(o.light),f=It.fromString(o.dark);for(let v=0,c=0;;v++){r.setFrame(v,a,u.r,u.g,u.b,f.r,f.g,f.b);let g=i[v+1];if(!g){r.shrink(c);break}let p=st(g,"time",0),T=It.fromString(g.light),C=It.fromString(g.dark),M=o.curve;M&&(c=Wt(M,r,c,v,0,a,p,u.r,T.r,1),c=Wt(M,r,c,v,1,a,p,u.g,T.g,1),c=Wt(M,r,c,v,2,a,p,u.b,T.b,1),c=Wt(M,r,c,v,3,a,p,f.r,C.r,1),c=Wt(M,r,c,v,4,a,p,f.g,C.g,1),c=Wt(M,r,c,v,5,a,p,f.b,C.b,1)),a=p,u=T,f=C,o=g}S.push(r)}}}if(E.bones)for(let h in E.bones){let d=E.bones[h],t=n.findBone(h);if(!t)throw new Error("Bone not found: "+h);let e=t.index;for(let l in d){let i=d[l],s=i.length;if(s!=0){if(l==="rotate")S.push(xe(i,new hi(s,s,e),0,1));else if(l==="translate"){let r=new gs(s,s<<1,e);S.push(Ci(i,r,"x","y",0,m))}else if(l==="translatex"){let r=new xs(s,s,e);S.push(xe(i,r,0,m))}else if(l==="translatey"){let r=new ys(s,s,e);S.push(xe(i,r,0,m))}else if(l==="scale"){let r=new Ts(s,s<<1,e);S.push(Ci(i,r,"x","y",1,1))}else if(l==="scalex"){let r=new Ss(s,s,e);S.push(xe(i,r,1,1))}else if(l==="scaley"){let r=new Cs(s,s,e);S.push(xe(i,r,1,1))}else if(l==="shear"){let r=new Es(s,s<<1,e);S.push(Ci(i,r,"x","y",0,1))}else if(l==="shearx"){let r=new As(s,s,e);S.push(xe(i,r,0,1))}else if(l==="sheary"){let r=new Ms(s,s,e);S.push(xe(i,r,0,1))}else if(l==="inherit"){let r=new Rs(s,t.index);for(let o=0;o<i.length;o++){let a=i[o];r.setFrame(o,st(a,"time",0),ut.enumValue(Ri,st(a,"inherit","Normal")))}S.push(r)}}}}if(E.ik)for(let h in E.ik){let d=E.ik[h],t=d[0];if(!t)continue;let e=n.findIkConstraint(h);if(!e)throw new Error("IK Constraint not found: "+h);let l=n.ikConstraints.indexOf(e),i=new Bs(d.length,d.length<<1,l),s=st(t,"time",0),r=st(t,"mix",1),o=st(t,"softness",0)*m;for(let a=0,u=0;;a++){i.setFrame(a,s,r,o,st(t,"bendPositive",!0)?1:-1,st(t,"compress",!1),st(t,"stretch",!1));let f=d[a+1];if(!f){i.shrink(u);break}let v=st(f,"time",0),c=st(f,"mix",1),g=st(f,"softness",0)*m,p=t.curve;p&&(u=Wt(p,i,u,a,0,s,v,r,c,1),u=Wt(p,i,u,a,1,s,v,o,g,m)),s=v,r=c,o=g,t=f}S.push(i)}if(E.transform)for(let h in E.transform){let d=E.transform[h],t=d[0];if(!t)continue;let e=n.findTransformConstraint(h);if(!e)throw new Error("Transform constraint not found: "+h);let l=n.transformConstraints.indexOf(e),i=new Is(d.length,d.length*6,l),s=st(t,"time",0),r=st(t,"mixRotate",1),o=st(t,"mixX",1),a=st(t,"mixY",o),u=st(t,"mixScaleX",1),f=st(t,"mixScaleY",u),v=st(t,"mixShearY",1);for(let c=0,g=0;;c++){i.setFrame(c,s,r,o,a,u,f,v);let p=d[c+1];if(!p){i.shrink(g);break}let T=st(p,"time",0),C=st(p,"mixRotate",1),M=st(p,"mixX",1),A=st(p,"mixY",M),R=st(p,"mixScaleX",1),P=st(p,"mixScaleY",R),L=st(p,"mixShearY",1),F=t.curve;F&&(g=Wt(F,i,g,c,0,s,T,r,C,1),g=Wt(F,i,g,c,1,s,T,o,M,1),g=Wt(F,i,g,c,2,s,T,a,A,1),g=Wt(F,i,g,c,3,s,T,u,R,1),g=Wt(F,i,g,c,4,s,T,f,P,1),g=Wt(F,i,g,c,5,s,T,v,L,1)),s=T,r=C,o=M,a=A,u=R,f=P,u=R,t=p}S.push(i)}if(E.path)for(let h in E.path){let d=E.path[h],t=n.findPathConstraint(h);if(!t)throw new Error("Path constraint not found: "+h);let e=n.pathConstraints.indexOf(t);for(let l in d){let i=d[l],s=i[0];if(!s)continue;let r=i.length;if(l==="position"){let o=new Ns(r,r,e);S.push(xe(i,o,0,t.positionMode==0?m:1))}else if(l==="spacing"){let o=new bs(r,r,e);S.push(xe(i,o,0,t.spacingMode==0||t.spacingMode==1?m:1))}else if(l==="mix"){let o=new Gs(r,r*3,e),a=st(s,"time",0),u=st(s,"mixRotate",1),f=st(s,"mixX",1),v=st(s,"mixY",f);for(let c=0,g=0;;c++){o.setFrame(c,a,u,f,v);let p=i[c+1];if(!p){o.shrink(g);break}let T=st(p,"time",0),C=st(p,"mixRotate",1),M=st(p,"mixX",1),A=st(p,"mixY",M),R=s.curve;R&&(g=Wt(R,o,g,c,0,a,T,u,C,1),g=Wt(R,o,g,c,1,a,T,f,M,1),g=Wt(R,o,g,c,2,a,T,v,A,1)),a=T,u=C,f=M,v=A,s=p}S.push(o)}}}if(E.physics)for(let h in E.physics){let d=E.physics[h],t=-1;if(h.length>0){let e=n.findPhysicsConstraint(h);if(!e)throw new Error("Physics constraint not found: "+h);t=n.physicsConstraints.indexOf(e)}for(let e in d){let l=d[e],i=l[0];if(!i)continue;let s=l.length;if(e=="reset"){const o=new Ks(s,t);for(let a=0;i!=null;i=l[a+1],a++)o.setFrame(a,st(i,"time",0));S.push(o);continue}let r;if(e=="inertia")r=new Us(s,s,t);else if(e=="strength")r=new zs(s,s,t);else if(e=="damping")r=new Ys(s,s,t);else if(e=="mass")r=new Vs(s,s,t);else if(e=="wind")r=new Xs(s,s,t);else if(e=="gravity")r=new Ws(s,s,t);else if(e=="mix")r=new Hs(s,s,t);else continue;S.push(xe(l,r,0,1))}}if(E.attachments)for(let h in E.attachments){let d=E.attachments[h],t=n.findSkin(h);if(!t)throw new Error("Skin not found: "+h);for(let e in d){let l=d[e],i=n.findSlot(e);if(!i)throw new Error("Slot not found: "+e);let s=i.index;for(let r in l){let o=l[r],a=t.getAttachment(s,r);for(let u in o){let f=o[u],v=f[0];if(v){if(u=="deform"){let c=a.bones,g=a.vertices,p=c?g.length/3*2:g.length,T=new Ds(f.length,f.length,s,a),C=st(v,"time",0);for(let M=0,A=0;;M++){let R,P=st(v,"vertices",null);if(!P)R=c?ut.newFloatArray(p):g;else{R=ut.newFloatArray(p);let O=st(v,"offset",0);if(ut.arrayCopy(P,0,R,O,P.length),m!=1)for(let B=O,I=B+P.length;B<I;B++)R[B]*=m;if(!c)for(let B=0;B<p;B++)R[B]+=g[B]}T.setFrame(M,C,R);let L=f[M+1];if(!L){T.shrink(A);break}let F=st(L,"time",0),w=v.curve;w&&(A=Wt(w,T,A,M,0,C,F,0,1,1)),C=F,v=L}S.push(T)}else if(u=="sequence"){let c=new Zs(f.length,s,a),g=0;for(let p=0;p<f.length;p++){let T=st(v,"delay",g),C=st(v,"time",0),M=ps[st(v,"mode","hold")],A=st(v,"index",0);c.setFrame(p,C,M,A,T),g=T,v=f[p+1]}S.push(c)}}}}}}if(E.drawOrder){let h=new ti(E.drawOrder.length),d=n.slots.length,t=0;for(let e=0;e<E.drawOrder.length;e++,t++){let l=E.drawOrder[e],i=null,s=st(l,"offsets",null);if(s){i=ut.newArray(d,-1);let r=ut.newArray(d-s.length,0),o=0,a=0;for(let u=0;u<s.length;u++){let f=s[u],v=n.findSlot(f.slot);if(!v)throw new Error("Slot not found: "+v);let c=v.index;for(;o!=c;)r[a++]=o++;i[o+f.offset]=o++}for(;o<d;)r[a++]=o++;for(let u=d-1;u>=0;u--)i[u]==-1&&(i[u]=r[--a])}h.setFrame(t,st(l,"time",0),i)}S.push(h)}if(E.events){let h=new Ii(E.events.length),d=0;for(let t=0;t<E.events.length;t++,d++){let e=E.events[t],l=n.findEvent(e.name);if(!l)throw new Error("Event not found: "+e.name);let i=new en(ut.toSinglePrecision(st(e,"time",0)),l);i.intValue=st(e,"int",l.intValue),i.floatValue=st(e,"float",l.floatValue),i.stringValue=st(e,"string",l.stringValue),i.data.audioPath&&(i.volume=st(e,"volume",1),i.balance=st(e,"balance",0)),h.setFrame(d,i)}S.push(h)}let x=0;for(let h=0,d=S.length;h<d;h++)x=Math.max(x,S[h].getDuration());n.animations.push(new Di(y,S,x))}},Fa=class{constructor(E,y,n,m,S){$(this,"parent");$(this,"skin");$(this,"slotIndex");$(this,"mesh");$(this,"inheritTimeline");this.mesh=E,this.skin=y,this.slotIndex=n,this.parent=m,this.inheritTimeline=S}};function xe(E,y,n,m){let S=E[0],x=st(S,"time",0),h=st(S,"value",n)*m,d=0;for(let t=0;;t++){y.setFrame(t,x,h);let e=E[t+1];if(!e)return y.shrink(d),y;let l=st(e,"time",0),i=st(e,"value",n)*m;S.curve&&(d=Wt(S.curve,y,d,t,0,x,l,h,i,m)),x=l,h=i,S=e}}function Ci(E,y,n,m,S,x){let h=E[0],d=st(h,"time",0),t=st(h,n,S)*x,e=st(h,m,S)*x,l=0;for(let i=0;;i++){y.setFrame(i,d,t,e);let s=E[i+1];if(!s)return y.shrink(l),y;let r=st(s,"time",0),o=st(s,n,S)*x,a=st(s,m,S)*x,u=h.curve;u&&(l=Wt(u,y,l,i,0,d,r,t,o,x),l=Wt(u,y,l,i,1,d,r,e,a,x)),d=r,t=o,e=a,h=s}}function Wt(E,y,n,m,S,x,h,d,t,e){if(E=="stepped")return y.setStepped(m),n;let l=S<<2,i=E[l],s=E[l+1]*e,r=E[l+2],o=E[l+3]*e;return y.setBezier(n,m,S,x,d,i,s,r,o,h,t),n+1}function st(E,y,n){return E[y]!==void 0?E[y]:n}typeof Math.fround>"u"&&(Math.fround=function(E){return function(y){return E[0]=y,E[0]}}(new Float32Array(1)));var Oa=class extends js{constructor(E){super(E)}setFilters(E,y){}setWraps(E,y){}dispose(){}},wa=ut.newFloatArray(8),Me,Da=(Me=class{constructor(y){$(this,"ctx");$(this,"triangleRendering",!1);$(this,"debugRendering",!1);$(this,"vertices",ut.newFloatArray(8*1024));$(this,"tempColor",new It);this.ctx=y}draw(y){this.triangleRendering?this.drawTriangles(y):this.drawImages(y)}drawImages(y){let n=this.ctx,m=this.tempColor,S=y.color,x=y.drawOrder;this.debugRendering&&(n.strokeStyle="green");for(let h=0,d=x.length;h<d;h++){let t=x[h],e=t.bone;if(!e.active)continue;let l=t.getAttachment();if(!(l instanceof Zt))continue;l.computeWorldVertices(t,wa,0,2);let i=l.region,s=i.texture.getImage(),r=t.color,o=l.color;m.set(S.r*r.r*o.r,S.g*r.g*o.g,S.b*r.b*o.b,S.a*r.a*o.a),n.save(),n.transform(e.a,e.c,e.b,e.d,e.worldX,e.worldY),n.translate(l.offset[0],l.offset[1]),n.rotate(l.rotation*Math.PI/180);let a=l.width/i.originalWidth;n.scale(a*l.scaleX,a*l.scaleY);let u=i.width,f=i.height;if(n.translate(u/2,f/2),l.region.degrees==90){let v=u;u=f,f=v,n.rotate(-Math.PI/2)}n.scale(1,-1),n.translate(-u/2,-f/2),n.globalAlpha=m.a,n.drawImage(s,s.width*i.u,s.height*i.v,u,f,0,0,u,f),this.debugRendering&&n.strokeRect(0,0,u,f),n.restore()}}drawTriangles(y){let n=this.ctx,m=this.tempColor,S=y.color,x=y.drawOrder,h=null,d=this.vertices,t=null;for(let l=0,i=x.length;l<i;l++){let s=x[l],r=s.getAttachment(),o;if(r instanceof Zt){let a=r;d=this.computeRegionVertices(s,a,!1),t=Me.QUAD_TRIANGLES,o=a.region.texture.getImage()}else if(r instanceof _e){let a=r;d=this.computeMeshVertices(s,a,!1),t=a.triangles,o=a.region.texture.getImage()}else continue;if(o){s.data.blendMode!=h&&(h=s.data.blendMode);let a=s.color,u=r.color;m.set(S.r*a.r*u.r,S.g*a.g*u.g,S.b*a.b*u.b,S.a*a.a*u.a),n.globalAlpha=m.a;for(var e=0;e<t.length;e+=3){let f=t[e]*8,v=t[e+1]*8,c=t[e+2]*8,g=d[f],p=d[f+1],T=d[f+6],C=d[f+7],M=d[v],A=d[v+1],R=d[v+6],P=d[v+7],L=d[c],F=d[c+1],w=d[c+6],O=d[c+7];this.drawTriangle(o,g,p,T,C,M,A,R,P,L,F,w,O),this.debugRendering&&(n.strokeStyle="green",n.beginPath(),n.moveTo(g,p),n.lineTo(M,A),n.lineTo(L,F),n.lineTo(g,p),n.stroke())}}}this.ctx.globalAlpha=1}drawTriangle(y,n,m,S,x,h,d,t,e,l,i,s,r){let o=this.ctx;const a=y.width-1,u=y.height-1;S*=a,x*=u,t*=a,e*=u,s*=a,r*=u,o.beginPath(),o.moveTo(n,m),o.lineTo(h,d),o.lineTo(l,i),o.closePath(),h-=n,d-=m,l-=n,i-=m,t-=S,e-=x,s-=S,r-=x;let f=t*r-s*e;if(f==0)return;f=1/f;const v=(r*h-e*l)*f,c=(r*d-e*i)*f,g=(t*l-s*h)*f,p=(t*i-s*d)*f,T=n-v*S-g*x,C=m-c*S-p*x;o.save(),o.transform(v,c,g,p,T,C),o.clip(),o.drawImage(y,0,0),o.restore()}computeRegionVertices(y,n,m){let S=y.bone.skeleton.color,x=y.color,h=n.color,d=S.a*x.a*h.a,t=m?d:1,e=this.tempColor;e.set(S.r*x.r*h.r*t,S.g*x.g*h.g*t,S.b*x.b*h.b*t,d),n.computeWorldVertices(y,this.vertices,0,Me.VERTEX_SIZE);let l=this.vertices,i=n.uvs;return l[Zt.C1R]=e.r,l[Zt.C1G]=e.g,l[Zt.C1B]=e.b,l[Zt.C1A]=e.a,l[Zt.U1]=i[0],l[Zt.V1]=i[1],l[Zt.C2R]=e.r,l[Zt.C2G]=e.g,l[Zt.C2B]=e.b,l[Zt.C2A]=e.a,l[Zt.U2]=i[2],l[Zt.V2]=i[3],l[Zt.C3R]=e.r,l[Zt.C3G]=e.g,l[Zt.C3B]=e.b,l[Zt.C3A]=e.a,l[Zt.U3]=i[4],l[Zt.V3]=i[5],l[Zt.C4R]=e.r,l[Zt.C4G]=e.g,l[Zt.C4B]=e.b,l[Zt.C4A]=e.a,l[Zt.U4]=i[6],l[Zt.V4]=i[7],l}computeMeshVertices(y,n,m){let S=y.bone.skeleton.color,x=y.color,h=n.color,d=S.a*x.a*h.a,t=m?d:1,e=this.tempColor;e.set(S.r*x.r*h.r*t,S.g*x.g*h.g*t,S.b*x.b*h.b*t,d);let l=n.worldVerticesLength/2,i=this.vertices;i.length<n.worldVerticesLength&&(this.vertices=i=ut.newFloatArray(n.worldVerticesLength)),n.computeWorldVertices(y,0,n.worldVerticesLength,i,0,Me.VERTEX_SIZE);let s=n.uvs;for(let r=0,o=0,a=2;r<l;r++)i[a++]=e.r,i[a++]=e.g,i[a++]=e.b,i[a++]=e.a,i[a++]=s[o++],i[a++]=s[o++],a+=2;return i}},$(Me,"QUAD_TRIANGLES",[0,1,2,2,3,0]),$(Me,"VERTEX_SIZE",8),Me),ve=class{constructor(E,y={alpha:!0}){$(this,"canvas");$(this,"gl");$(this,"restorables",[]);$(this,"contextLostHandler",E=>{E&&E.preventDefault()});$(this,"contextRestoredHandler",()=>{for(let E=0,y=this.restorables.length;E<y;E++)this.restorables[E].restore()});if(E instanceof WebGLRenderingContext||typeof WebGL2RenderingContext<"u"&&E instanceof WebGL2RenderingContext)this.gl=E,this.canvas=this.gl.canvas;else{const n=E;this.gl=n.getContext("webgl2",y)||n.getContext("webgl",y),this.canvas=n,n.addEventListener("webglcontextlost",this.contextLostHandler),n.addEventListener("webglcontextrestored",this.contextRestoredHandler)}}dispose(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler)}addRestorable(E){this.restorables.push(E)}removeRestorable(E){const y=this.restorables.indexOf(E);y>-1&&this.restorables.splice(y,1)}},ze,Ba=(ze=class extends js{constructor(n,m,S=!1){super(m);$(this,"context");$(this,"texture",null);$(this,"boundUnit",0);$(this,"useMipMaps",!1);this.context=n instanceof ve?n:new ve(n),this.useMipMaps=S,this.restore(),this.context.addRestorable(this)}setFilters(n,m){let S=this.context.gl;this.bind(),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,n),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,ze.validateMagFilter(m)),this.useMipMaps=ze.usesMipMaps(n),this.useMipMaps&&S.generateMipmap(S.TEXTURE_2D)}static validateMagFilter(n){switch(n){case 9987:case 9985:case 9986:case 9984:return 9729;default:return n}}static usesMipMaps(n){switch(n){case 9987:case 9985:case 9986:case 9984:return!0;default:return!1}}setWraps(n,m){let S=this.context.gl;this.bind(),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,n),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,m)}update(n){let m=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,this._image),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,n?m.LINEAR_MIPMAP_LINEAR:m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),n&&m.generateMipmap(m.TEXTURE_2D)}restore(){this.texture=null,this.update(this.useMipMaps)}bind(n=0){let m=this.context.gl;this.boundUnit=n,m.activeTexture(m.TEXTURE0+n),m.bindTexture(m.TEXTURE_2D,this.texture)}unbind(){let n=this.context.gl;n.activeTexture(n.TEXTURE0+this.boundUnit),n.bindTexture(n.TEXTURE_2D,null)}dispose(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)}},$(ze,"DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL",!1),ze),ke=class{constructor(E=0,y=0,n=0){$(this,"x",0);$(this,"y",0);$(this,"z",0);this.x=E,this.y=y,this.z=n}setFrom(E){return this.x=E.x,this.y=E.y,this.z=E.z,this}set(E,y,n){return this.x=E,this.y=y,this.z=n,this}add(E){return this.x+=E.x,this.y+=E.y,this.z+=E.z,this}sub(E){return this.x-=E.x,this.y-=E.y,this.z-=E.z,this}scale(E){return this.x*=E,this.y*=E,this.z*=E,this}normalize(){let E=this.length();return E==0?this:(E=1/E,this.x*=E,this.y*=E,this.z*=E,this)}cross(E){return this.set(this.y*E.z-this.z*E.y,this.z*E.x-this.x*E.z,this.x*E.y-this.y*E.x)}multiply(E){let y=E.values;return this.set(this.x*y[pt]+this.y*y[St]+this.z*y[Ct]+y[mt],this.x*y[Et]+this.y*y[gt]+this.z*y[At]+y[xt],this.x*y[Mt]+this.y*y[Rt]+this.z*y[yt]+y[Tt])}project(E){let y=E.values,n=1/(this.x*y[Ft]+this.y*y[Ot]+this.z*y[wt]+y[Pt]);return this.set((this.x*y[pt]+this.y*y[St]+this.z*y[Ct]+y[mt])*n,(this.x*y[Et]+this.y*y[gt]+this.z*y[At]+y[xt])*n,(this.x*y[Mt]+this.y*y[Rt]+this.z*y[yt]+y[Tt])*n)}dot(E){return this.x*E.x+this.y*E.y+this.z*E.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}distance(E){let y=E.x-this.x,n=E.y-this.y,m=E.z-this.z;return Math.sqrt(y*y+n*n+m*m)}},pt=0,St=4,Ct=8,mt=12,Et=1,gt=5,At=9,xt=13,Mt=2,Rt=6,yt=10,Tt=14,Ft=3,Ot=7,wt=11,Pt=15,ne,si=(ne=class{constructor(){$(this,"temp",new Float32Array(16));$(this,"values",new Float32Array(16));let y=this.values;y[pt]=1,y[gt]=1,y[yt]=1,y[Pt]=1}set(y){return this.values.set(y),this}transpose(){let y=this.temp,n=this.values;return y[pt]=n[pt],y[St]=n[Et],y[Ct]=n[Mt],y[mt]=n[Ft],y[Et]=n[St],y[gt]=n[gt],y[At]=n[Rt],y[xt]=n[Ot],y[Mt]=n[Ct],y[Rt]=n[At],y[yt]=n[yt],y[Tt]=n[wt],y[Ft]=n[mt],y[Ot]=n[xt],y[wt]=n[Tt],y[Pt]=n[Pt],this.set(y)}identity(){let y=this.values;return y[pt]=1,y[St]=0,y[Ct]=0,y[mt]=0,y[Et]=0,y[gt]=1,y[At]=0,y[xt]=0,y[Mt]=0,y[Rt]=0,y[yt]=1,y[Tt]=0,y[Ft]=0,y[Ot]=0,y[wt]=0,y[Pt]=1,this}invert(){let y=this.values,n=this.temp,m=y[Ft]*y[Rt]*y[At]*y[mt]-y[Mt]*y[Ot]*y[At]*y[mt]-y[Ft]*y[gt]*y[yt]*y[mt]+y[Et]*y[Ot]*y[yt]*y[mt]+y[Mt]*y[gt]*y[wt]*y[mt]-y[Et]*y[Rt]*y[wt]*y[mt]-y[Ft]*y[Rt]*y[Ct]*y[xt]+y[Mt]*y[Ot]*y[Ct]*y[xt]+y[Ft]*y[St]*y[yt]*y[xt]-y[pt]*y[Ot]*y[yt]*y[xt]-y[Mt]*y[St]*y[wt]*y[xt]+y[pt]*y[Rt]*y[wt]*y[xt]+y[Ft]*y[gt]*y[Ct]*y[Tt]-y[Et]*y[Ot]*y[Ct]*y[Tt]-y[Ft]*y[St]*y[At]*y[Tt]+y[pt]*y[Ot]*y[At]*y[Tt]+y[Et]*y[St]*y[wt]*y[Tt]-y[pt]*y[gt]*y[wt]*y[Tt]-y[Mt]*y[gt]*y[Ct]*y[Pt]+y[Et]*y[Rt]*y[Ct]*y[Pt]+y[Mt]*y[St]*y[At]*y[Pt]-y[pt]*y[Rt]*y[At]*y[Pt]-y[Et]*y[St]*y[yt]*y[Pt]+y[pt]*y[gt]*y[yt]*y[Pt];if(m==0)throw new Error("non-invertible matrix");let S=1/m;return n[pt]=y[At]*y[Tt]*y[Ot]-y[xt]*y[yt]*y[Ot]+y[xt]*y[Rt]*y[wt]-y[gt]*y[Tt]*y[wt]-y[At]*y[Rt]*y[Pt]+y[gt]*y[yt]*y[Pt],n[St]=y[mt]*y[yt]*y[Ot]-y[Ct]*y[Tt]*y[Ot]-y[mt]*y[Rt]*y[wt]+y[St]*y[Tt]*y[wt]+y[Ct]*y[Rt]*y[Pt]-y[St]*y[yt]*y[Pt],n[Ct]=y[Ct]*y[xt]*y[Ot]-y[mt]*y[At]*y[Ot]+y[mt]*y[gt]*y[wt]-y[St]*y[xt]*y[wt]-y[Ct]*y[gt]*y[Pt]+y[St]*y[At]*y[Pt],n[mt]=y[mt]*y[At]*y[Rt]-y[Ct]*y[xt]*y[Rt]-y[mt]*y[gt]*y[yt]+y[St]*y[xt]*y[yt]+y[Ct]*y[gt]*y[Tt]-y[St]*y[At]*y[Tt],n[Et]=y[xt]*y[yt]*y[Ft]-y[At]*y[Tt]*y[Ft]-y[xt]*y[Mt]*y[wt]+y[Et]*y[Tt]*y[wt]+y[At]*y[Mt]*y[Pt]-y[Et]*y[yt]*y[Pt],n[gt]=y[Ct]*y[Tt]*y[Ft]-y[mt]*y[yt]*y[Ft]+y[mt]*y[Mt]*y[wt]-y[pt]*y[Tt]*y[wt]-y[Ct]*y[Mt]*y[Pt]+y[pt]*y[yt]*y[Pt],n[At]=y[mt]*y[At]*y[Ft]-y[Ct]*y[xt]*y[Ft]-y[mt]*y[Et]*y[wt]+y[pt]*y[xt]*y[wt]+y[Ct]*y[Et]*y[Pt]-y[pt]*y[At]*y[Pt],n[xt]=y[Ct]*y[xt]*y[Mt]-y[mt]*y[At]*y[Mt]+y[mt]*y[Et]*y[yt]-y[pt]*y[xt]*y[yt]-y[Ct]*y[Et]*y[Tt]+y[pt]*y[At]*y[Tt],n[Mt]=y[gt]*y[Tt]*y[Ft]-y[xt]*y[Rt]*y[Ft]+y[xt]*y[Mt]*y[Ot]-y[Et]*y[Tt]*y[Ot]-y[gt]*y[Mt]*y[Pt]+y[Et]*y[Rt]*y[Pt],n[Rt]=y[mt]*y[Rt]*y[Ft]-y[St]*y[Tt]*y[Ft]-y[mt]*y[Mt]*y[Ot]+y[pt]*y[Tt]*y[Ot]+y[St]*y[Mt]*y[Pt]-y[pt]*y[Rt]*y[Pt],n[yt]=y[St]*y[xt]*y[Ft]-y[mt]*y[gt]*y[Ft]+y[mt]*y[Et]*y[Ot]-y[pt]*y[xt]*y[Ot]-y[St]*y[Et]*y[Pt]+y[pt]*y[gt]*y[Pt],n[Tt]=y[mt]*y[gt]*y[Mt]-y[St]*y[xt]*y[Mt]-y[mt]*y[Et]*y[Rt]+y[pt]*y[xt]*y[Rt]+y[St]*y[Et]*y[Tt]-y[pt]*y[gt]*y[Tt],n[Ft]=y[At]*y[Rt]*y[Ft]-y[gt]*y[yt]*y[Ft]-y[At]*y[Mt]*y[Ot]+y[Et]*y[yt]*y[Ot]+y[gt]*y[Mt]*y[wt]-y[Et]*y[Rt]*y[wt],n[Ot]=y[St]*y[yt]*y[Ft]-y[Ct]*y[Rt]*y[Ft]+y[Ct]*y[Mt]*y[Ot]-y[pt]*y[yt]*y[Ot]-y[St]*y[Mt]*y[wt]+y[pt]*y[Rt]*y[wt],n[wt]=y[Ct]*y[gt]*y[Ft]-y[St]*y[At]*y[Ft]-y[Ct]*y[Et]*y[Ot]+y[pt]*y[At]*y[Ot]+y[St]*y[Et]*y[wt]-y[pt]*y[gt]*y[wt],n[Pt]=y[St]*y[At]*y[Mt]-y[Ct]*y[gt]*y[Mt]+y[Ct]*y[Et]*y[Rt]-y[pt]*y[At]*y[Rt]-y[St]*y[Et]*y[yt]+y[pt]*y[gt]*y[yt],y[pt]=n[pt]*S,y[St]=n[St]*S,y[Ct]=n[Ct]*S,y[mt]=n[mt]*S,y[Et]=n[Et]*S,y[gt]=n[gt]*S,y[At]=n[At]*S,y[xt]=n[xt]*S,y[Mt]=n[Mt]*S,y[Rt]=n[Rt]*S,y[yt]=n[yt]*S,y[Tt]=n[Tt]*S,y[Ft]=n[Ft]*S,y[Ot]=n[Ot]*S,y[wt]=n[wt]*S,y[Pt]=n[Pt]*S,this}determinant(){let y=this.values;return y[Ft]*y[Rt]*y[At]*y[mt]-y[Mt]*y[Ot]*y[At]*y[mt]-y[Ft]*y[gt]*y[yt]*y[mt]+y[Et]*y[Ot]*y[yt]*y[mt]+y[Mt]*y[gt]*y[wt]*y[mt]-y[Et]*y[Rt]*y[wt]*y[mt]-y[Ft]*y[Rt]*y[Ct]*y[xt]+y[Mt]*y[Ot]*y[Ct]*y[xt]+y[Ft]*y[St]*y[yt]*y[xt]-y[pt]*y[Ot]*y[yt]*y[xt]-y[Mt]*y[St]*y[wt]*y[xt]+y[pt]*y[Rt]*y[wt]*y[xt]+y[Ft]*y[gt]*y[Ct]*y[Tt]-y[Et]*y[Ot]*y[Ct]*y[Tt]-y[Ft]*y[St]*y[At]*y[Tt]+y[pt]*y[Ot]*y[At]*y[Tt]+y[Et]*y[St]*y[wt]*y[Tt]-y[pt]*y[gt]*y[wt]*y[Tt]-y[Mt]*y[gt]*y[Ct]*y[Pt]+y[Et]*y[Rt]*y[Ct]*y[Pt]+y[Mt]*y[St]*y[At]*y[Pt]-y[pt]*y[Rt]*y[At]*y[Pt]-y[Et]*y[St]*y[yt]*y[Pt]+y[pt]*y[gt]*y[yt]*y[Pt]}translate(y,n,m){let S=this.values;return S[mt]+=y,S[xt]+=n,S[Tt]+=m,this}copy(){return new ne().set(this.values)}projection(y,n,m,S){this.identity();let x=1/Math.tan(m*(Math.PI/180)/2),h=(n+y)/(y-n),d=2*n*y/(y-n),t=this.values;return t[pt]=x/S,t[Et]=0,t[Mt]=0,t[Ft]=0,t[St]=0,t[gt]=x,t[Rt]=0,t[Ot]=0,t[Ct]=0,t[At]=0,t[yt]=h,t[wt]=-1,t[mt]=0,t[xt]=0,t[Tt]=d,t[Pt]=0,this}ortho2d(y,n,m,S){return this.ortho(y,y+m,n,n+S,0,1)}ortho(y,n,m,S,x,h){this.identity();let d=2/(n-y),t=2/(S-m),e=-2/(h-x),l=-(n+y)/(n-y),i=-(S+m)/(S-m),s=-(h+x)/(h-x),r=this.values;return r[pt]=d,r[Et]=0,r[Mt]=0,r[Ft]=0,r[St]=0,r[gt]=t,r[Rt]=0,r[Ot]=0,r[Ct]=0,r[At]=0,r[yt]=e,r[wt]=0,r[mt]=l,r[xt]=i,r[Tt]=s,r[Pt]=1,this}multiply(y){let n=this.temp,m=this.values,S=y.values;return n[pt]=m[pt]*S[pt]+m[St]*S[Et]+m[Ct]*S[Mt]+m[mt]*S[Ft],n[St]=m[pt]*S[St]+m[St]*S[gt]+m[Ct]*S[Rt]+m[mt]*S[Ot],n[Ct]=m[pt]*S[Ct]+m[St]*S[At]+m[Ct]*S[yt]+m[mt]*S[wt],n[mt]=m[pt]*S[mt]+m[St]*S[xt]+m[Ct]*S[Tt]+m[mt]*S[Pt],n[Et]=m[Et]*S[pt]+m[gt]*S[Et]+m[At]*S[Mt]+m[xt]*S[Ft],n[gt]=m[Et]*S[St]+m[gt]*S[gt]+m[At]*S[Rt]+m[xt]*S[Ot],n[At]=m[Et]*S[Ct]+m[gt]*S[At]+m[At]*S[yt]+m[xt]*S[wt],n[xt]=m[Et]*S[mt]+m[gt]*S[xt]+m[At]*S[Tt]+m[xt]*S[Pt],n[Mt]=m[Mt]*S[pt]+m[Rt]*S[Et]+m[yt]*S[Mt]+m[Tt]*S[Ft],n[Rt]=m[Mt]*S[St]+m[Rt]*S[gt]+m[yt]*S[Rt]+m[Tt]*S[Ot],n[yt]=m[Mt]*S[Ct]+m[Rt]*S[At]+m[yt]*S[yt]+m[Tt]*S[wt],n[Tt]=m[Mt]*S[mt]+m[Rt]*S[xt]+m[yt]*S[Tt]+m[Tt]*S[Pt],n[Ft]=m[Ft]*S[pt]+m[Ot]*S[Et]+m[wt]*S[Mt]+m[Pt]*S[Ft],n[Ot]=m[Ft]*S[St]+m[Ot]*S[gt]+m[wt]*S[Rt]+m[Pt]*S[Ot],n[wt]=m[Ft]*S[Ct]+m[Ot]*S[At]+m[wt]*S[yt]+m[Pt]*S[wt],n[Pt]=m[Ft]*S[mt]+m[Ot]*S[xt]+m[wt]*S[Tt]+m[Pt]*S[Pt],this.set(this.temp)}multiplyLeft(y){let n=this.temp,m=this.values,S=y.values;return n[pt]=S[pt]*m[pt]+S[St]*m[Et]+S[Ct]*m[Mt]+S[mt]*m[Ft],n[St]=S[pt]*m[St]+S[St]*m[gt]+S[Ct]*m[Rt]+S[mt]*m[Ot],n[Ct]=S[pt]*m[Ct]+S[St]*m[At]+S[Ct]*m[yt]+S[mt]*m[wt],n[mt]=S[pt]*m[mt]+S[St]*m[xt]+S[Ct]*m[Tt]+S[mt]*m[Pt],n[Et]=S[Et]*m[pt]+S[gt]*m[Et]+S[At]*m[Mt]+S[xt]*m[Ft],n[gt]=S[Et]*m[St]+S[gt]*m[gt]+S[At]*m[Rt]+S[xt]*m[Ot],n[At]=S[Et]*m[Ct]+S[gt]*m[At]+S[At]*m[yt]+S[xt]*m[wt],n[xt]=S[Et]*m[mt]+S[gt]*m[xt]+S[At]*m[Tt]+S[xt]*m[Pt],n[Mt]=S[Mt]*m[pt]+S[Rt]*m[Et]+S[yt]*m[Mt]+S[Tt]*m[Ft],n[Rt]=S[Mt]*m[St]+S[Rt]*m[gt]+S[yt]*m[Rt]+S[Tt]*m[Ot],n[yt]=S[Mt]*m[Ct]+S[Rt]*m[At]+S[yt]*m[yt]+S[Tt]*m[wt],n[Tt]=S[Mt]*m[mt]+S[Rt]*m[xt]+S[yt]*m[Tt]+S[Tt]*m[Pt],n[Ft]=S[Ft]*m[pt]+S[Ot]*m[Et]+S[wt]*m[Mt]+S[Pt]*m[Ft],n[Ot]=S[Ft]*m[St]+S[Ot]*m[gt]+S[wt]*m[Rt]+S[Pt]*m[Ot],n[wt]=S[Ft]*m[Ct]+S[Ot]*m[At]+S[wt]*m[yt]+S[Pt]*m[wt],n[Pt]=S[Ft]*m[mt]+S[Ot]*m[xt]+S[wt]*m[Tt]+S[Pt]*m[Pt],this.set(this.temp)}lookAt(y,n,m){let S=ne.xAxis,x=ne.yAxis,h=ne.zAxis;h.setFrom(n).normalize(),S.setFrom(n).normalize(),S.cross(m).normalize(),x.setFrom(S).cross(h).normalize(),this.identity();let d=this.values;return d[pt]=S.x,d[St]=S.y,d[Ct]=S.z,d[Et]=x.x,d[gt]=x.y,d[At]=x.z,d[Mt]=-h.x,d[Rt]=-h.y,d[yt]=-h.z,ne.tmpMatrix.identity(),ne.tmpMatrix.values[mt]=-y.x,ne.tmpMatrix.values[xt]=-y.y,ne.tmpMatrix.values[Tt]=-y.z,this.multiply(ne.tmpMatrix),this}},$(ne,"xAxis",new ke),$(ne,"yAxis",new ke),$(ne,"zAxis",new ke),$(ne,"tmpMatrix",new ne),ne),Ia=class{constructor(E,y){$(this,"position",new ke(0,0,0));$(this,"direction",new ke(0,0,-1));$(this,"up",new ke(0,1,0));$(this,"near",0);$(this,"far",100);$(this,"zoom",1);$(this,"viewportWidth",0);$(this,"viewportHeight",0);$(this,"projectionView",new si);$(this,"inverseProjectionView",new si);$(this,"projection",new si);$(this,"view",new si);this.viewportWidth=E,this.viewportHeight=y,this.update()}update(){let E=this.projection,y=this.view,n=this.projectionView,m=this.inverseProjectionView,S=this.zoom,x=this.viewportWidth,h=this.viewportHeight;E.ortho(S*(-x/2),S*(x/2),S*(-h/2),S*(h/2),this.near,this.far),y.lookAt(this.position,this.direction,this.up),n.set(E.values),n.multiply(y),m.set(n.values).invert()}screenToWorld(E,y,n){let m=E.x,S=n-E.y-1;return E.x=2*m/y-1,E.y=2*S/n-1,E.z=2*E.z-1,E.project(this.inverseProjectionView),E}worldToScreen(E,y,n){return E.project(this.projectionView),E.x=y*(E.x+1)/2,E.y=n*(E.y+1)/2,E.z=(E.z+1)/2,E}setViewport(E,y){this.viewportWidth=E,this.viewportHeight=y}},Vt,Oe=(Vt=class{constructor(y,n,m){$(this,"context");$(this,"vs",null);$(this,"vsSource");$(this,"fs",null);$(this,"fsSource");$(this,"program",null);$(this,"tmp2x2",new Float32Array(2*2));$(this,"tmp3x3",new Float32Array(3*3));$(this,"tmp4x4",new Float32Array(4*4));this.vertexShader=n,this.fragmentShader=m,this.vsSource=n,this.fsSource=m,this.context=y instanceof ve?y:new ve(y),this.context.addRestorable(this),this.compile()}getProgram(){return this.program}getVertexShader(){return this.vertexShader}getFragmentShader(){return this.fragmentShader}getVertexShaderSource(){return this.vsSource}getFragmentSource(){return this.fsSource}compile(){let y=this.context.gl;try{if(this.vs=this.compileShader(y.VERTEX_SHADER,this.vertexShader),!this.vs)throw new Error("Couldn't compile vertex shader.");if(this.fs=this.compileShader(y.FRAGMENT_SHADER,this.fragmentShader),!this.fs)throw new Error("Couldn#t compile fragment shader.");this.program=this.compileProgram(this.vs,this.fs)}catch(n){throw this.dispose(),n}}compileShader(y,n){let m=this.context.gl,S=m.createShader(y);if(!S)throw new Error("Couldn't create shader.");if(m.shaderSource(S,n),m.compileShader(S),!m.getShaderParameter(S,m.COMPILE_STATUS)){let x="Couldn't compile shader: "+m.getShaderInfoLog(S);if(m.deleteShader(S),!m.isContextLost())throw new Error(x)}return S}compileProgram(y,n){let m=this.context.gl,S=m.createProgram();if(!S)throw new Error("Couldn't compile program.");if(m.attachShader(S,y),m.attachShader(S,n),m.linkProgram(S),!m.getProgramParameter(S,m.LINK_STATUS)){let x="Couldn't compile shader program: "+m.getProgramInfoLog(S);if(m.deleteProgram(S),!m.isContextLost())throw new Error(x)}return S}restore(){this.compile()}bind(){this.context.gl.useProgram(this.program)}unbind(){this.context.gl.useProgram(null)}setUniformi(y,n){this.context.gl.uniform1i(this.getUniformLocation(y),n)}setUniformf(y,n){this.context.gl.uniform1f(this.getUniformLocation(y),n)}setUniform2f(y,n,m){this.context.gl.uniform2f(this.getUniformLocation(y),n,m)}setUniform3f(y,n,m,S){this.context.gl.uniform3f(this.getUniformLocation(y),n,m,S)}setUniform4f(y,n,m,S,x){this.context.gl.uniform4f(this.getUniformLocation(y),n,m,S,x)}setUniform2x2f(y,n){let m=this.context.gl;this.tmp2x2.set(n),m.uniformMatrix2fv(this.getUniformLocation(y),!1,this.tmp2x2)}setUniform3x3f(y,n){let m=this.context.gl;this.tmp3x3.set(n),m.uniformMatrix3fv(this.getUniformLocation(y),!1,this.tmp3x3)}setUniform4x4f(y,n){let m=this.context.gl;this.tmp4x4.set(n),m.uniformMatrix4fv(this.getUniformLocation(y),!1,this.tmp4x4)}getUniformLocation(y){let n=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let m=n.getUniformLocation(this.program,y);if(!m&&!n.isContextLost())throw new Error(`Couldn't find location for uniform ${y}`);return m}getAttributeLocation(y){let n=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let m=n.getAttribLocation(this.program,y);if(m==-1&&!n.isContextLost())throw new Error(`Couldn't find location for attribute ${y}`);return m}dispose(){this.context.removeRestorable(this);let y=this.context.gl;this.vs&&(y.deleteShader(this.vs),this.vs=null),this.fs&&(y.deleteShader(this.fs),this.fs=null),this.program&&(y.deleteProgram(this.program),this.program=null)}static newColoredTextured(y){let n=`
|
||
attribute vec4 ${Vt.POSITION};
|
||
attribute vec4 ${Vt.COLOR};
|
||
attribute vec2 ${Vt.TEXCOORDS};
|
||
uniform mat4 ${Vt.MVP_MATRIX};
|
||
varying vec4 v_color;
|
||
varying vec2 v_texCoords;
|
||
|
||
void main () {
|
||
v_color = ${Vt.COLOR};
|
||
v_texCoords = ${Vt.TEXCOORDS};
|
||
gl_Position = ${Vt.MVP_MATRIX} * ${Vt.POSITION};
|
||
}
|
||
`,m=`
|
||
#ifdef GL_ES
|
||
#define LOWP lowp
|
||
precision mediump float;
|
||
#else
|
||
#define LOWP
|
||
#endif
|
||
varying LOWP vec4 v_color;
|
||
varying vec2 v_texCoords;
|
||
uniform sampler2D u_texture;
|
||
|
||
void main () {
|
||
gl_FragColor = v_color * texture2D(u_texture, v_texCoords);
|
||
}
|
||
`;return new Vt(y,n,m)}static newTwoColoredTextured(y){let n=`
|
||
attribute vec4 ${Vt.POSITION};
|
||
attribute vec4 ${Vt.COLOR};
|
||
attribute vec4 ${Vt.COLOR2};
|
||
attribute vec2 ${Vt.TEXCOORDS};
|
||
uniform mat4 ${Vt.MVP_MATRIX};
|
||
varying vec4 v_light;
|
||
varying vec4 v_dark;
|
||
varying vec2 v_texCoords;
|
||
|
||
void main () {
|
||
v_light = ${Vt.COLOR};
|
||
v_dark = ${Vt.COLOR2};
|
||
v_texCoords = ${Vt.TEXCOORDS};
|
||
gl_Position = ${Vt.MVP_MATRIX} * ${Vt.POSITION};
|
||
}
|
||
`,m=`
|
||
#ifdef GL_ES
|
||
#define LOWP lowp
|
||
precision mediump float;
|
||
#else
|
||
#define LOWP
|
||
#endif
|
||
varying LOWP vec4 v_light;
|
||
varying LOWP vec4 v_dark;
|
||
varying vec2 v_texCoords;
|
||
uniform sampler2D u_texture;
|
||
|
||
void main () {
|
||
vec4 texColor = texture2D(u_texture, v_texCoords);
|
||
gl_FragColor.a = texColor.a * v_light.a;
|
||
gl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;
|
||
}
|
||
`;return new Vt(y,n,m)}static newColored(y){let n=`
|
||
attribute vec4 ${Vt.POSITION};
|
||
attribute vec4 ${Vt.COLOR};
|
||
uniform mat4 ${Vt.MVP_MATRIX};
|
||
varying vec4 v_color;
|
||
|
||
void main () {
|
||
v_color = ${Vt.COLOR};
|
||
gl_Position = ${Vt.MVP_MATRIX} * ${Vt.POSITION};
|
||
}
|
||
`,m=`
|
||
#ifdef GL_ES
|
||
#define LOWP lowp
|
||
precision mediump float;
|
||
#else
|
||
#define LOWP
|
||
#endif
|
||
varying LOWP vec4 v_color;
|
||
|
||
void main () {
|
||
gl_FragColor = v_color;
|
||
}
|
||
`;return new Vt(y,n,m)}},$(Vt,"MVP_MATRIX","u_projTrans"),$(Vt,"POSITION","a_position"),$(Vt,"COLOR","a_color"),$(Vt,"COLOR2","a_color2"),$(Vt,"TEXCOORDS","a_texCoords"),$(Vt,"SAMPLER","u_texture"),Vt),pn=class{constructor(E,y,n,m){$(this,"context");$(this,"vertices");$(this,"verticesBuffer",null);$(this,"verticesLength",0);$(this,"dirtyVertices",!1);$(this,"indices");$(this,"indicesBuffer",null);$(this,"indicesLength",0);$(this,"dirtyIndices",!1);$(this,"elementsPerVertex",0);this.attributes=y,this.context=E instanceof ve?E:new ve(E),this.elementsPerVertex=0;for(let S=0;S<y.length;S++)this.elementsPerVertex+=y[S].numElements;this.vertices=new Float32Array(n*this.elementsPerVertex),this.indices=new Uint16Array(m),this.context.addRestorable(this)}getAttributes(){return this.attributes}maxVertices(){return this.vertices.length/this.elementsPerVertex}numVertices(){return this.verticesLength/this.elementsPerVertex}setVerticesLength(E){this.dirtyVertices=!0,this.verticesLength=E}getVertices(){return this.vertices}maxIndices(){return this.indices.length}numIndices(){return this.indicesLength}setIndicesLength(E){this.dirtyIndices=!0,this.indicesLength=E}getIndices(){return this.indices}getVertexSizeInFloats(){let E=0;for(var y=0;y<this.attributes.length;y++){let n=this.attributes[y];E+=n.numElements}return E}setVertices(E){if(this.dirtyVertices=!0,E.length>this.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(E,0),this.verticesLength=E.length}setIndices(E){if(this.dirtyIndices=!0,E.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(E,0),this.indicesLength=E.length}draw(E,y){this.drawWithOffset(E,y,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)}drawWithOffset(E,y,n,m){let S=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(E),this.indicesLength>0?S.drawElements(y,m,S.UNSIGNED_SHORT,n*2):S.drawArrays(y,n,m),this.unbind(E)}bind(E){let y=this.context.gl;y.bindBuffer(y.ARRAY_BUFFER,this.verticesBuffer);let n=0;for(let m=0;m<this.attributes.length;m++){let S=this.attributes[m],x=E.getAttributeLocation(S.name);y.enableVertexAttribArray(x),y.vertexAttribPointer(x,S.numElements,y.FLOAT,!1,this.elementsPerVertex*4,n*4),n+=S.numElements}this.indicesLength>0&&y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)}unbind(E){let y=this.context.gl;for(let n=0;n<this.attributes.length;n++){let m=this.attributes[n],S=E.getAttributeLocation(m.name);y.disableVertexAttribArray(S)}y.bindBuffer(y.ARRAY_BUFFER,null),this.indicesLength>0&&y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,null)}update(){let E=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=E.createBuffer()),E.bindBuffer(E.ARRAY_BUFFER,this.verticesBuffer),E.bufferData(E.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),E.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=E.createBuffer()),E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),E.bufferData(E.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),E.DYNAMIC_DRAW),this.dirtyIndices=!1)}restore(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()}dispose(){this.context.removeRestorable(this);let E=this.context.gl;E.deleteBuffer(this.verticesBuffer),E.deleteBuffer(this.indicesBuffer)}},mi=class{constructor(E,y,n){this.name=E,this.type=y,this.numElements=n}},Fi=class extends mi{constructor(){super(Oe.POSITION,0,2)}},ji=class extends mi{constructor(E=0){super(Oe.TEXCOORDS+(E==0?"":E),0,2)}},Oi=class extends mi{constructor(){super(Oe.COLOR,0,4)}},Na=class extends mi{constructor(){super(Oe.COLOR2,0,4)}},Le=1,ba=769,ki=770,qi=771,_i=774,ge,ts=(ge=class{constructor(y,n=!0,m=10920){$(this,"context");$(this,"drawCalls",0);$(this,"isDrawing",!1);$(this,"mesh");$(this,"shader",null);$(this,"lastTexture",null);$(this,"verticesLength",0);$(this,"indicesLength",0);$(this,"srcColorBlend");$(this,"srcAlphaBlend");$(this,"dstBlend");$(this,"cullWasEnabled",!1);if(m>10920)throw new Error("Can't have more than 10920 triangles per batch: "+m);this.context=y instanceof ve?y:new ve(y);let S=n?[new Fi,new Oi,new ji,new Na]:[new Fi,new Oi,new ji];this.mesh=new pn(y,S,m,m*3);let x=this.context.gl;this.srcColorBlend=x.SRC_ALPHA,this.srcAlphaBlend=x.ONE,this.dstBlend=x.ONE_MINUS_SRC_ALPHA}begin(y){if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=y,this.lastTexture=null,this.isDrawing=!0;let n=this.context.gl;n.enable(n.BLEND),n.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend)}setBlendMode(y,n){const m=ge.blendModesGL[y],S=n?m.srcRgbPma:m.srcRgb,x=m.srcAlpha,h=m.dstRgb;if(this.srcColorBlend==S&&this.srcAlphaBlend==x&&this.dstBlend==h)return;this.srcColorBlend=S,this.srcAlphaBlend=x,this.dstBlend=h,this.isDrawing&&this.flush(),this.context.gl.blendFuncSeparate(S,h,x,h)}draw(y,n,m){y!=this.lastTexture?(this.flush(),this.lastTexture=y):(this.verticesLength+n.length>this.mesh.getVertices().length||this.indicesLength+m.length>this.mesh.getIndices().length)&&this.flush();let S=this.mesh.numVertices();this.mesh.getVertices().set(n,this.verticesLength),this.verticesLength+=n.length,this.mesh.setVerticesLength(this.verticesLength);let x=this.mesh.getIndices();for(let h=this.indicesLength,d=0;d<m.length;h++,d++)x[h]=m[d]+S;this.indicesLength+=m.length,this.mesh.setIndicesLength(this.indicesLength)}flush(){if(this.verticesLength!=0){if(!this.lastTexture)throw new Error("No texture set.");if(!this.shader)throw new Error("No shader set.");this.lastTexture.bind(),this.mesh.draw(this.shader,this.context.gl.TRIANGLES),this.verticesLength=0,this.indicesLength=0,this.mesh.setVerticesLength(0),this.mesh.setIndicesLength(0),this.drawCalls++,ge.globalDrawCalls++}}end(){if(!this.isDrawing)throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()");(this.verticesLength>0||this.indicesLength>0)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1;let y=this.context.gl;y.disable(y.BLEND)}getDrawCalls(){return this.drawCalls}static getAndResetGlobalDrawCalls(){let y=ge.globalDrawCalls;return ge.globalDrawCalls=0,y}dispose(){this.mesh.dispose()}},$(ge,"disableCulling",!1),$(ge,"globalDrawCalls",0),$(ge,"blendModesGL",[{srcRgb:ki,srcRgbPma:Le,dstRgb:qi,srcAlpha:Le},{srcRgb:ki,srcRgbPma:Le,dstRgb:Le,srcAlpha:Le},{srcRgb:_i,srcRgbPma:_i,dstRgb:qi,srcAlpha:Le},{srcRgb:Le,srcRgbPma:Le,dstRgb:ba,srcAlpha:Le}]),ge),es=class{constructor(E,y=10920){$(this,"context");$(this,"isDrawing",!1);$(this,"mesh");$(this,"shapeType",4);$(this,"color",new It(1,1,1,1));$(this,"shader",null);$(this,"vertexIndex",0);$(this,"tmp",new qe);$(this,"srcColorBlend");$(this,"srcAlphaBlend");$(this,"dstBlend");if(y>10920)throw new Error("Can't have more than 10920 triangles per batch: "+y);this.context=E instanceof ve?E:new ve(E),this.mesh=new pn(E,[new Fi,new Oi],y,0);let n=this.context.gl;this.srcColorBlend=n.SRC_ALPHA,this.srcAlphaBlend=n.ONE,this.dstBlend=n.ONE_MINUS_SRC_ALPHA}begin(E){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=E,this.vertexIndex=0,this.isDrawing=!0;let y=this.context.gl;y.enable(y.BLEND),y.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend)}setBlendMode(E,y,n){this.srcColorBlend=E,this.srcAlphaBlend=y,this.dstBlend=n,this.isDrawing&&(this.flush(),this.context.gl.blendFuncSeparate(E,n,y,n))}setColor(E){this.color.setFromColor(E)}setColorWith(E,y,n,m){this.color.set(E,y,n,m)}point(E,y,n){this.check(0,1),n||(n=this.color),this.vertex(E,y,n)}line(E,y,n,m,S){this.check(1,2),this.mesh.getVertices(),this.vertexIndex,S||(S=this.color),this.vertex(E,y,S),this.vertex(n,m,S)}triangle(E,y,n,m,S,x,h,d,t,e){this.check(E?4:1,3),this.mesh.getVertices(),this.vertexIndex,d||(d=this.color),t||(t=this.color),e||(e=this.color),E?(this.vertex(y,n,d),this.vertex(m,S,t),this.vertex(x,h,e)):(this.vertex(y,n,d),this.vertex(m,S,t),this.vertex(m,S,d),this.vertex(x,h,t),this.vertex(x,h,d),this.vertex(y,n,t))}quad(E,y,n,m,S,x,h,d,t,e,l,i,s){this.check(E?4:1,3),this.mesh.getVertices(),this.vertexIndex,e||(e=this.color),l||(l=this.color),i||(i=this.color),s||(s=this.color),E?(this.vertex(y,n,e),this.vertex(m,S,l),this.vertex(x,h,i),this.vertex(x,h,i),this.vertex(d,t,s),this.vertex(y,n,e)):(this.vertex(y,n,e),this.vertex(m,S,l),this.vertex(m,S,l),this.vertex(x,h,i),this.vertex(x,h,i),this.vertex(d,t,s),this.vertex(d,t,s),this.vertex(y,n,e))}rect(E,y,n,m,S,x){this.quad(E,y,n,y+m,n,y+m,n+S,y,n+S,x,x,x,x)}rectLine(E,y,n,m,S,x,h){this.check(E?4:1,8),h||(h=this.color);let d=this.tmp.set(S-n,y-m);d.normalize(),x*=.5;let t=d.x*x,e=d.y*x;E?(this.vertex(y+t,n+e,h),this.vertex(y-t,n-e,h),this.vertex(m+t,S+e,h),this.vertex(m-t,S-e,h),this.vertex(m+t,S+e,h),this.vertex(y-t,n-e,h)):(this.vertex(y+t,n+e,h),this.vertex(y-t,n-e,h),this.vertex(m+t,S+e,h),this.vertex(m-t,S-e,h),this.vertex(m+t,S+e,h),this.vertex(y+t,n+e,h),this.vertex(m-t,S-e,h),this.vertex(y-t,n-e,h))}x(E,y,n){this.line(E-n,y-n,E+n,y+n),this.line(E-n,y+n,E+n,y-n)}polygon(E,y,n,m){if(n<3)throw new Error("Polygon must contain at least 3 vertices");this.check(1,n*2),m||(m=this.color),this.mesh.getVertices(),this.vertexIndex,y<<=1,n<<=1;let S=E[y],x=E[y+1],h=y+n;for(let d=y,t=y+n-2;d<t;d+=2){let e=E[d],l=E[d+1],i=0,s=0;d+2>=h?(i=S,s=x):(i=E[d+2],s=E[d+3]),this.vertex(e,l,m),this.vertex(i,s,m)}}circle(E,y,n,m,S,x=0){if(x==0&&(x=Math.max(1,6*ft.cbrt(m)|0)),x<=0)throw new Error("segments must be > 0.");S||(S=this.color);let h=2*ft.PI/x,d=Math.cos(h),t=Math.sin(h),e=m,l=0;if(E){this.check(4,x*3+3),x--;for(let i=0;i<x;i++){this.vertex(y,n,S),this.vertex(y+e,n+l,S);let s=e;e=d*e-t*l,l=t*s+d*l,this.vertex(y+e,n+l,S)}this.vertex(y,n,S),this.vertex(y+e,n+l,S)}else{this.check(1,x*2+2);for(let i=0;i<x;i++){this.vertex(y+e,n+l,S);let s=e;e=d*e-t*l,l=t*s+d*l,this.vertex(y+e,n+l,S)}this.vertex(y+e,n+l,S)}e=m,l=0,this.vertex(y+e,n+l,S)}curve(E,y,n,m,S,x,h,d,t,e){this.check(1,t*2+2),e||(e=this.color);let l=1/t,i=l*l,s=l*l*l,r=3*l,o=3*i,a=6*i,u=6*s,f=E-n*2+S,v=y-m*2+x,c=(n-S)*3-E+h,g=(m-x)*3-y+d,p=E,T=y,C=(n-E)*r+f*o+c*s,M=(m-y)*r+v*o+g*s,A=f*a+c*u,R=v*a+g*u,P=c*u,L=g*u;for(;t-- >0;)this.vertex(p,T,e),p+=C,T+=M,C+=A,M+=R,A+=P,R+=L,this.vertex(p,T,e);this.vertex(p,T,e),this.vertex(h,d,e)}vertex(E,y,n){let m=this.vertexIndex,S=this.mesh.getVertices();S[m++]=E,S[m++]=y,S[m++]=n.r,S[m++]=n.g,S[m++]=n.b,S[m++]=n.a,this.vertexIndex=m}end(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush();let E=this.context.gl;E.disable(E.BLEND),this.isDrawing=!1}flush(){if(this.vertexIndex!=0){if(!this.shader)throw new Error("No shader set.");this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0}}check(E,y){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==E)if(this.mesh.maxVertices()-this.mesh.numVertices()<y)this.flush();else return;else this.flush(),this.shapeType=E}dispose(){this.mesh.dispose()}},De,Ga=(De=class{constructor(y){$(this,"boneLineColor",new It(1,0,0,1));$(this,"boneOriginColor",new It(0,1,0,1));$(this,"attachmentLineColor",new It(0,0,1,.5));$(this,"triangleLineColor",new It(1,.64,0,.5));$(this,"pathColor",new It().setFromString("FF7F00"));$(this,"clipColor",new It(.8,0,0,2));$(this,"aabbColor",new It(0,1,0,.5));$(this,"drawBones",!0);$(this,"drawRegionAttachments",!0);$(this,"drawBoundingBoxes",!0);$(this,"drawMeshHull",!0);$(this,"drawMeshTriangles",!0);$(this,"drawPaths",!0);$(this,"drawSkeletonXY",!1);$(this,"drawClipping",!0);$(this,"premultipliedAlpha",!1);$(this,"scale",1);$(this,"boneWidth",2);$(this,"context");$(this,"bounds",new Ra);$(this,"temp",new Array);$(this,"vertices",ut.newFloatArray(2*1024));this.context=y instanceof ve?y:new ve(y)}draw(y,n,m){let S=n.x,x=n.y,h=this.context.gl,d=this.premultipliedAlpha?h.ONE:h.SRC_ALPHA;y.setBlendMode(d,h.ONE,h.ONE_MINUS_SRC_ALPHA);let t=n.bones;if(this.drawBones){y.setColor(this.boneLineColor);for(let e=0,l=t.length;e<l;e++){let i=t[e];if(m&&m.indexOf(i.data.name)>-1||!i.parent)continue;let s=i.data.length*i.a+i.worldX,r=i.data.length*i.c+i.worldY;y.rectLine(!0,i.worldX,i.worldY,s,r,this.boneWidth*this.scale)}this.drawSkeletonXY&&y.x(S,x,4*this.scale)}if(this.drawRegionAttachments){y.setColor(this.attachmentLineColor);let e=n.slots;for(let l=0,i=e.length;l<i;l++){let s=e[l],r=s.getAttachment();if(r instanceof Zt){let o=r,a=this.vertices;o.computeWorldVertices(s,a,0,2),y.line(a[0],a[1],a[2],a[3]),y.line(a[2],a[3],a[4],a[5]),y.line(a[4],a[5],a[6],a[7]),y.line(a[6],a[7],a[0],a[1])}}}if(this.drawMeshHull||this.drawMeshTriangles){let e=n.slots;for(let l=0,i=e.length;l<i;l++){let s=e[l];if(!s.bone.active)continue;let r=s.getAttachment();if(!(r instanceof _e))continue;let o=r,a=this.vertices;o.computeWorldVertices(s,0,o.worldVerticesLength,a,0,2);let u=o.triangles,f=o.hullLength;if(this.drawMeshTriangles){y.setColor(this.triangleLineColor);for(let v=0,c=u.length;v<c;v+=3){let g=u[v]*2,p=u[v+1]*2,T=u[v+2]*2;y.triangle(!1,a[g],a[g+1],a[p],a[p+1],a[T],a[T+1])}}if(this.drawMeshHull&&f>0){y.setColor(this.attachmentLineColor),f=(f>>1)*2;let v=a[f-2],c=a[f-1];for(let g=0,p=f;g<p;g+=2){let T=a[g],C=a[g+1];y.line(T,C,v,c),v=T,c=C}}}}if(this.drawBoundingBoxes){let e=this.bounds;e.update(n,!0),y.setColor(this.aabbColor),y.rect(!1,e.minX,e.minY,e.getWidth(),e.getHeight());let l=e.polygons,i=e.boundingBoxes;for(let s=0,r=l.length;s<r;s++){let o=l[s];y.setColor(i[s].color),y.polygon(o,0,o.length)}}if(this.drawPaths){let e=n.slots;for(let l=0,i=e.length;l<i;l++){let s=e[l];if(!s.bone.active)continue;let r=s.getAttachment();if(!(r instanceof ei))continue;let o=r,a=o.worldVerticesLength,u=this.temp=ut.setArraySize(this.temp,a,0);o.computeWorldVertices(s,0,a,u,0,2);let f=this.pathColor,v=u[2],c=u[3],g=0,p=0;if(o.closed){y.setColor(f);let T=u[0],C=u[1],M=u[a-2],A=u[a-1];g=u[a-4],p=u[a-3],y.curve(v,c,T,C,M,A,g,p,32),y.setColor(De.LIGHT_GRAY),y.line(v,c,T,C),y.line(g,p,M,A)}a-=4;for(let T=4;T<a;T+=6){let C=u[T],M=u[T+1],A=u[T+2],R=u[T+3];g=u[T+4],p=u[T+5],y.setColor(f),y.curve(v,c,C,M,A,R,g,p,32),y.setColor(De.LIGHT_GRAY),y.line(v,c,C,M),y.line(g,p,A,R),v=g,c=p}}}if(this.drawBones){y.setColor(this.boneOriginColor);for(let e=0,l=t.length;e<l;e++){let i=t[e];m&&m.indexOf(i.data.name)>-1||y.circle(!0,i.worldX,i.worldY,3*this.scale,this.boneOriginColor,8)}}if(this.drawClipping){let e=n.slots;y.setColor(this.clipColor);for(let l=0,i=e.length;l<i;l++){let s=e[l];if(!s.bone.active)continue;let r=s.getAttachment();if(!(r instanceof vi))continue;let o=r,a=o.worldVerticesLength,u=this.temp=ut.setArraySize(this.temp,a,0);o.computeWorldVertices(s,0,a,u,0,2);for(let f=0,v=u.length;f<v;f+=2){let c=u[f],g=u[f+1],p=u[(f+2)%u.length],T=u[(f+3)%u.length];y.line(c,g,p,T)}}}}dispose(){}},$(De,"LIGHT_GRAY",new It(192/255,192/255,192/255,1)),$(De,"GREEN",new It(0,1,0,1)),De),Ua=class{constructor(E,y,n){this.vertices=E,this.numVertices=y,this.numFloats=n}},$e,za=($e=class{constructor(y,n=!0){$(this,"premultipliedAlpha",!1);$(this,"tempColor",new It);$(this,"tempColor2",new It);$(this,"vertices");$(this,"vertexSize",8);$(this,"twoColorTint",!1);$(this,"renderable",new Ua([],0,0));$(this,"clipper",new cn);$(this,"temp",new qe);$(this,"temp2",new qe);$(this,"temp3",new It);$(this,"temp4",new It);this.twoColorTint=n,n&&(this.vertexSize+=4),this.vertices=ut.newFloatArray(this.vertexSize*1024)}draw(y,n,m=-1,S=-1,x=null){let h=this.clipper,d=this.premultipliedAlpha,t=this.twoColorTint,e=null,l=this.renderable,i,s,r=n.drawOrder,o,a=n.color,u=t?12:8,f=!1;m==-1&&(f=!0);for(let v=0,c=r.length;v<c;v++){let g=h.isClipping()?2:u,p=r[v];if(!p.bone.active){h.clipEndWithSlot(p);continue}if(m>=0&&m==p.data.index&&(f=!0),!f){h.clipEndWithSlot(p);continue}S>=0&&S==p.data.index&&(f=!1);let T=p.getAttachment(),C;if(T instanceof Zt){let M=T;l.vertices=this.vertices,l.numVertices=4,l.numFloats=g<<2,M.computeWorldVertices(p,l.vertices,0,g),s=$e.QUAD_TRIANGLES,i=M.uvs,C=M.region.texture,o=M.color}else if(T instanceof _e){let M=T;l.vertices=this.vertices,l.numVertices=M.worldVerticesLength>>1,l.numFloats=l.numVertices*g,l.numFloats>l.vertices.length&&(l.vertices=this.vertices=ut.newFloatArray(l.numFloats)),M.computeWorldVertices(p,0,M.worldVerticesLength,l.vertices,0,g),s=M.triangles,C=M.region.texture,i=M.uvs,o=M.color}else if(T instanceof vi){let M=T;h.clipStart(p,M);continue}else{h.clipEndWithSlot(p);continue}if(C){let M=p.color,A=this.tempColor;A.r=a.r*M.r*o.r,A.g=a.g*M.g*o.g,A.b=a.b*M.b*o.b,A.a=a.a*M.a*o.a,d&&(A.r*=A.a,A.g*=A.a,A.b*=A.a);let R=this.tempColor2;p.darkColor?(d?(R.r=p.darkColor.r*A.a,R.g=p.darkColor.g*A.a,R.b=p.darkColor.b*A.a):R.setFromColor(p.darkColor),R.a=d?1:0):R.set(0,0,0,1);let P=p.data.blendMode;if(P!=e&&(e=P,y.setBlendMode(e,d)),h.isClipping()){h.clipTriangles(l.vertices,s,s.length,i,A,R,t);let L=new Float32Array(h.clippedVertices),F=h.clippedTriangles;x&&x(L,L.length,u),y.draw(C,L,F)}else{let L=l.vertices;if(t)for(let w=2,O=0,B=l.numFloats;w<B;w+=u,O+=2)L[w]=A.r,L[w+1]=A.g,L[w+2]=A.b,L[w+3]=A.a,L[w+4]=i[O],L[w+5]=i[O+1],L[w+6]=R.r,L[w+7]=R.g,L[w+8]=R.b,L[w+9]=R.a;else for(let w=2,O=0,B=l.numFloats;w<B;w+=u,O+=2)L[w]=A.r,L[w+1]=A.g,L[w+2]=A.b,L[w+3]=A.a,L[w+4]=i[O],L[w+5]=i[O+1];let F=l.vertices.subarray(0,l.numFloats);x&&x(l.vertices,l.numFloats,u),y.draw(C,F,s)}}h.clipEndWithSlot(p)}h.clipEnd()}getSkeletonClipping(){return this.clipper}},$($e,"QUAD_TRIANGLES",[0,1,2,2,3,0]),$e),et=[0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0],ni=[0,1,2,2,3,0],ri=new It(1,1,1,1),Ya=class{constructor(E,y,n=!0){$(this,"context");$(this,"canvas");$(this,"camera");$(this,"batcher");$(this,"twoColorTint",!1);$(this,"batcherShader");$(this,"shapes");$(this,"shapesShader");$(this,"activeRenderer",null);$(this,"skeletonRenderer");$(this,"skeletonDebugRenderer");this.canvas=E,this.context=y instanceof ve?y:new ve(y),this.twoColorTint=n,this.camera=new Ia(E.width,E.height),this.batcherShader=n?Oe.newTwoColoredTextured(this.context):Oe.newColoredTextured(this.context),this.batcher=new ts(this.context,n),this.shapesShader=Oe.newColored(this.context),this.shapes=new es(this.context),this.skeletonRenderer=new za(this.context,n),this.skeletonDebugRenderer=new Ga(this.context)}dispose(){this.batcher.dispose(),this.batcherShader.dispose(),this.shapes.dispose(),this.shapesShader.dispose(),this.skeletonDebugRenderer.dispose()}begin(){this.camera.update(),this.enableRenderer(this.batcher)}drawSkeleton(E,y=!1,n=-1,m=-1,S=null){this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=y,this.skeletonRenderer.draw(this.batcher,E,n,m,S)}drawSkeletonDebug(E,y=!1,n){this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=y,this.skeletonDebugRenderer.draw(this.shapes,E,n)}drawTexture(E,y,n,m,S,x){this.enableRenderer(this.batcher),x||(x=ri);var h=0;et[h++]=y,et[h++]=n,et[h++]=x.r,et[h++]=x.g,et[h++]=x.b,et[h++]=x.a,et[h++]=0,et[h++]=1,this.twoColorTint&&(et[h++]=0,et[h++]=0,et[h++]=0,et[h++]=0),et[h++]=y+m,et[h++]=n,et[h++]=x.r,et[h++]=x.g,et[h++]=x.b,et[h++]=x.a,et[h++]=1,et[h++]=1,this.twoColorTint&&(et[h++]=0,et[h++]=0,et[h++]=0,et[h++]=0),et[h++]=y+m,et[h++]=n+S,et[h++]=x.r,et[h++]=x.g,et[h++]=x.b,et[h++]=x.a,et[h++]=1,et[h++]=0,this.twoColorTint&&(et[h++]=0,et[h++]=0,et[h++]=0,et[h++]=0),et[h++]=y,et[h++]=n+S,et[h++]=x.r,et[h++]=x.g,et[h++]=x.b,et[h++]=x.a,et[h++]=0,et[h++]=0,this.twoColorTint&&(et[h++]=0,et[h++]=0,et[h++]=0,et[h]=0),this.batcher.draw(E,et,ni)}drawTextureUV(E,y,n,m,S,x,h,d,t,e){this.enableRenderer(this.batcher),e||(e=ri);var l=0;et[l++]=y,et[l++]=n,et[l++]=e.r,et[l++]=e.g,et[l++]=e.b,et[l++]=e.a,et[l++]=x,et[l++]=h,this.twoColorTint&&(et[l++]=0,et[l++]=0,et[l++]=0,et[l++]=0),et[l++]=y+m,et[l++]=n,et[l++]=e.r,et[l++]=e.g,et[l++]=e.b,et[l++]=e.a,et[l++]=d,et[l++]=h,this.twoColorTint&&(et[l++]=0,et[l++]=0,et[l++]=0,et[l++]=0),et[l++]=y+m,et[l++]=n+S,et[l++]=e.r,et[l++]=e.g,et[l++]=e.b,et[l++]=e.a,et[l++]=d,et[l++]=t,this.twoColorTint&&(et[l++]=0,et[l++]=0,et[l++]=0,et[l++]=0),et[l++]=y,et[l++]=n+S,et[l++]=e.r,et[l++]=e.g,et[l++]=e.b,et[l++]=e.a,et[l++]=x,et[l++]=t,this.twoColorTint&&(et[l++]=0,et[l++]=0,et[l++]=0,et[l]=0),this.batcher.draw(E,et,ni)}drawTextureRotated(E,y,n,m,S,x,h,d,t){this.enableRenderer(this.batcher),t||(t=ri);let e=y+x,l=n+h,i=-x,s=-h,r=m-x,o=S-h,a=i,u=s,f=i,v=o,c=r,g=o,p=r,T=s,C=0,M=0,A=0,R=0,P=0,L=0,F=0,w=0;if(d!=0){let B=ft.cosDeg(d),I=ft.sinDeg(d);C=B*a-I*u,M=I*a+B*u,F=B*f-I*v,w=I*f+B*v,P=B*c-I*g,L=I*c+B*g,A=P+(C-F),R=L+(M-w)}else C=a,M=u,F=f,w=v,P=c,L=g,A=p,R=T;C+=e,M+=l,A+=e,R+=l,P+=e,L+=l,F+=e,w+=l;var O=0;et[O++]=C,et[O++]=M,et[O++]=t.r,et[O++]=t.g,et[O++]=t.b,et[O++]=t.a,et[O++]=0,et[O++]=1,this.twoColorTint&&(et[O++]=0,et[O++]=0,et[O++]=0,et[O++]=0),et[O++]=A,et[O++]=R,et[O++]=t.r,et[O++]=t.g,et[O++]=t.b,et[O++]=t.a,et[O++]=1,et[O++]=1,this.twoColorTint&&(et[O++]=0,et[O++]=0,et[O++]=0,et[O++]=0),et[O++]=P,et[O++]=L,et[O++]=t.r,et[O++]=t.g,et[O++]=t.b,et[O++]=t.a,et[O++]=1,et[O++]=0,this.twoColorTint&&(et[O++]=0,et[O++]=0,et[O++]=0,et[O++]=0),et[O++]=F,et[O++]=w,et[O++]=t.r,et[O++]=t.g,et[O++]=t.b,et[O++]=t.a,et[O++]=0,et[O++]=0,this.twoColorTint&&(et[O++]=0,et[O++]=0,et[O++]=0,et[O]=0),this.batcher.draw(E,et,ni)}drawRegion(E,y,n,m,S,x){this.enableRenderer(this.batcher),x||(x=ri);var h=0;et[h++]=y,et[h++]=n,et[h++]=x.r,et[h++]=x.g,et[h++]=x.b,et[h++]=x.a,et[h++]=E.u,et[h++]=E.v2,this.twoColorTint&&(et[h++]=0,et[h++]=0,et[h++]=0,et[h++]=0),et[h++]=y+m,et[h++]=n,et[h++]=x.r,et[h++]=x.g,et[h++]=x.b,et[h++]=x.a,et[h++]=E.u2,et[h++]=E.v2,this.twoColorTint&&(et[h++]=0,et[h++]=0,et[h++]=0,et[h++]=0),et[h++]=y+m,et[h++]=n+S,et[h++]=x.r,et[h++]=x.g,et[h++]=x.b,et[h++]=x.a,et[h++]=E.u2,et[h++]=E.v,this.twoColorTint&&(et[h++]=0,et[h++]=0,et[h++]=0,et[h++]=0),et[h++]=y,et[h++]=n+S,et[h++]=x.r,et[h++]=x.g,et[h++]=x.b,et[h++]=x.a,et[h++]=E.u,et[h++]=E.v,this.twoColorTint&&(et[h++]=0,et[h++]=0,et[h++]=0,et[h]=0),this.batcher.draw(E.page.texture,et,ni)}line(E,y,n,m,S,x){this.enableRenderer(this.shapes),this.shapes.line(E,y,n,m,S)}triangle(E,y,n,m,S,x,h,d,t,e){this.enableRenderer(this.shapes),this.shapes.triangle(E,y,n,m,S,x,h,d,t,e)}quad(E,y,n,m,S,x,h,d,t,e,l,i,s){this.enableRenderer(this.shapes),this.shapes.quad(E,y,n,m,S,x,h,d,t,e,l,i,s)}rect(E,y,n,m,S,x){this.enableRenderer(this.shapes),this.shapes.rect(E,y,n,m,S,x)}rectLine(E,y,n,m,S,x,h){this.enableRenderer(this.shapes),this.shapes.rectLine(E,y,n,m,S,x,h)}polygon(E,y,n,m){this.enableRenderer(this.shapes),this.shapes.polygon(E,y,n,m)}circle(E,y,n,m,S,x=0){this.enableRenderer(this.shapes),this.shapes.circle(E,y,n,m,S,x)}curve(E,y,n,m,S,x,h,d,t,e){this.enableRenderer(this.shapes),this.shapes.curve(E,y,n,m,S,x,h,d,t,e)}end(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null}resize(E){let y=this.canvas;var n=window.devicePixelRatio||1,m=Math.round(y.clientWidth*n),S=Math.round(y.clientHeight*n);if((y.width!=m||y.height!=S)&&(y.width=m,y.height=S),this.context.gl.viewport(0,0,y.width,y.height),E===1)this.camera.setViewport(m,S);else if(E===2){let x=y.width,h=y.height,d=this.camera.viewportWidth,t=this.camera.viewportHeight,e=t/d,l=h/x,i=e<l?d/x:t/h;this.camera.setViewport(x*i,h*i)}this.camera.update()}enableRenderer(E){this.activeRenderer!==E&&(this.end(),E instanceof ts?(this.batcherShader.bind(),this.batcherShader.setUniform4x4f(Oe.MVP_MATRIX,this.camera.projectionView.values),this.batcherShader.setUniformi("u_texture",0),this.batcher.begin(this.batcherShader),this.activeRenderer=this.batcher):E instanceof es?(this.shapesShader.bind(),this.shapesShader.setUniform4x4f(Oe.MVP_MATRIX,this.camera.projectionView.values),this.shapes.begin(this.shapesShader),this.activeRenderer=this.shapes):this.activeRenderer=this.skeletonDebugRenderer)}},Va="esotericsoftware.spine.skeletonFile.cache",Xa="esotericsoftware.spine.atlas.cache",Wa="spineSkeletonData",Ha="spineAtlasData",wi="spine",Ye=Phaser.GameObjects.Components,Ka=Ye.ComputedSize,Za=Ye.Depth,$a=Ye.Flip,Qa=Ye.ScrollFactor,Ja=Ye.Transform,ja=Ye.Visible,ka=Ye.Origin,qa=Ye.Alpha;function Ve(...E){return y=>(Phaser.Class.mixin(y,E),y)}var _a=Ve(Ka),to=Ve(Za),eo=Ve($a),io=Ve(Qa),so=Ve(Ja),no=Ve(ja),ro=Ve(ka),ao=Ve(qa),oo=class extends Phaser.GameObjects.GameObject{constructor(E,y){super(E,y)}},ho=class{constructor(E=!1){this.clipping=E}calculateBounds(E){if(!E.skeleton)return{x:0,y:0,width:0,height:0};const y=new pi(E.skeleton.data);y.setToSetupPose(),y.updateWorldTransform(2);const n=y.getBoundsRect(this.clipping?new cn:void 0);return n.width==Number.NEGATIVE_INFINITY?{x:0,y:0,width:0,height:0}:n}},is=class extends to(ro(_a(eo(io(so(no(ao(oo)))))))){constructor(y,n,m,S,x,h,d=new ho){super(y,window.SPINE_GAME_OBJECT_TYPE?window.SPINE_GAME_OBJECT_TYPE:wi);$(this,"blendMode",-1);$(this,"skeleton");$(this,"animationStateData");$(this,"animationState");$(this,"beforeUpdateWorldTransforms",()=>{});$(this,"afterUpdateWorldTransforms",()=>{});$(this,"premultipliedAlpha",!1);$(this,"offsetX",0);$(this,"offsetY",0);this.plugin=n,this.boundsProvider=d,this.setPosition(m,S),this.premultipliedAlpha=this.plugin.isAtlasPremultiplied(h),this.skeleton=this.plugin.createSkeleton(x,h),this.animationStateData=new Nr(this.skeleton.data),this.animationState=new Or(this.animationStateData),this.skeleton.updateWorldTransform(2),this.updateSize()}updateSize(){if(!this.skeleton)return;let y=this.boundsProvider.calculateBounds(this);this.width=y.width,this.height=y.height,this.setDisplayOrigin(-y.x,-y.y),this.offsetX=-y.x,this.offsetY=-y.y}skeletonToPhaserWorldCoordinates(y){let n=this.getWorldTransformMatrix(),m=n.a,S=n.b,x=n.c,h=n.d,d=n.tx,t=n.ty,e=y.x,l=y.y;y.x=e*m+l*x+d,y.y=e*S+l*h+t}phaserWorldCoordinatesToSkeleton(y){let n=this.getWorldTransformMatrix();n=n.invert();let m=n.a,S=n.b,x=n.c,h=n.d,d=n.tx,t=n.ty,e=y.x,l=y.y;y.x=e*m+l*x+d,y.y=e*S+l*h+t}phaserWorldCoordinatesToBone(y,n){this.phaserWorldCoordinatesToSkeleton(y),n.parent?n.parent.worldToLocal(y):n.worldToLocal(y)}updatePose(y){this.animationState.update(y/1e3),this.animationState.apply(this.skeleton),this.beforeUpdateWorldTransforms(this),this.skeleton.update(y/1e3),this.skeleton.updateWorldTransform(2),this.afterUpdateWorldTransforms(this)}preUpdate(y,n){!this.skeleton||!this.animationState||this.updatePose(n)}preDestroy(){}willRender(y){var n=15,m=!this.skeleton||!(n!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&y.id);if(this.visible||(m=!1),!m&&this.parentContainer&&this.plugin.webGLRenderer){var S=this.plugin.webGLRenderer;this.plugin.gl&&this.plugin.phaserRenderer instanceof Phaser.Renderer.WebGL.WebGLRenderer&&S.batcher.isDrawing&&(S.end(),this.plugin.phaserRenderer.renderNodes.getNode("RebindContext")?.run())}return m}renderWebGL(y,n,m,S,x,h,d){const t=m.camera;if(!t||!n.skeleton||!n.animationState||!n.plugin.webGLRenderer)return;let e=n.plugin.webGLRenderer;const l=h[d-1],i=h[d+1],s=!l||l.type!==n.type,r=i&&i.type===n.type;s&&(m.renderer.renderNodes.currentBatchDrawingContext!==m&&(m.renderer.renderNodes.finishBatch(),m.beginDraw()),y.renderNodes.getNode("YieldContext")?.run(m),e.begin()),t.addToRenderList(n);let o=Phaser.GameObjects.GetCalcMatrix(n,t,S,!m.useCanvas).calc,a=o.a,u=o.b,f=o.c,v=o.d,c=o.tx,g=o.ty,p=n.offsetX-n.displayOriginX,T=n.offsetY-n.displayOriginY;e.drawSkeleton(n.skeleton,n.premultipliedAlpha,-1,-1,(C,M,A)=>{for(let R=0;R<M;R+=A){let P=C[R]+p,L=C[R+1]+T;C[R]=P*a+L*f+c,C[R+1]=P*u+L*v+g}}),r||(e.end(),y.renderNodes.getNode("RebindContext")?.run(m))}renderCanvas(y,n,m,S){if(!this.skeleton||!this.animationState||!this.plugin.canvasRenderer)return;let x=y.currentContext,h=this.plugin.canvasRenderer;h.ctx=x,m.addToRenderList(n);let d=Phaser.GameObjects.GetCalcMatrix(n,m,S).calc,t=this.skeleton;t.x=d.tx,t.y=d.ty,t.scaleX=d.scaleX,t.scaleY=d.scaleY;let e=t.getRootBone();e.rotation=-57.29577866666166*d.rotationNormalized,this.skeleton.updateWorldTransform(2),x.save(),h.draw(t),x.restore()}};pi.yDown=!0;var Ei,Ni=(Ei=class extends Re.Plugins.ScenePlugin{constructor(y,n,m){super(y,n,m);$(this,"game");$(this,"isWebGL");$(this,"gl");$(this,"gameWebGLRenderer",null);$(this,"canvasRenderer");$(this,"phaserRenderer");$(this,"skeletonDataCache");$(this,"atlasCache");this.game=n.game,this.isWebGL=this.game.config.renderType===2,this.gl=this.isWebGL?this.game.renderer.gl:null,this.phaserRenderer=this.game.renderer,this.canvasRenderer=null,this.skeletonDataCache=this.game.cache.addCustom(Va),this.atlasCache=this.game.cache.addCustom(Xa);let S=function(e,l,i){let s=new ss(this,e,l,0,i);return this.addFile(s.files),this};n.registerFileType("spineJson",S,y);let x=function(e,l,i){let s=new ss(this,e,l,1,i);return this.addFile(s.files),this};n.registerFileType("spineBinary",x,y);let h=function(e,l,i,s){let r=new lo(this,e,l,i,s);return this.addFile(r.files),this};n.registerFileType("spineAtlas",h,y);let d=function(e,l,i,s,r){const o=this.scene.sys[m];let a=new is(this.scene,o,e,l,i,s,r);return this.displayList.add(a),this.updateList.add(a),a},t=function(e,l=!1){let i=e.x?e.x:0,s=e.y?e.y:0,r=e.boundsProvider?e.boundsProvider:void 0;const o=this.scene.sys[m];let a=new is(this.scene,o,i,s,e.dataKey,e.atlasKey,r);return l!==void 0&&(e.add=l),Re.GameObjects.BuildGameObject(this.scene,a,e)};n.registerGameObject(window.SPINE_GAME_OBJECT_TYPE?window.SPINE_GAME_OBJECT_TYPE:wi,d,t)}get webGLRenderer(){return this.gameWebGLRenderer}boot(){this.isWebGL&&this.gl?this.gameWebGLRenderer||(this.gameWebGLRenderer=new Ya(this.game.renderer.canvas,this.gl,!0)):this.scene&&(this.canvasRenderer||(this.canvasRenderer=new Da(this.scene.sys.context))),this.onResize(),this.systems&&(this.systems.events.once("destroy",this.destroy,this),this.systems.events.on("start",this.onStart,this),this.systems.events.on("shutdown",this.shutdown,this)),this.game.events.once("destroy",this.gameDestroy,this)}onResize(){const y=this.game.renderer,n=this.webGLRenderer;if(y&&n){const m=y.width,S=y.height;n.camera.position.x=m/2,n.camera.position.y=S/2,n.camera.up.y=-1,n.camera.direction.z=1,n.camera.setViewport(m,S)}}onStart(){this.game.scale.on(Re.Scale.Events.RESIZE,this.onResize,this)}shutdown(){this.isWebGL&&this.game.scale.off(Re.Scale.Events.RESIZE,this.onResize,this)}destroy(){this.shutdown(),this.systems?.events.off("start",this.onStart,this),this.systems?.events.off("shutdown",this.shutdown,this)}gameDestroy(){this.pluginManager.removeGameObject(window.SPINE_GAME_OBJECT_TYPE?window.SPINE_GAME_OBJECT_TYPE:wi,!0,!0),this.webGLRenderer&&this.webGLRenderer.dispose(),this.gameWebGLRenderer=null}getAtlas(y){let n;if(this.atlasCache.exists(y))n=this.atlasCache.get(y);else{let m=this.game.cache.text.get(y);if(n=new Gr(m.data),this.isWebGL){let S=this.gl;const x=S.getParameter(S.UNPACK_PREMULTIPLY_ALPHA_WEBGL);x&&S.pixelStorei(S.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);for(let h of n.pages)h.setTexture(new Ba(S,this.game.textures.get(y+"!"+h.name).getSourceImage(),!1));x&&S.pixelStorei(S.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)}else for(let S of n.pages)S.setTexture(new Oa(this.game.textures.get(y+"!"+S.name).getSourceImage()));this.atlasCache.add(y,n)}return n}isAtlasPremultiplied(y){let n=this.game.cache.text.get(y);return n?n.premultipliedAlpha:!1}getSkeletonData(y,n){const m=this.getAtlas(n),S=y+n;let x;if(this.skeletonDataCache.exists(S))x=this.skeletonDataCache.get(S);else{if(this.game.cache.json.exists(y)){let h=this.game.cache.json.get(y);x=new La(new $i(m)).readSkeletonData(h)}else{let h=this.game.cache.binary.get(y);x=new Zr(new $i(m)).readSkeletonData(new Uint8Array(h))}this.skeletonDataCache.add(S,x)}return x}createSkeleton(y,n){if(this.isWebGL){const S=this.phaserRenderer;S.glWrapper.updateTexturingFlipY({texturing:{flipY:!1}}),S.renderNodes.getNode("YieldContext")?.run()}const m=new pi(this.getSkeletonData(y,n));return this.isWebGL&&this.phaserRenderer.renderNodes.getNode("RebindContext")?.run(),m}},$(Ei,"rendererId",0),Ei),ss=class extends Re.Loader.MultiFile{constructor(E,y,n,m,S){if(typeof y!="string"){const d=y;y=d.key,n=d.url,m=d.type==="spineJson"?0:1,S=d.xhrSettings}let x=null;m==0?x=new Re.Loader.FileTypes.JSONFile(E,{key:y,url:n,extension:"json",xhrSettings:S}):x=new Re.Loader.FileTypes.BinaryFile(E,{key:y,url:n,extension:"skel",xhrSettings:S}),super(E,Wa,y,[x]),this.fileType=m}onFileComplete(E){this.pending--}addToCache(){this.isReadyToProcess()&&this.files[0].addToCache()}},lo=class extends Re.Loader.MultiFile{constructor(E,y,n,m,S){if(typeof y!="string"){const x=y;y=x.key,n=x.url,m=x.premultipliedAlpha,S=x.xhrSettings}super(E,Ha,y,[new Re.Loader.FileTypes.TextFile(E,{key:y,url:n,xhrSettings:S,extension:"atlas"})]),this.premultipliedAlpha=m}onFileComplete(E){if(this.files.indexOf(E)!=-1&&(this.pending--,E.type=="text")){var y=E.data.split(/\r\n|\r|\n/);let t=[];t.push(y[0]);for(var n=1;n<y.length;n++){var m=y[n];m.trim()===""&&n<y.length-1&&(m=y[n+1],t.push(m))}let e=E.url;typeof e=="object"&&(e=E.src);let l=(e.match(/^.*\//)??"").toString();this.loader.path&&this.loader.path.length>0&&l.startsWith(this.loader.path)&&(l=l.slice(this.loader.path.length));for(var S=0;S<t.length;S++){var x=l+t[S],h=E.key+"!"+t[S],d=new Re.Loader.FileTypes.ImageFile(this.loader,h,x);this.loader.keyExists(d)||(this.addToMultiFile(d),this.loader.addFile(d))}}}addToCache(){if(this.isReadyToProcess()){let E=this.loader.textureManager;for(let y of this.files)y.type=="image"?E.exists(y.key)||E.addImage(y.key,y.data):(this.premultipliedAlpha=this.premultipliedAlpha??(y.data.indexOf("pma: true")>=0||y.data.indexOf("pma:true")>=0),y.data={data:y.data,premultipliedAlpha:this.premultipliedAlpha},y.addToCache())}}};window.spine={SpinePlugin:Ni};window["spine.SpinePlugin"]=Ni;const uo={type:Tn,width:750,height:1334,parent:"game-container",backgroundColor:"#2d2d44",scale:{mode:Gi.FIT,autoCenter:Gi.CENTER_BOTH},plugins:{scene:[{key:"spinePlugin",plugin:Ni,mapping:"spine"}]},scene:[fr,Cn,In,bn,tr,er,Gn,ir,sr,dr,vr,Ar,Rr,Lr]};new Sn(uo);
|